[Libreoffice-commits] core.git: writerfilter/source

Jan Holesovsky kendy at collabora.com
Wed Oct 9 10:59:16 PDT 2013


 writerfilter/source/dmapper/DomainMapper.cxx             |   20 +-
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx |   54 ++---
 writerfilter/source/dmapper/DomainMapper_Impl.cxx        |   29 +--
 writerfilter/source/dmapper/NumberingManager.cxx         |   12 -
 writerfilter/source/dmapper/PropertyMap.cxx              |  136 +++++++--------
 writerfilter/source/dmapper/PropertyMap.hxx              |   25 +-
 writerfilter/source/dmapper/SdtHelper.cxx                |    8 
 writerfilter/source/dmapper/StyleSheetTable.cxx          |   15 -
 8 files changed, 148 insertions(+), 151 deletions(-)

New commits:
commit 8996ab35db7ae98e63b7735e8f172da3d9e48af0
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Wed Oct 9 18:50:13 2013 +0200

    Kill PropertyDefinition; use PropValue instead.
    
    PropertyDefinition was introduced long ago, probably in order not to have to
    touch larger amount of code when it turned out that it was necessary to store
    more information in PropertyMap - otherwise even then it was more logical to
    extend the value from uno::Any only to some structure.
    
    PropertyMap's API itself is quite non-convenient, it is half-way between
    direct access to the std::map it is derived from, and something built on top
    of that.
    
    In the long run I believe we want to make _PropertyMap member of PropertyMap,
    not an ancestor, and change the API; if anybody cares enough, that is ;-)
    
    Change-Id: Ib8e9bfc4561f003b78ab6ce6620722e251f661d6

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 935f81f..928a64c 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -993,12 +993,12 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
             PropertyMap::iterator aLineSpacingIter;
             if (pTopContext)
             {
-                aLineSpacingIter = pTopContext->find(PropertyDefinition( PROP_PARA_LINE_SPACING ) );
+                aLineSpacingIter = pTopContext->find(PROP_PARA_LINE_SPACING);
                 bFound = aLineSpacingIter != pTopContext->end();
             }
             if (bFound)
             {
-                aLineSpacingIter->second >>= aSpacing;
+                aLineSpacingIter->second.getValue() >>= aSpacing;
             }
             else
             {
@@ -1533,11 +1533,11 @@ sal_Int32 lcl_getCurrentNumberingProperty(uno::Reference<container::XIndexAccess
     static bool ExchangeLeftRight( const PropertyMapPtr rContext, bool mbIsBIDI)
 {
     bool bExchangeLeftRight = false;
-    PropertyMap::const_iterator aPropParaIte = rContext->find( PropertyDefinition( PROP_WRITING_MODE ));
+    PropertyMap::const_iterator aPropParaIte = rContext->find(PROP_WRITING_MODE);
     if( aPropParaIte != rContext->end())
     {
         sal_Int32 aAdjust ;
-        if( (aPropParaIte->second >>= aAdjust) && aAdjust == text::WritingMode2::RL_TB )
+        if( (aPropParaIte->second.getValue() >>= aAdjust) && aAdjust == text::WritingMode2::RL_TB )
             bExchangeLeftRight = true;
     }
     else
@@ -1623,7 +1623,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
                     uno::Any aRules = uno::makeAny( pList->GetNumberingRules( ) );
                     rContext->Insert( PROP_NUMBERING_RULES, aRules );
                     // erase numbering from pStyle if already set
-                    rContext->erase( PropertyDefinition( PROP_NUMBERING_STYLE_NAME ));
+                    rContext->erase(PROP_NUMBERING_STYLE_NAME);
                 }
             }
             else
@@ -3138,7 +3138,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
             m_pImpl->GetTopContext()->Insert( PROP_PARA_STYLE_NAME, uno::makeAny( sConvertedStyleName ));
         //apply numbering to paragraph if it was set at the style, but only if the paragraph itself
         //does not specify the numbering
-        if( rContext->find( PropertyDefinition( PROP_NUMBERING_RULES )) == rContext->end()) // !contains
+        if( rContext->find(PROP_NUMBERING_RULES) == rContext->end()) // !contains
         {
             const StyleSheetEntryPtr pEntry = pStyleTable->FindStyleSheetByISTD(sStringValue);
             OSL_ENSURE( pEntry.get(), "no style sheet found" );
@@ -3155,8 +3155,8 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
                 {
                     const StyleSheetEntryPtr pParent = pStyleTable->FindStyleSheetByISTD(pEntry->sBaseStyleIdentifier);
                     const StyleSheetPropertyMap* pParentProperties = dynamic_cast<const StyleSheetPropertyMap*>(pParent ? pParent->pProperties.get() : 0);
-                    if (pParentProperties->find( PropertyDefinition( PROP_PARA_RIGHT_MARGIN )) != pParentProperties->end())
-                        nParaRightMargin = pParentProperties->find( PropertyDefinition( PROP_PARA_RIGHT_MARGIN ))->second.get<sal_Int32>();
+                    if (pParentProperties->find(PROP_PARA_RIGHT_MARGIN) != pParentProperties->end())
+                        nParaRightMargin = pParentProperties->find(PROP_PARA_RIGHT_MARGIN)->second.getValue().get<sal_Int32>();
                 }
                 if (nParaRightMargin != 0)
                 {
@@ -3496,7 +3496,7 @@ void DomainMapper::processDeferredCharacterProperties( const std::map< sal_Int32
             {
                 std::map< sal_Int32, uno::Any >::const_iterator font = deferredCharacterProperties.find( NS_sprm::LN_CHps );
                 PropertyMapPtr pDefaultCharProps = m_pImpl->GetStyleSheetTable()->GetDefaultCharProps();
-                PropertyMap::iterator aDefaultFont = pDefaultCharProps->find(PropertyDefinition( PROP_CHAR_HEIGHT ));
+                PropertyMap::iterator aDefaultFont = pDefaultCharProps->find(PROP_CHAR_HEIGHT);
                 if( font != deferredCharacterProperties.end())
                 {
                     double fontSize = 0;
@@ -3507,7 +3507,7 @@ void DomainMapper::processDeferredCharacterProperties( const std::map< sal_Int32
                 else if (aDefaultFont != pDefaultCharProps->end())
                 {
                     double fHeight = 0;
-                    aDefaultFont->second >>= fHeight;
+                    aDefaultFont->second.getValue() >>= fHeight;
                     // fHeight is in points, nIntValue is in half points, nEscapement is in percents.
                     nEscapement = nIntValue * 100 / fHeight / 2;
                 }
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index f65cfca..b3d1412 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -131,37 +131,33 @@ PropertyMapPtr lcl_SearchParentStyleSheetAndMergeProperties(const StyleSheetEntr
 
 void lcl_mergeBorder( PropertyIds nId, PropertyMapPtr pOrig, PropertyMapPtr pDest )
 {
-    PropertyDefinition aDef( nId );
-    PropertyMap::iterator pOrigIt = pOrig->find( aDef );
+    PropertyMap::iterator pOrigIt = pOrig->find(nId);
 
     if ( pOrigIt != pOrig->end( ) )
     {
-        pDest->Insert( nId, pOrigIt->second, false );
+        pDest->Insert( nId, pOrigIt->second.getValue(), false );
     }
 }
 
 void lcl_computeCellBorders( PropertyMapPtr pTableBorders, PropertyMapPtr pCellProps,
         sal_Int32 nCell, sal_Int32 nRow, bool bIsEndCol, bool bIsEndRow )
 {
-    PropertyDefinition aVertPDef( META_PROP_VERTICAL_BORDER );
-    PropertyDefinition aHorizPDef( META_PROP_HORIZONTAL_BORDER );
-
-    PropertyMap::iterator aVerticalIter = pCellProps->find( aVertPDef );
-    PropertyMap::iterator aHorizontalIter = pCellProps->find( aHorizPDef );
+    PropertyMap::iterator aVerticalIter = pCellProps->find(META_PROP_VERTICAL_BORDER);
+    PropertyMap::iterator aHorizontalIter = pCellProps->find(META_PROP_HORIZONTAL_BORDER);
 
     // Handle the vertical and horizontal borders
     bool bHasVert = ( aVerticalIter != pCellProps->end(  ) );
     uno::Any aVertProp;
     if ( !bHasVert )
     {
-        aVerticalIter = pTableBorders->find( aVertPDef );
+        aVerticalIter = pTableBorders->find(META_PROP_VERTICAL_BORDER);
         bHasVert = ( aVerticalIter != pTableBorders->end( ) );
         if ( bHasVert )
-            aVertProp = aVerticalIter->second;
+            aVertProp = aVerticalIter->second.getValue();
     }
     else
     {
-        aVertProp = aVerticalIter->second;
+        aVertProp = aVerticalIter->second.getValue();
         pCellProps->erase( aVerticalIter );
     }
 
@@ -169,14 +165,14 @@ void lcl_computeCellBorders( PropertyMapPtr pTableBorders, PropertyMapPtr pCellP
     uno::Any aHorizProp;
     if ( !bHasHoriz )
     {
-        aHorizontalIter = pTableBorders->find( aHorizPDef );
+        aHorizontalIter = pTableBorders->find(META_PROP_HORIZONTAL_BORDER);
         bHasHoriz = ( aHorizontalIter != pTableBorders->end( ) );
         if ( bHasHoriz )
-            aHorizProp = aHorizontalIter->second;
+            aHorizProp = aHorizontalIter->second.getValue();
     }
     else
     {
-        aHorizProp = aHorizontalIter->second;
+        aHorizProp = aHorizontalIter->second.getValue();
         pCellProps->erase( aHorizontalIter );
     }
 
@@ -293,13 +289,13 @@ namespace
 
 bool lcl_extractTableBorderProperty(PropertyMapPtr pTableProperties, const PropertyIds nId, TableInfo& rInfo, table::BorderLine2& rLine)
 {
-    PropertyMap::iterator aTblBorderIter = pTableProperties->find( PropertyDefinition(nId) );
+    PropertyMap::iterator aTblBorderIter = pTableProperties->find(nId);
     if( aTblBorderIter != pTableProperties->end() )
     {
-        OSL_VERIFY(aTblBorderIter->second >>= rLine);
+        OSL_VERIFY(aTblBorderIter->second.getValue() >>= rLine);
 
         rInfo.pTableBorders->Insert( nId, uno::makeAny( rLine ) );
-        PropertyMap::iterator pIt = rInfo.pTableDefaults->find( PropertyDefinition( nId ) );
+        PropertyMap::iterator pIt = rInfo.pTableDefaults->find(nId);
         if ( pIt != rInfo.pTableDefaults->end( ) )
             rInfo.pTableDefaults->erase( pIt );
 
@@ -343,12 +339,12 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo
         sal_Int32 nTableWidthType = text::SizeType::FIX;
 
         PropertyMap::iterator aTableStyleIter =
-        m_aTableProperties->find( PropertyDefinition( META_PROP_TABLE_STYLE_NAME ) );
+        m_aTableProperties->find(META_PROP_TABLE_STYLE_NAME);
         if(aTableStyleIter != m_aTableProperties->end())
         {
             // Apply table style properties recursively
             OUString sTableStyleName;
-            aTableStyleIter->second >>= sTableStyleName;
+            aTableStyleIter->second.getValue() >>= sTableStyleName;
             StyleSheetTablePtr pStyleSheetTable = m_rDMapper_Impl.GetStyleSheetTable();
             const StyleSheetEntryPtr pStyleSheet = pStyleSheetTable->FindStyleSheetByISTD( sTableStyleName );
             pTableStyle = dynamic_cast<TableStyleSheetEntry*>( pStyleSheet.get( ) );
@@ -382,10 +378,10 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo
         }
 
         PropertyMap::iterator const aTblLookIter =
-            m_aTableProperties->find(PropertyDefinition(PROP_TBL_LOOK));
+            m_aTableProperties->find(PROP_TBL_LOOK);
         if(aTblLookIter != m_aTableProperties->end())
         {
-            aTblLookIter->second >>= rInfo.nTblLook;
+            aTblLookIter->second.getValue() >>= rInfo.nTblLook;
             m_aTableProperties->erase( aTblLookIter );
         }
 
@@ -513,7 +509,7 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo
 
         //fill default value - if not available
         const PropertyMap::const_iterator aRepeatIter =
-        m_aTableProperties->find( PropertyDefinition( PROP_HEADER_ROW_COUNT ) );
+        m_aTableProperties->find(PROP_HEADER_ROW_COUNT);
         if( aRepeatIter == m_aTableProperties->end() )
             m_aTableProperties->Insert( PROP_HEADER_ROW_COUNT, uno::makeAny( (sal_Int32)0 ));
 
@@ -657,9 +653,7 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl
                 }
 
                 // Remove properties from style/row that aren't allowed in cells
-                const PropertyMap::iterator aDefaultRepeatIt =
-                    pAllCellProps->find(
-                        PropertyDefinition( PROP_HEADER_ROW_COUNT ) );
+                const PropertyMap::iterator aDefaultRepeatIt = pAllCellProps->find(PROP_HEADER_ROW_COUNT);
                 if ( aDefaultRepeatIt != pAllCellProps->end( ) )
                     pAllCellProps->erase( aDefaultRepeatIt );
 
@@ -677,24 +671,24 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl
 
                 //now set the default left+right border distance TODO: there's an sprm containing the default distance!
                 const PropertyMap::const_iterator aLeftDistanceIter =
-                aCellIterator->get()->find( PropertyDefinition(PROP_LEFT_BORDER_DISTANCE) );
+                aCellIterator->get()->find(PROP_LEFT_BORDER_DISTANCE);
                 if( aLeftDistanceIter == aCellIterator->get()->end() )
                     aCellIterator->get()->Insert( PROP_LEFT_BORDER_DISTANCE,
                                                  uno::makeAny(rInfo.nLeftBorderDistance ) );
                 const PropertyMap::const_iterator aRightDistanceIter =
-                aCellIterator->get()->find( PropertyDefinition(PROP_RIGHT_BORDER_DISTANCE) );
+                aCellIterator->get()->find(PROP_RIGHT_BORDER_DISTANCE);
                 if( aRightDistanceIter == aCellIterator->get()->end() )
                     aCellIterator->get()->Insert( PROP_RIGHT_BORDER_DISTANCE,
                                                  uno::makeAny((sal_Int32) rInfo.nRightBorderDistance ) );
 
                 const PropertyMap::const_iterator aTopDistanceIter =
-                aCellIterator->get()->find( PropertyDefinition(PROP_TOP_BORDER_DISTANCE) );
+                aCellIterator->get()->find(PROP_TOP_BORDER_DISTANCE);
                 if( aTopDistanceIter == aCellIterator->get()->end() )
                     aCellIterator->get()->Insert( PROP_TOP_BORDER_DISTANCE,
                                                  uno::makeAny((sal_Int32) rInfo.nTopBorderDistance ) );
 
                 const PropertyMap::const_iterator aBottomDistanceIter =
-                aCellIterator->get()->find( PropertyDefinition(PROP_BOTTOM_BORDER_DISTANCE) );
+                aCellIterator->get()->find(PROP_BOTTOM_BORDER_DISTANCE);
                 if( aBottomDistanceIter == aCellIterator->get()->end() )
                     aCellIterator->get()->Insert( PROP_BOTTOM_BORDER_DISTANCE,
                                                  uno::makeAny((sal_Int32) rInfo.nBottomBorderDistance ) );
@@ -759,7 +753,7 @@ RowPropertyValuesSeq_t DomainMapperTableHandler::endTableGetRowProperties()
         if( aRowIter->get() )
         {
             //set default to 'break across pages"
-            if( aRowIter->get()->find( PropertyDefinition( PROP_IS_SPLIT_ALLOWED )) == aRowIter->get()->end())
+            if( aRowIter->get()->find(PROP_IS_SPLIT_ALLOWED) == aRowIter->get()->end())
                 aRowIter->get()->Insert( PROP_IS_SPLIT_ALLOWED, uno::makeAny(sal_True ) );
 
             aRowProperties[nRow] = (*aRowIter)->GetPropertyValues();
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index b81d4ef..1be4289 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -583,10 +583,10 @@ uno::Any DomainMapper_Impl::GetPropertyFromStyleSheet(PropertyIds eId)
         if(pEntry->pProperties)
         {
             PropertyMap::const_iterator aPropertyIter =
-                    pEntry->pProperties->find(PropertyDefinition(eId));
+                    pEntry->pProperties->find(eId);
             if( aPropertyIter != pEntry->pProperties->end())
             {
-                return aPropertyIter->second;
+                return aPropertyIter->second.getValue();
             }
         }
         //search until the property is set or no parent is available
@@ -729,11 +729,11 @@ void lcl_AddRangeAndStyle(
     pToBeSavedProperties->SetStartingRange(xParaCursor->getStart());
     if(pPropertyMap)
     {
-        PropertyMap::iterator aParaStyleIter = pPropertyMap->find(PropertyDefinition( PROP_PARA_STYLE_NAME ) );
+        PropertyMap::iterator aParaStyleIter = pPropertyMap->find(PROP_PARA_STYLE_NAME);
         if( aParaStyleIter != pPropertyMap->end())
         {
             OUString sName;
-            aParaStyleIter->second >>= sName;
+            aParaStyleIter->second.getValue() >>= sName;
             pToBeSavedProperties->SetParaStyleName(sName);
         }
     }
@@ -1805,9 +1805,9 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
                 // Fix spacing for as-character objects. If the paragraph has CT_Spacing_after set,
                 // it needs to be set on the object too, as that's what object placement code uses.
                 PropertyMapPtr paragraphContext = GetTopContextOfType( CONTEXT_PARAGRAPH );
-                PropertyMap::const_iterator pos = paragraphContext->find( PropertyDefinition( PROP_PARA_BOTTOM_MARGIN ));
+                PropertyMap::const_iterator pos = paragraphContext->find(PROP_PARA_BOTTOM_MARGIN);
                 if( pos != paragraphContext->end())
-                    xProps->setPropertyValue( rPropNameSupplier.GetName( PROP_BOTTOM_MARGIN ), (*pos).second );
+                    xProps->setPropertyValue( rPropNameSupplier.GetName( PROP_BOTTOM_MARGIN ), (*pos).second.getValue() );
             }
         }
     }
@@ -2062,17 +2062,16 @@ bool lcl_FindInCommand(
 void DomainMapper_Impl::GetCurrentLocale(lang::Locale& rLocale)
 {
     PropertyMapPtr pTopContext = GetTopContext();
-    PropertyDefinition aCharLocale( PROP_CHAR_LOCALE );
-    PropertyMap::iterator aLocaleIter = pTopContext->find( aCharLocale );
+    PropertyMap::iterator aLocaleIter = pTopContext->find(PROP_CHAR_LOCALE);
     if( aLocaleIter != pTopContext->end())
-        aLocaleIter->second >>= rLocale;
+        aLocaleIter->second.getValue() >>= rLocale;
     else
     {
         PropertyMapPtr pParaContext = GetTopContextOfType(CONTEXT_PARAGRAPH);
-        aLocaleIter = pParaContext->find(aCharLocale);
+        aLocaleIter = pParaContext->find(PROP_CHAR_LOCALE);
         if( aLocaleIter != pParaContext->end())
         {
-            aLocaleIter->second >>= rLocale;
+            aLocaleIter->second.getValue() >>= rLocale;
         }
     }
 }
@@ -4088,14 +4087,14 @@ sal_Int32 DomainMapper_Impl::getCurrentNumberingProperty(OUString aProp)
 {
     sal_Int32 nRet = 0;
 
-    PropertyMap::iterator it = m_pTopContext->find(PropertyDefinition( PROP_NUMBERING_RULES ) );
+    PropertyMap::iterator it = m_pTopContext->find(PROP_NUMBERING_RULES);
     uno::Reference<container::XIndexAccess> xNumberingRules;
     if (it != m_pTopContext->end())
-        xNumberingRules.set(it->second, uno::UNO_QUERY);
-    it = m_pTopContext->find(PropertyDefinition( PROP_NUMBERING_LEVEL ) );
+        xNumberingRules.set(it->second.getValue(), uno::UNO_QUERY);
+    it = m_pTopContext->find(PROP_NUMBERING_LEVEL);
     sal_Int32 nNumberingLevel = -1;
     if (it != m_pTopContext->end())
-        it->second >>= nNumberingLevel;
+        it->second.getValue() >>= nNumberingLevel;
     if (xNumberingRules.is() && nNumberingLevel != -1)
     {
         uno::Sequence<beans::PropertyValue> aProps;
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index f390346..917abb2 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -229,7 +229,7 @@ uno::Sequence< beans::PropertyValue > ListLevel::GetCharStyleProperties( )
     _PropertyMap::const_iterator aEndIter = end();
     for( ; aMapIter != aEndIter; ++aMapIter )
     {
-        switch( aMapIter->first.eId )
+        switch( aMapIter->first )
         {
             case PROP_ADJUST:
             case PROP_INDENT_AT:
@@ -243,8 +243,8 @@ uno::Sequence< beans::PropertyValue > ListLevel::GetCharStyleProperties( )
             {
                 rProperties.push_back(
                         beans::PropertyValue(
-                            aPropNameSupplier.GetName( aMapIter->first.eId ), 0,
-                            aMapIter->second, beans::PropertyState_DIRECT_VALUE ));
+                            aPropNameSupplier.GetName( aMapIter->first ), 0,
+                            aMapIter->second.getValue(), beans::PropertyState_DIRECT_VALUE ));
             }
         }
     }
@@ -335,7 +335,7 @@ uno::Sequence< beans::PropertyValue > ListLevel::GetLevelProperties( )
     _PropertyMap::const_iterator aEndIter = end();
     for( ; aMapIter != aEndIter; ++aMapIter )
     {
-        switch( aMapIter->first.eId )
+        switch( aMapIter->first )
         {
             case PROP_ADJUST:
             case PROP_INDENT_AT:
@@ -343,13 +343,13 @@ uno::Sequence< beans::PropertyValue > ListLevel::GetLevelProperties( )
             case PROP_FIRST_LINE_OFFSET:
             case PROP_LEFT_MARGIN:
                 aNumberingProperties.push_back(
-                    beans::PropertyValue( aPropNameSupplier.GetName( aMapIter->first.eId ), 0, aMapIter->second, beans::PropertyState_DIRECT_VALUE ));
+                    beans::PropertyValue( aPropNameSupplier.GetName( aMapIter->first ), 0, aMapIter->second.getValue(), beans::PropertyState_DIRECT_VALUE ));
             break;
             case PROP_CHAR_FONT_NAME:
                 if( !isOutlineNumbering())
                 {
                     aNumberingProperties.push_back(
-                        beans::PropertyValue( aPropNameSupplier.GetName( PROP_BULLET_FONT_NAME ), 0, aMapIter->second, beans::PropertyState_DIRECT_VALUE ));
+                        beans::PropertyValue( aPropNameSupplier.GetName( PROP_BULLET_FONT_NAME ), 0, aMapIter->second.getValue(), beans::PropertyState_DIRECT_VALUE ));
                 }
             break;
             default:
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index c016a41..055916b 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -66,7 +66,7 @@ uno::Sequence< beans::PropertyValue > PropertyMap::GetPropertyValues()
     {
         size_t nGrabBag = 0;
         for (PropertyMap::iterator i = begin(); i != end(); ++i)
-            if (i->first.m_bGrabBag)
+            if (i->second.hasGrabBag())
                 nGrabBag++;
         // If there are any grab bag properties, we need one slot for them.
         m_aValues.realloc( size() - nGrabBag + (nGrabBag ? 1 : 0));
@@ -78,26 +78,26 @@ uno::Sequence< beans::PropertyValue > PropertyMap::GetPropertyValues()
         sal_Int32 nValue = 0;
         sal_Int32 nGrabBagValue = 0;
         PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
-        PropertyMap::iterator aParaStyleIter = find(PropertyDefinition( PROP_PARA_STYLE_NAME ) );
+        PropertyMap::iterator aParaStyleIter = find(PROP_PARA_STYLE_NAME);
         if( aParaStyleIter != end())
         {
-            pValues[nValue].Name = rPropNameSupplier.GetName( aParaStyleIter->first.eId );
-            pValues[nValue].Value = aParaStyleIter->second;
+            pValues[nValue].Name = rPropNameSupplier.GetName( aParaStyleIter->first );
+            pValues[nValue].Value = aParaStyleIter->second.getValue();
             ++nValue;
         }
 
-        PropertyMap::iterator aCharStyleIter = find(PropertyDefinition( PROP_CHAR_STYLE_NAME ));
+        PropertyMap::iterator aCharStyleIter = find(PROP_CHAR_STYLE_NAME);
         if( aCharStyleIter != end())
         {
-            pValues[nValue].Name = rPropNameSupplier.GetName( aCharStyleIter->first.eId );
-            pValues[nValue].Value = aCharStyleIter->second;
+            pValues[nValue].Name = rPropNameSupplier.GetName( aCharStyleIter->first );
+            pValues[nValue].Value = aCharStyleIter->second.getValue();
             ++nValue;
         }
-        PropertyMap::iterator aNumRuleIter = find(PropertyDefinition( PROP_NUMBERING_RULES ) );
+        PropertyMap::iterator aNumRuleIter = find(PROP_NUMBERING_RULES);
         if( aNumRuleIter != end())
         {
-            pValues[nValue].Name = rPropNameSupplier.GetName( aNumRuleIter->first.eId );
-            pValues[nValue].Value = aNumRuleIter->second;
+            pValues[nValue].Name = rPropNameSupplier.GetName( aNumRuleIter->first );
+            pValues[nValue].Value = aNumRuleIter->second.getValue();
             ++nValue;
         }
         PropertyMap::iterator aMapIter = begin();
@@ -105,16 +105,16 @@ uno::Sequence< beans::PropertyValue > PropertyMap::GetPropertyValues()
         {
             if( aMapIter != aParaStyleIter && aMapIter != aCharStyleIter && aMapIter != aNumRuleIter )
             {
-                if (!aMapIter->first.m_bGrabBag)
+                if (!aMapIter->second.hasGrabBag())
                 {
-                    pValues[nValue].Name = rPropNameSupplier.GetName( aMapIter->first.eId );
-                    pValues[nValue].Value = aMapIter->second;
+                    pValues[nValue].Name = rPropNameSupplier.GetName( aMapIter->first );
+                    pValues[nValue].Value = aMapIter->second.getValue();
                     ++nValue;
                 }
                 else
                 {
-                    pGrabBagValues[nGrabBagValue].Name = rPropNameSupplier.GetName( aMapIter->first.eId );
-                    pGrabBagValues[nGrabBagValue].Value = aMapIter->second;
+                    pGrabBagValues[nGrabBagValue].Name = rPropNameSupplier.GetName( aMapIter->first );
+                    pGrabBagValues[nGrabBagValue].Value = aMapIter->second.getValue();
                     ++nGrabBagValue;
                 }
             }
@@ -166,16 +166,16 @@ void PropertyMap::Insert( PropertyIds eId, const uno::Any& rAny, bool bOverwrite
     dmapper_logger->endElement();
 #endif
 
-    PropertyMap::iterator aElement = find(PropertyDefinition( eId, bGrabBag ) );
-    if( aElement != end())
+    PropertyMap::iterator aElement = find(eId);
+    if (aElement != end())
     {
-        if(!bOverwrite)
-            return;
-        erase( aElement );
+        if (bOverwrite)
+            aElement->second = PropValue(rAny, bGrabBag);
+
+        return;
     }
-    _PropertyMap::insert( PropertyMap::value_type
-                          (PropertyDefinition( eId, bGrabBag ),
-                           rAny ));
+    _PropertyMap::insert(_PropertyMap::value_type(eId, PropValue(rAny, bGrabBag)));
+
     Invalidate();
 }
 
@@ -190,30 +190,30 @@ void PropertyMap::dumpXml( const TagLogger::Pointer_t pLogger ) const
     {
         pLogger->startElement("property");
 
-        pLogger->attribute("name", rPropNameSupplier.GetName( aMapIter->first.eId ));
+        pLogger->attribute("name", rPropNameSupplier.GetName( aMapIter->first ));
 
-        switch (aMapIter->first.eId)
+        switch (aMapIter->first)
         {
             case PROP_TABLE_COLUMN_SEPARATORS:
-               lcl_DumpTableColumnSeparators(pLogger, aMapIter->second);
+               lcl_DumpTableColumnSeparators(pLogger, aMapIter->second.getValue());
                 break;
             default:
             {
                 try {
                     sal_Int32 aInt = 0;
-                    aMapIter->second >>= aInt;
+                    aMapIter->second.getValue() >>= aInt;
                     pLogger->attribute("value", aInt);
 
                     sal_uInt32 auInt = 0;
-                    aMapIter->second >>= auInt;
+                    aMapIter->second.getValue() >>= auInt;
                     pLogger->attribute("unsignedValue", auInt);
 
                     float aFloat = 0.0;
-                    aMapIter->second >>= aFloat;
+                    aMapIter->second.getValue() >>= aFloat;
                     pLogger->attribute("floatValue", aFloat);
 
                     OUString aStr;
-                    aMapIter->second >>= auInt;
+                    aMapIter->second.getValue() >>= auInt;
                     pLogger->attribute("stringValue", aStr);
                 }
                 catch (...) {
@@ -779,20 +779,20 @@ void SectionPropertyMap::PrepareHeaderFooterProperties( bool bFirstPage )
 
     if( nTopMargin >= 0 ) //fixed height header -> see WW8Par6.hxx
     {
-        operator[]( PropertyDefinition( PROP_HEADER_IS_DYNAMIC_HEIGHT )) = uno::makeAny( true );
-        operator[]( PropertyDefinition( PROP_HEADER_DYNAMIC_SPACING )) = uno::makeAny( true );
-        operator[]( PropertyDefinition( PROP_HEADER_BODY_DISTANCE )) = uno::makeAny( m_nHeaderTop - MIN_HEAD_FOOT_HEIGHT );// ULSpace.Top()
-        operator[]( PropertyDefinition( PROP_HEADER_HEIGHT )) =  uno::makeAny( m_nHeaderTop );
+        operator[](PROP_HEADER_IS_DYNAMIC_HEIGHT) = uno::makeAny( true );
+        operator[](PROP_HEADER_DYNAMIC_SPACING) = uno::makeAny( true );
+        operator[](PROP_HEADER_BODY_DISTANCE) = uno::makeAny( m_nHeaderTop - MIN_HEAD_FOOT_HEIGHT );// ULSpace.Top()
+        operator[](PROP_HEADER_HEIGHT) = uno::makeAny( m_nHeaderTop );
 
     }
     else
     {
         //todo: old filter fakes a frame into the header/footer to support overlapping
         //current setting is completely wrong!
-        operator[]( PropertyDefinition( PROP_HEADER_HEIGHT )) =  uno::makeAny( m_nHeaderTop );
-        operator[]( PropertyDefinition( PROP_HEADER_BODY_DISTANCE )) = uno::makeAny( nTopMargin - m_nHeaderTop );
-        operator[]( PropertyDefinition( PROP_HEADER_IS_DYNAMIC_HEIGHT )) = uno::makeAny( false );
-        operator[]( PropertyDefinition( PROP_HEADER_DYNAMIC_SPACING )) = uno::makeAny( false );
+        operator[](PROP_HEADER_HEIGHT) = uno::makeAny( m_nHeaderTop );
+        operator[](PROP_HEADER_BODY_DISTANCE) = uno::makeAny( nTopMargin - m_nHeaderTop );
+        operator[](PROP_HEADER_IS_DYNAMIC_HEIGHT) = uno::makeAny( false );
+        operator[](PROP_HEADER_DYNAMIC_SPACING) = uno::makeAny( false );
     }
 
     sal_Int32 nBottomMargin = m_nBottomMargin;
@@ -810,24 +810,24 @@ void SectionPropertyMap::PrepareHeaderFooterProperties( bool bFirstPage )
 
     if( nBottomMargin >= 0 ) //fixed height footer -> see WW8Par6.hxx
     {
-        operator[]( PropertyDefinition( PROP_FOOTER_IS_DYNAMIC_HEIGHT )) = uno::makeAny( true );
-        operator[]( PropertyDefinition( PROP_FOOTER_DYNAMIC_SPACING )) = uno::makeAny( true );
-        operator[]( PropertyDefinition( PROP_FOOTER_BODY_DISTANCE )) = uno::makeAny( m_nHeaderBottom - MIN_HEAD_FOOT_HEIGHT);
-        operator[]( PropertyDefinition( PROP_FOOTER_HEIGHT )) =  uno::makeAny( m_nHeaderBottom );
+        operator[](PROP_FOOTER_IS_DYNAMIC_HEIGHT) = uno::makeAny( true );
+        operator[](PROP_FOOTER_DYNAMIC_SPACING) = uno::makeAny( true );
+        operator[](PROP_FOOTER_BODY_DISTANCE) = uno::makeAny( m_nHeaderBottom - MIN_HEAD_FOOT_HEIGHT);
+        operator[](PROP_FOOTER_HEIGHT) = uno::makeAny( m_nHeaderBottom );
     }
     else
     {
         //todo: old filter fakes a frame into the header/footer to support overlapping
         //current setting is completely wrong!
-        operator[]( PropertyDefinition( PROP_FOOTER_IS_DYNAMIC_HEIGHT )) = uno::makeAny( false );
-        operator[]( PropertyDefinition( PROP_FOOTER_DYNAMIC_SPACING )) = uno::makeAny( false );
-        operator[]( PropertyDefinition( PROP_FOOTER_HEIGHT )) =  uno::makeAny( nBottomMargin - m_nHeaderBottom );
-        operator[]( PropertyDefinition( PROP_FOOTER_BODY_DISTANCE )) = uno::makeAny( m_nHeaderBottom );
+        operator[](PROP_FOOTER_IS_DYNAMIC_HEIGHT) = uno::makeAny( false );
+        operator[](PROP_FOOTER_DYNAMIC_SPACING) = uno::makeAny( false );
+        operator[](PROP_FOOTER_HEIGHT) = uno::makeAny( nBottomMargin - m_nHeaderBottom );
+        operator[](PROP_FOOTER_BODY_DISTANCE) = uno::makeAny( m_nHeaderBottom );
     }
 
     //now set the top/bottom margin for the follow page style
-    operator[]( PropertyDefinition( PROP_TOP_MARGIN )) = uno::makeAny( m_nTopMargin );
-    operator[]( PropertyDefinition( PROP_BOTTOM_MARGIN )) = uno::makeAny( m_nBottomMargin );
+    operator[](PROP_TOP_MARGIN) = uno::makeAny( m_nTopMargin );
+    operator[](PROP_BOTTOM_MARGIN) = uno::makeAny( m_nBottomMargin );
 
     // Restore original top margin, so we don't end up with a smaller margin in case we have to produce two page styles from one Word section.
     m_nTopMargin = nTopMargin;
@@ -859,14 +859,14 @@ void SectionPropertyMap::HandleMarginsHeaderFooter(DomainMapper_Impl& rDM_Impl)
         else
             m_nLeftMargin += m_nDzaGutter;
     }
-    operator[]( PropertyDefinition( PROP_LEFT_MARGIN )) =  uno::makeAny( m_nLeftMargin  );
-    operator[]( PropertyDefinition( PROP_RIGHT_MARGIN )) = uno::makeAny( m_nRightMargin );
+    operator[](PROP_LEFT_MARGIN) = uno::makeAny( m_nLeftMargin  );
+    operator[](PROP_RIGHT_MARGIN) = uno::makeAny( m_nRightMargin );
 
     if (rDM_Impl.m_oBackgroundColor)
-        operator[](PropertyDefinition(PROP_BACK_COLOR )) = uno::makeAny(*rDM_Impl.m_oBackgroundColor);
+        operator[](PROP_BACK_COLOR) = uno::makeAny(*rDM_Impl.m_oBackgroundColor);
     if (!rDM_Impl.m_bHasFtnSep)
         // Set footnote line width to zero, document has no footnote separator.
-        operator[](PropertyDefinition(PROP_FOOTNOTE_LINE_RELATIVE_WIDTH)) = uno::makeAny(sal_Int32(0));
+        operator[](PROP_FOOTNOTE_LINE_RELATIVE_WIDTH) = uno::makeAny(sal_Int32(0));
 
     /*** if headers/footers are available then the top/bottom margins of the
       header/footer are copied to the top/bottom margin of the page
@@ -986,19 +986,19 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
 
         //prepare text grid properties
         sal_Int32 nHeight = 1;
-        PropertyMap::iterator aElement = find(PropertyDefinition( PROP_HEIGHT ));
+        PropertyMap::iterator aElement = find(PROP_HEIGHT);
         if( aElement != end())
-            aElement->second >>= nHeight;
+            aElement->second.getValue() >>= nHeight;
 
         sal_Int32 nWidth = 1;
-        aElement = find(PropertyDefinition( PROP_WIDTH ));
+        aElement = find(PROP_WIDTH);
         if( aElement != end())
-            aElement->second >>= nWidth;
+            aElement->second.getValue() >>= nWidth;
 
         text::WritingMode eWritingMode = text::WritingMode_LR_TB;
-        aElement = find(PropertyDefinition( PROP_WRITING_MODE ));
+        aElement = find(PROP_WRITING_MODE);
         if( aElement != end())
-            aElement->second >>= eWritingMode;
+            aElement->second.getValue() >>= eWritingMode;
 
         sal_Int32 nTextAreaHeight = eWritingMode == text::WritingMode_LR_TB ?
             nHeight - m_nTopMargin - m_nBottomMargin :
@@ -1012,7 +1012,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
             nGridLinePitch = 1;
         }
 
-        operator[]( PropertyDefinition( PROP_GRID_LINES )) =
+        operator[](PROP_GRID_LINES) =
                 uno::makeAny( static_cast<sal_Int16>(nTextAreaHeight/nGridLinePitch));
 
         sal_Int32 nCharWidth = 423; //240 twip/ 12 pt
@@ -1020,11 +1020,11 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
         const StyleSheetEntryPtr pEntry = rDM_Impl.GetStyleSheetTable()->FindStyleSheetByISTD(OUString::number(0, 16));
         if( pEntry.get( ) )
         {
-            PropertyMap::iterator aElement_ = pEntry->pProperties->find(PropertyDefinition( PROP_CHAR_HEIGHT_ASIAN ));
+            PropertyMap::iterator aElement_ = pEntry->pProperties->find(PROP_CHAR_HEIGHT_ASIAN);
             if( aElement_ != pEntry->pProperties->end())
             {
                 double fHeight = 0;
-                if( aElement_->second >>= fHeight )
+                if( aElement_->second.getValue() >>= fHeight )
                     nCharWidth = ConversionHelper::convertTwipToMM100( (long)( fHeight * 20.0 + 0.5 ));
             }
         }
@@ -1042,11 +1042,11 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
             nFraction = (nFraction * 20)/0xFFF;
             nCharWidth += ConversionHelper::convertTwipToMM100( nFraction );
         }
-        operator[]( PropertyDefinition( PROP_GRID_BASE_HEIGHT )) = uno::makeAny( nCharWidth );
+        operator[](PROP_GRID_BASE_HEIGHT) = uno::makeAny( nCharWidth );
         sal_Int32 nRubyHeight = nGridLinePitch - nCharWidth;
         if(nRubyHeight < 0 )
             nRubyHeight = 0;
-        operator[]( PropertyDefinition( PROP_GRID_RUBY_HEIGHT )) = uno::makeAny( nRubyHeight );
+        operator[](PROP_GRID_RUBY_HEIGHT) = uno::makeAny( nRubyHeight );
 
         // #i119558#, force to set document as standard page mode,
         // refer to ww8 import process function "SwWW8ImplReader::SetDocumentGrid"
@@ -1055,7 +1055,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
             uno::Reference< beans::XPropertySet > xDocProperties;
             xDocProperties = uno::Reference< beans::XPropertySet >( rDM_Impl.GetTextDocument(), uno::UNO_QUERY_THROW );
             sal_Bool bSquaredPageMode = sal_False;
-            operator[]( PropertyDefinition( PROP_GRID_STANDARD_MODE )) = uno::makeAny( !bSquaredPageMode );
+            operator[](PROP_GRID_STANDARD_MODE) = uno::makeAny( !bSquaredPageMode );
             xDocProperties->setPropertyValue("DefaultPageMode", uno::makeAny( bSquaredPageMode ));
         }
         catch (const uno::Exception& rEx)
@@ -1171,8 +1171,8 @@ void SectionPropertyMap::_ApplyProperties( uno::Reference< beans::XPropertySet >
         PropertyMap::iterator it = this->begin();
         for (size_t i = 0; it != this->end(); ++it, ++i)
         {
-            names[i] = rPropNameSupplier.GetName(it->first.eId);
-            values[i] = it->second;
+            names[i] = rPropNameSupplier.GetName(it->first);
+            values[i] = it->second.getValue();
         }
         try
         {
@@ -1190,7 +1190,7 @@ void SectionPropertyMap::_ApplyProperties( uno::Reference< beans::XPropertySet >
         try
         {
             if (xStyle.is())
-                xStyle->setPropertyValue( rPropNameSupplier.GetName( aMapIter->first.eId ), aMapIter->second );
+                xStyle->setPropertyValue( rPropNameSupplier.GetName( aMapIter->first ), aMapIter->second.getValue() );
         }
         catch( const uno::Exception& )
         {
@@ -1225,7 +1225,7 @@ void SectionPropertyMap::SetFirstPaperBin( sal_Int32 nSet )
 
 sal_Int32 SectionPropertyMap::GetPageWidth()
 {
-    return operator[](PropertyDefinition(PROP_WIDTH)).get<sal_Int32>();
+    return operator[](PROP_WIDTH).getValue().get<sal_Int32>();
 }
 
 StyleSheetPropertyMap::StyleSheetPropertyMap() :
diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx
index f8a4a3f..938b932 100644
--- a/writerfilter/source/dmapper/PropertyMap.hxx
+++ b/writerfilter/source/dmapper/PropertyMap.hxx
@@ -64,23 +64,27 @@ enum BorderPosition
     BORDER_BOTTOM
 };
 
-
-struct PropertyDefinition
+class PropValue
 {
-    PropertyIds eId;
+    uno::Any m_aValue;
     bool m_bGrabBag;
 
-    PropertyDefinition( PropertyIds _eId, bool bGrabBag = false ) :
-        eId( _eId ), m_bGrabBag(bGrabBag){}
+public:
+    PropValue(const uno::Any& rValue, bool bGrabBag = false) :
+        m_aValue(rValue), m_bGrabBag(bGrabBag) {}
+
+    PropValue() : m_aValue(), m_bGrabBag() {}
 
-    bool    operator== (const PropertyDefinition& rDef) const
-            {   return rDef.eId == eId; }
-    bool    operator< (const PropertyDefinition& rDef) const
-            {   return eId < rDef.eId; }
+    const PropValue& operator=(const PropValue& rProp) { m_aValue = rProp.m_aValue; m_bGrabBag = rProp.m_bGrabBag; return *this; }
+
+    const uno::Any& getValue() const { return m_aValue; }
+    bool hasGrabBag() const { return m_bGrabBag; }
 };
-typedef std::map < PropertyDefinition, ::com::sun::star::uno::Any > _PropertyMap;
+typedef std::map< PropertyIds, PropValue > _PropertyMap;
+
 class PropertyMap : public _PropertyMap
 {
+    /// Cache the property values for the GetPropertyValues() call(s).
     ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >   m_aValues;
     //marks context as footnote context - ::text( ) events contain either the footnote character or can be ignored
     //depending on sprmCSymbol
@@ -105,6 +109,7 @@ public:
     /** Add property, usually overwrites already available attributes. It shouldn't overwrite in case of default attributes
      */
     void Insert( PropertyIds eId, const ::com::sun::star::uno::Any& rAny, bool bOverwrite = true, bool bGrabBag = false );
+    void Insert( PropertyIds eId, const PropValue& rValue, bool bOverwrite = true );
     void InsertProps(const boost::shared_ptr<PropertyMap> pMap);
 
     const ::com::sun::star::uno::Reference< ::com::sun::star::text::XFootnote>&  GetFootnote() const;
diff --git a/writerfilter/source/dmapper/SdtHelper.cxx b/writerfilter/source/dmapper/SdtHelper.cxx
index 3dfc493..83ede91 100644
--- a/writerfilter/source/dmapper/SdtHelper.cxx
+++ b/writerfilter/source/dmapper/SdtHelper.cxx
@@ -39,13 +39,13 @@ awt::Size lcl_getOptimalWidth(StyleSheetTablePtr pStyleSheet, OUString& rDefault
 
     PropertyMapPtr pDefaultCharProps = pStyleSheet->GetDefaultCharProps();
     Font aFont(pOut->GetFont());
-    PropertyMap::iterator aFontName = pDefaultCharProps->find(PropertyDefinition(PROP_CHAR_FONT_NAME));
+    PropertyMap::iterator aFontName = pDefaultCharProps->find(PROP_CHAR_FONT_NAME);
     if (aFontName != pDefaultCharProps->end())
-        aFont.SetName(aFontName->second.get<OUString>());
-    PropertyMap::iterator aHeight = pDefaultCharProps->find(PropertyDefinition(PROP_CHAR_HEIGHT));
+        aFont.SetName(aFontName->second.getValue().get<OUString>());
+    PropertyMap::iterator aHeight = pDefaultCharProps->find(PROP_CHAR_HEIGHT);
     if (aHeight != pDefaultCharProps->end())
     {
-        nHeight = aHeight->second.get<double>() * 35; // points -> mm100
+        nHeight = aHeight->second.getValue().get<double>() * 35; // points -> mm100
         aFont.SetSize(Size(0, nHeight));
     }
     pOut->SetFont(aFont);
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index acb45f6..bbbb2d1 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -119,10 +119,10 @@ void TableStyleSheetEntry::AddTblStylePr( TblStyleType nType, PropertyMapPtr pPr
         if ( nType == pTypesToFix[i] )
         {
             PropertyIds nChecked = pPropsToCheck[i];
-            PropertyMap::iterator pCheckedIt = pProps->find( PropertyDefinition( nChecked )  );
+            PropertyMap::iterator pCheckedIt = pProps->find(nChecked);
 
             PropertyIds nInsideProp = ( i < 2 ) ? META_PROP_HORIZONTAL_BORDER : META_PROP_VERTICAL_BORDER;
-            PropertyMap::iterator pInsideIt = pProps->find( PropertyDefinition( nInsideProp )  );
+            PropertyMap::iterator pInsideIt = pProps->find(nInsideProp);
 
             bool bHasChecked = pCheckedIt != pProps->end( );
             bool bHasInside = pInsideIt != pProps->end( );
@@ -194,18 +194,17 @@ void lcl_mergeProps( PropertyMapPtr pToFill,  PropertyMapPtr pToAdd, TblStyleTyp
     for ( unsigned i = 0 ; i != sizeof(pPropsToCheck) / sizeof(PropertyIds); i++ )
     {
         PropertyIds nId = pPropsToCheck[i];
-        PropertyDefinition aProp( nId );
-        PropertyMap::iterator pIt = pToAdd->find( aProp );
+        PropertyMap::iterator pIt = pToAdd->find(nId);
 
         if ( pIt != pToAdd->end( ) )
         {
-            PropertyMap::iterator pDestIt = pToFill->find( aProp );
+            PropertyMap::iterator pDestIt = pToFill->find(nId);
 
             if ( pRemoveInside[i] )
             {
                 // Remove the insideH and insideV depending on the cell pos
                 PropertyIds nInsideProp = ( i < 2 ) ? META_PROP_HORIZONTAL_BORDER : META_PROP_VERTICAL_BORDER;
-                pDestIt = pToFill->find( PropertyDefinition( nInsideProp ) );
+                pDestIt = pToFill->find(nInsideProp);
                 if ( pDestIt != pToFill->end( ) )
                     pToFill->erase( pDestIt );
             }
@@ -1300,7 +1299,7 @@ void StyleSheetTable::applyDefaults(bool bParaProperties)
             {
                 try
                 {
-                    m_pImpl->m_xTextDefaults->setPropertyValue(rPropNameSupplier.GetName( aMapIter->first.eId ), aMapIter->second);
+                    m_pImpl->m_xTextDefaults->setPropertyValue(rPropNameSupplier.GetName( aMapIter->first ), aMapIter->second.getValue());
                 }
                 catch( const uno::Exception& )
                 {
@@ -1315,7 +1314,7 @@ void StyleSheetTable::applyDefaults(bool bParaProperties)
             {
                 try
                 {
-                    m_pImpl->m_xTextDefaults->setPropertyValue(rPropNameSupplier.GetName( aMapIter->first.eId ), aMapIter->second);
+                    m_pImpl->m_xTextDefaults->setPropertyValue(rPropNameSupplier.GetName( aMapIter->first ), aMapIter->second.getValue());
                 }
                 catch( const uno::Exception& )
                 {


More information about the Libreoffice-commits mailing list