Index: writerfilter/source/dmapper/StyleSheetTable.hxx =================================================================== --- writerfilter/source/dmapper/StyleSheetTable.hxx (revision 1375424) +++ writerfilter/source/dmapper/StyleSheetTable.hxx (working copy) @@ -145,7 +145,9 @@ virtual ~TableStyleSheetEntry( ); protected: - PropertyMapPtr GetLocalPropertiesFromMask( sal_Int32 nMask ); + PropertyMapPtr GetLocalPropertiesFromMask( const sal_Int32 nMask ); + void MergePropertiesFromMask(const short nBit, const sal_Int32 nMask, + const TblStyleType nStyleId, PropertyMapPtr pToFill); }; typedef boost::shared_ptr TableStyleSheetEntryPtr; Index: writerfilter/source/dmapper/StyleSheetTable.cxx =================================================================== --- writerfilter/source/dmapper/StyleSheetTable.cxx (revision 1375424) +++ writerfilter/source/dmapper/StyleSheetTable.cxx (working copy) @@ -221,8 +221,20 @@ pToFill->insert( pToAdd ); } -PropertyMapPtr TableStyleSheetEntry::GetLocalPropertiesFromMask( sal_Int32 nMask ) +void TableStyleSheetEntry::MergePropertiesFromMask(const short nBit, const sal_Int32 nMask, + const TblStyleType nStyleId, + PropertyMapPtr pToFill) { + TblStylePrs::iterator pIt = m_aStyles.find( nStyleId ); + + short nTestBit = 1 << nBit; + sal_Int32 nBitMask = sal_Int32( nTestBit ); + if ( ( nMask & nBitMask ) && ( pIt != m_aStyles.end( ) ) ) + lcl_mergeProps( pToFill, pIt->second, nStyleId ); +} + +PropertyMapPtr TableStyleSheetEntry::GetLocalPropertiesFromMask( const sal_Int32 nMask ) +{ // Order from right to left static TblStyleType aBitsOrder[] = { @@ -243,21 +255,22 @@ // Get the properties applying according to the mask PropertyMapPtr pProps( new PropertyMap( ) ); - short nBit = 0; + short nBit = 4; do { - TblStyleType nStyleId = aBitsOrder[nBit]; - TblStylePrs::iterator pIt = m_aStyles.find( nStyleId ); - - short nTestBit = 1 << nBit; - sal_Int32 nBitMask = sal_Int32( nTestBit ); - if ( ( nMask & nBitMask ) && ( pIt != m_aStyles.end( ) ) ) - lcl_mergeProps( pProps, pIt->second, nStyleId ); - + MergePropertiesFromMask(nBit, nMask, aBitsOrder[nBit], pProps); nBit++; } while ( nBit < 13 ); + nBit = 0; + do + { + MergePropertiesFromMask(nBit, nMask, aBitsOrder[nBit], pProps); + nBit++; + } + while ( nBit < 4 ); // nw/ne/sw/se overwrite others + return pProps; } @@ -543,9 +556,13 @@ case NS_ooxml::LN_CT_Style_personalReply: case NS_ooxml::LN_CT_Style_rsid: case NS_ooxml::LN_CT_Style_trPr: - case NS_ooxml::LN_CT_Style_tcPr: /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ break; + case NS_ooxml::LN_CT_Style_tcPr: + { + resolveSprmProps(rSprm); + } + break; case NS_ooxml::LN_CT_Style_tblPr: //contains table properties case NS_ooxml::LN_CT_Style_tblStylePr: //contains to table properties Index: writerfilter/inc/resourcemodel/TableManager.hxx =================================================================== --- writerfilter/inc/resourcemodel/TableManager.hxx (revision 1375424) +++ writerfilter/inc/resourcemodel/TableManager.hxx (working copy) @@ -218,7 +218,7 @@ void resetRowProps() { - mpCellProps.reset(); + mpRowProps.reset(); } void setRowProps(PropertiesPointer pProps)