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

Miklos Vajna vmiklos at suse.cz
Thu Jul 4 01:37:20 PDT 2013


 writerfilter/source/dmapper/DomainMapper.cxx             |   14 +--
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx |   28 +++---
 writerfilter/source/dmapper/DomainMapper_Impl.cxx        |   10 +-
 writerfilter/source/dmapper/PropertyMap.cxx              |   70 +++++++--------
 writerfilter/source/dmapper/PropertyMap.hxx              |    6 -
 writerfilter/source/dmapper/SdtHelper.cxx                |    4 
 writerfilter/source/dmapper/StyleSheetTable.cxx          |    8 -
 7 files changed, 69 insertions(+), 71 deletions(-)

New commits:
commit 25bfc4a4e6fd34c10d352c87e38e36c9303edfd2
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Thu Jul 4 10:30:42 2013 +0200

    writerfilter::dmapper::PropertyDefinition::bIsTextProperty is never read
    
    Change-Id: I9d0ce39c1c47d8b89bd675ce91f6cfe2e9c3a061

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index de0783b..4a932d5 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -988,7 +988,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
             PropertyMap::iterator aLineSpacingIter;
             if (pTopContext)
             {
-                aLineSpacingIter = pTopContext->find(PropertyDefinition( PROP_PARA_LINE_SPACING, true ) );
+                aLineSpacingIter = pTopContext->find(PropertyDefinition( PROP_PARA_LINE_SPACING ) );
                 bFound = aLineSpacingIter != pTopContext->end();
             }
             if (bFound)
@@ -1521,7 +1521,7 @@ sal_Int32 lcl_getCurrentNumberingProperty(uno::Reference<container::XIndexAccess
 static bool ExchangeLeftRight( const PropertyMapPtr rContext )
 {
     bool bExchangeLeftRight = false;
-    PropertyMap::const_iterator aPropParaIte = rContext->find( PropertyDefinition( PROP_WRITING_MODE, false ));
+    PropertyMap::const_iterator aPropParaIte = rContext->find( PropertyDefinition( PROP_WRITING_MODE ));
     if( aPropParaIte != rContext->end())
     {
         sal_Int32 aAdjust ;
@@ -1609,7 +1609,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
                     uno::Any aRules = uno::makeAny( pList->GetNumberingRules( ) );
                     rContext->Insert( PROP_NUMBERING_RULES, true, aRules );
                     // erase numbering from pStyle if already set
-                    rContext->erase( PropertyDefinition( PROP_NUMBERING_STYLE_NAME, true ));
+                    rContext->erase( PropertyDefinition( PROP_NUMBERING_STYLE_NAME ));
                 }
             }
             else
@@ -3089,7 +3089,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
             m_pImpl->GetTopContext()->Insert( PROP_PARA_STYLE_NAME, true, 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, true )) == rContext->end()) // !contains
+        if( rContext->find( PropertyDefinition( PROP_NUMBERING_RULES )) == rContext->end()) // !contains
         {
             const StyleSheetEntryPtr pEntry = pStyleTable->FindStyleSheetByISTD(sStringValue);
             OSL_ENSURE( pEntry.get(), "no style sheet found" );
@@ -3106,8 +3106,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, true )) != pParentProperties->end())
-                        nParaRightMargin = pParentProperties->find( PropertyDefinition( PROP_PARA_RIGHT_MARGIN, true ))->second.get<sal_Int32>();
+                    if (pParentProperties->find( PropertyDefinition( PROP_PARA_RIGHT_MARGIN )) != pParentProperties->end())
+                        nParaRightMargin = pParentProperties->find( PropertyDefinition( PROP_PARA_RIGHT_MARGIN ))->second.get<sal_Int32>();
                 }
                 if (nParaRightMargin != 0)
                 {
@@ -3426,7 +3426,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, false ));
+                PropertyMap::iterator aDefaultFont = pDefaultCharProps->find(PropertyDefinition( PROP_CHAR_HEIGHT ));
                 if( font != deferredCharacterProperties.end())
                 {
                     double fontSize = 0;
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 7586396..ec763f8 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -128,7 +128,7 @@ PropertyMapPtr lcl_SearchParentStyleSheetAndMergeProperties(const StyleSheetEntr
 
 void lcl_mergeBorder( PropertyIds nId, PropertyMapPtr pOrig, PropertyMapPtr pDest )
 {
-    PropertyDefinition aDef( nId, false );
+    PropertyDefinition aDef( nId );
     PropertyMap::iterator pOrigIt = pOrig->find( aDef );
 
     if ( pOrigIt != pOrig->end( ) )
@@ -140,8 +140,8 @@ void lcl_mergeBorder( PropertyIds nId, PropertyMapPtr pOrig, PropertyMapPtr pDes
 void lcl_computeCellBorders( PropertyMapPtr pTableBorders, PropertyMapPtr pCellProps,
         sal_Int32 nCell, sal_Int32 nRow, bool bIsEndCol, bool bIsEndRow )
 {
-    PropertyDefinition aVertPDef( META_PROP_VERTICAL_BORDER, false );
-    PropertyDefinition aHorizPDef( META_PROP_HORIZONTAL_BORDER, false );
+    PropertyDefinition aVertPDef( META_PROP_VERTICAL_BORDER );
+    PropertyDefinition aHorizPDef( META_PROP_HORIZONTAL_BORDER );
 
     PropertyMap::iterator aVerticalIter = pCellProps->find( aVertPDef );
     PropertyMap::iterator aHorizontalIter = pCellProps->find( aHorizPDef );
@@ -290,13 +290,13 @@ namespace
 
 bool lcl_extractTableBorderProperty(PropertyMapPtr pTableProperties, const PropertyIds nId, TableInfo& rInfo, table::BorderLine2& rLine)
 {
-    PropertyMap::iterator aTblBorderIter = pTableProperties->find( PropertyDefinition(nId, false) );
+    PropertyMap::iterator aTblBorderIter = pTableProperties->find( PropertyDefinition(nId) );
     if( aTblBorderIter != pTableProperties->end() )
     {
         OSL_VERIFY(aTblBorderIter->second >>= rLine);
 
         rInfo.pTableBorders->Insert( nId, false, uno::makeAny( rLine ) );
-        PropertyMap::iterator pIt = rInfo.pTableDefaults->find( PropertyDefinition( nId, false ) );
+        PropertyMap::iterator pIt = rInfo.pTableDefaults->find( PropertyDefinition( nId ) );
         if ( pIt != rInfo.pTableDefaults->end( ) )
             rInfo.pTableDefaults->erase( pIt );
 
@@ -324,7 +324,7 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo
         sal_Int32 nTableWidthType = text::SizeType::FIX;
 
         PropertyMap::iterator aTableStyleIter =
-        m_aTableProperties->find( PropertyDefinition( META_PROP_TABLE_STYLE_NAME, false ) );
+        m_aTableProperties->find( PropertyDefinition( META_PROP_TABLE_STYLE_NAME ) );
         if(aTableStyleIter != m_aTableProperties->end())
         {
             // Apply table style properties recursively
@@ -363,7 +363,7 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo
         }
 
         PropertyMap::iterator const aTblLookIter =
-            m_aTableProperties->find(PropertyDefinition(PROP_TBL_LOOK, false));
+            m_aTableProperties->find(PropertyDefinition(PROP_TBL_LOOK));
         if(aTblLookIter != m_aTableProperties->end())
         {
             aTblLookIter->second >>= rInfo.nTblLook;
@@ -487,7 +487,7 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo
 
         //fill default value - if not available
         const PropertyMap::const_iterator aRepeatIter =
-        m_aTableProperties->find( PropertyDefinition( PROP_HEADER_ROW_COUNT, false ) );
+        m_aTableProperties->find( PropertyDefinition( PROP_HEADER_ROW_COUNT ) );
         if( aRepeatIter == m_aTableProperties->end() )
             m_aTableProperties->Insert( PROP_HEADER_ROW_COUNT, false, uno::makeAny( (sal_Int32)0 ));
 
@@ -633,7 +633,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, false ) );
+                        PropertyDefinition( PROP_HEADER_ROW_COUNT ) );
                 if ( aDefaultRepeatIt != pAllCellProps->end( ) )
                     pAllCellProps->erase( aDefaultRepeatIt );
 
@@ -651,24 +651,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, false) );
+                aCellIterator->get()->find( PropertyDefinition(PROP_LEFT_BORDER_DISTANCE) );
                 if( aLeftDistanceIter == aCellIterator->get()->end() )
                     aCellIterator->get()->Insert( PROP_LEFT_BORDER_DISTANCE, false,
                                                  uno::makeAny(rInfo.nLeftBorderDistance ) );
                 const PropertyMap::const_iterator aRightDistanceIter =
-                aCellIterator->get()->find( PropertyDefinition(PROP_RIGHT_BORDER_DISTANCE, false) );
+                aCellIterator->get()->find( PropertyDefinition(PROP_RIGHT_BORDER_DISTANCE) );
                 if( aRightDistanceIter == aCellIterator->get()->end() )
                     aCellIterator->get()->Insert( PROP_RIGHT_BORDER_DISTANCE, false,
                                                  uno::makeAny((sal_Int32) rInfo.nRightBorderDistance ) );
 
                 const PropertyMap::const_iterator aTopDistanceIter =
-                aCellIterator->get()->find( PropertyDefinition(PROP_TOP_BORDER_DISTANCE, false) );
+                aCellIterator->get()->find( PropertyDefinition(PROP_TOP_BORDER_DISTANCE) );
                 if( aTopDistanceIter == aCellIterator->get()->end() )
                     aCellIterator->get()->Insert( PROP_TOP_BORDER_DISTANCE, false,
                                                  uno::makeAny((sal_Int32) rInfo.nTopBorderDistance ) );
 
                 const PropertyMap::const_iterator aBottomDistanceIter =
-                aCellIterator->get()->find( PropertyDefinition(PROP_BOTTOM_BORDER_DISTANCE, false) );
+                aCellIterator->get()->find( PropertyDefinition(PROP_BOTTOM_BORDER_DISTANCE) );
                 if( aBottomDistanceIter == aCellIterator->get()->end() )
                     aCellIterator->get()->Insert( PROP_BOTTOM_BORDER_DISTANCE, false,
                                                  uno::makeAny((sal_Int32) rInfo.nBottomBorderDistance ) );
@@ -733,7 +733,7 @@ RowPropertyValuesSeq_t DomainMapperTableHandler::endTableGetRowProperties()
         if( aRowIter->get() )
         {
             //set default to 'break across pages"
-            if( aRowIter->get()->find( PropertyDefinition( PROP_IS_SPLIT_ALLOWED, false )) == aRowIter->get()->end())
+            if( aRowIter->get()->find( PropertyDefinition( PROP_IS_SPLIT_ALLOWED )) == aRowIter->get()->end())
                 aRowIter->get()->Insert( PROP_IS_SPLIT_ALLOWED, false, 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 0ffbc93..af47f15 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -593,7 +593,7 @@ uno::Any DomainMapper_Impl::GetPropertyFromStyleSheet(PropertyIds eId)
         if(pEntry->pProperties)
         {
             PropertyMap::const_iterator aPropertyIter =
-                    pEntry->pProperties->find(PropertyDefinition(eId, false ));
+                    pEntry->pProperties->find(PropertyDefinition(eId));
             if( aPropertyIter != pEntry->pProperties->end())
             {
                 return aPropertyIter->second;
@@ -734,7 +734,7 @@ void lcl_AddRangeAndStyle(
     pToBeSavedProperties->SetStartingRange(xParaCursor->getStart());
     if(pPropertyMap)
     {
-        PropertyMap::iterator aParaStyleIter = pPropertyMap->find(PropertyDefinition( PROP_PARA_STYLE_NAME, false ) );
+        PropertyMap::iterator aParaStyleIter = pPropertyMap->find(PropertyDefinition( PROP_PARA_STYLE_NAME ) );
         if( aParaStyleIter != pPropertyMap->end())
         {
             OUString sName;
@@ -2026,7 +2026,7 @@ bool lcl_FindInCommand(
 void DomainMapper_Impl::GetCurrentLocale(lang::Locale& rLocale)
 {
     PropertyMapPtr pTopContext = GetTopContext();
-    PropertyDefinition aCharLocale( PROP_CHAR_LOCALE, true );
+    PropertyDefinition aCharLocale( PROP_CHAR_LOCALE );
     PropertyMap::iterator aLocaleIter = pTopContext->find( aCharLocale );
     if( aLocaleIter != pTopContext->end())
         aLocaleIter->second >>= rLocale;
@@ -3963,11 +3963,11 @@ sal_Int32 DomainMapper_Impl::getCurrentNumberingProperty(OUString aProp)
 {
     sal_Int32 nRet = 0;
 
-    PropertyMap::iterator it = m_pTopContext->find(PropertyDefinition( PROP_NUMBERING_RULES, true ) );
+    PropertyMap::iterator it = m_pTopContext->find(PropertyDefinition( 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, true ) );
+    it = m_pTopContext->find(PropertyDefinition( PROP_NUMBERING_LEVEL ) );
     sal_Int32 nNumberingLevel = -1;
     if (it != m_pTopContext->end())
         it->second >>= nNumberingLevel;
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index cfa2d88..3b69a86 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -70,7 +70,7 @@ uno::Sequence< beans::PropertyValue > PropertyMap::GetPropertyValues()
         //otherwise they will overwrite 'hard' attributes
         sal_Int32 nValue = 0;
         PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
-        PropertyMap::iterator aParaStyleIter = find(PropertyDefinition( PROP_PARA_STYLE_NAME, false ) );
+        PropertyMap::iterator aParaStyleIter = find(PropertyDefinition( PROP_PARA_STYLE_NAME ) );
         if( aParaStyleIter != end())
         {
             pValues[nValue].Name = rPropNameSupplier.GetName( aParaStyleIter->first.eId );
@@ -78,14 +78,14 @@ uno::Sequence< beans::PropertyValue > PropertyMap::GetPropertyValues()
             ++nValue;
         }
 
-        PropertyMap::iterator aCharStyleIter = find(PropertyDefinition( PROP_CHAR_STYLE_NAME, false ));
+        PropertyMap::iterator aCharStyleIter = find(PropertyDefinition( PROP_CHAR_STYLE_NAME ));
         if( aCharStyleIter != end())
         {
             pValues[nValue].Name = rPropNameSupplier.GetName( aCharStyleIter->first.eId );
             pValues[nValue].Value = aCharStyleIter->second;
             ++nValue;
         }
-        PropertyMap::iterator aNumRuleIter = find(PropertyDefinition( PROP_NUMBERING_RULES, false ) );
+        PropertyMap::iterator aNumRuleIter = find(PropertyDefinition( PROP_NUMBERING_RULES ) );
         if( aNumRuleIter != end())
         {
             pValues[nValue].Name = rPropNameSupplier.GetName( aNumRuleIter->first.eId );
@@ -131,7 +131,7 @@ static void lcl_AnyToTag(const uno::Any & rAny)
 }
 #endif
 
-void PropertyMap::Insert( PropertyIds eId, bool bIsTextProperty, const uno::Any& rAny, bool bOverwrite )
+void PropertyMap::Insert( PropertyIds eId, bool /*bIsTextProperty*/, const uno::Any& rAny, bool bOverwrite )
 {
 #ifdef DEBUG_DMAPPER_PROPERTY_MAP
     const OUString& rInsert = PropertyNameSupplier::
@@ -143,7 +143,7 @@ void PropertyMap::Insert( PropertyIds eId, bool bIsTextProperty, const uno::Any&
     dmapper_logger->endElement();
 #endif
 
-    PropertyMap::iterator aElement = find(PropertyDefinition( eId, bIsTextProperty ) );
+    PropertyMap::iterator aElement = find(PropertyDefinition( eId ) );
     if( aElement != end())
     {
         if(!bOverwrite)
@@ -151,7 +151,7 @@ void PropertyMap::Insert( PropertyIds eId, bool bIsTextProperty, const uno::Any&
         erase( aElement );
     }
     _PropertyMap::insert( PropertyMap::value_type
-                          (PropertyDefinition( eId, bIsTextProperty),
+                          (PropertyDefinition( eId ),
                            rAny ));
     Invalidate();
 }
@@ -750,20 +750,20 @@ void SectionPropertyMap::PrepareHeaderFooterProperties( bool bFirstPage )
 
     if( nTopMargin >= 0 ) //fixed height header -> see WW8Par6.hxx
     {
-        operator[]( PropertyDefinition( PROP_HEADER_IS_DYNAMIC_HEIGHT, false )) = uno::makeAny( true );
-        operator[]( PropertyDefinition( PROP_HEADER_DYNAMIC_SPACING, false )) = uno::makeAny( true );
-        operator[]( PropertyDefinition( PROP_HEADER_BODY_DISTANCE, false )) = uno::makeAny( m_nHeaderTop - MIN_HEAD_FOOT_HEIGHT );// ULSpace.Top()
-        operator[]( PropertyDefinition( PROP_HEADER_HEIGHT, false )) =  uno::makeAny( m_nHeaderTop );
+        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 );
 
     }
     else
     {
         //todo: old filter fakes a frame into the header/footer to support overlapping
         //current setting is completely wrong!
-        operator[]( PropertyDefinition( PROP_HEADER_HEIGHT, false )) =  uno::makeAny( m_nHeaderTop );
-        operator[]( PropertyDefinition( PROP_HEADER_BODY_DISTANCE, false )) = uno::makeAny( nTopMargin - m_nHeaderTop );
-        operator[]( PropertyDefinition( PROP_HEADER_IS_DYNAMIC_HEIGHT, false)) = uno::makeAny( false );
-        operator[]( PropertyDefinition( PROP_HEADER_DYNAMIC_SPACING, false)) = uno::makeAny( false );
+        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 );
     }
 
     sal_Int32 nBottomMargin = m_nBottomMargin;
@@ -781,24 +781,24 @@ void SectionPropertyMap::PrepareHeaderFooterProperties( bool bFirstPage )
 
     if( nBottomMargin >= 0 ) //fixed height footer -> see WW8Par6.hxx
     {
-        operator[]( PropertyDefinition( PROP_FOOTER_IS_DYNAMIC_HEIGHT, false )) = uno::makeAny( true );
-        operator[]( PropertyDefinition( PROP_FOOTER_DYNAMIC_SPACING, false )) = uno::makeAny( true );
-        operator[]( PropertyDefinition( PROP_FOOTER_BODY_DISTANCE, false )) = uno::makeAny( m_nHeaderBottom - MIN_HEAD_FOOT_HEIGHT);
-        operator[]( PropertyDefinition( PROP_FOOTER_HEIGHT, false )) =  uno::makeAny( m_nHeaderBottom );
+        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 );
     }
     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, false)) = uno::makeAny( false );
-        operator[]( PropertyDefinition( PROP_FOOTER_DYNAMIC_SPACING, false)) = uno::makeAny( false );
-        operator[]( PropertyDefinition( PROP_FOOTER_HEIGHT, false )) =  uno::makeAny( nBottomMargin - m_nHeaderBottom );
-        operator[]( PropertyDefinition( PROP_FOOTER_BODY_DISTANCE, false )) = uno::makeAny( m_nHeaderBottom );
+        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 );
     }
 
     //now set the top/bottom margin for the follow page style
-    operator[]( PropertyDefinition( PROP_TOP_MARGIN, false )) = uno::makeAny( m_nTopMargin );
-    operator[]( PropertyDefinition( PROP_BOTTOM_MARGIN, false )) = uno::makeAny( m_nBottomMargin );
+    operator[]( PropertyDefinition( PROP_TOP_MARGIN )) = uno::makeAny( m_nTopMargin );
+    operator[]( PropertyDefinition( 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;
@@ -907,11 +907,11 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
             else
                 m_nLeftMargin += m_nDzaGutter;
         }
-        operator[]( PropertyDefinition( PROP_LEFT_MARGIN, false )) =  uno::makeAny( m_nLeftMargin  );
-        operator[]( PropertyDefinition( PROP_RIGHT_MARGIN, false )) = uno::makeAny( m_nRightMargin );
+        operator[]( PropertyDefinition( PROP_LEFT_MARGIN )) =  uno::makeAny( m_nLeftMargin  );
+        operator[]( PropertyDefinition( PROP_RIGHT_MARGIN )) = uno::makeAny( m_nRightMargin );
 
         if (rDM_Impl.m_oBackgroundColor)
-            operator[](PropertyDefinition(PROP_BACK_COLOR, false)) = uno::makeAny(*rDM_Impl.m_oBackgroundColor);
+            operator[](PropertyDefinition(PROP_BACK_COLOR )) = uno::makeAny(*rDM_Impl.m_oBackgroundColor);
 
         /*** if headers/footers are available then the top/bottom margins of the
             header/footer are copied to the top/bottom margin of the page
@@ -928,17 +928,17 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
 
         //prepare text grid properties
         sal_Int32 nHeight = 1;
-        PropertyMap::iterator aElement = find(PropertyDefinition( PROP_HEIGHT, false ));
+        PropertyMap::iterator aElement = find(PropertyDefinition( PROP_HEIGHT ));
         if( aElement != end())
             aElement->second >>= nHeight;
 
         sal_Int32 nWidth = 1;
-        aElement = find(PropertyDefinition( PROP_WIDTH, false ));
+        aElement = find(PropertyDefinition( PROP_WIDTH ));
         if( aElement != end())
             aElement->second >>= nWidth;
 
         text::WritingMode eWritingMode = text::WritingMode_LR_TB;
-        aElement = find(PropertyDefinition( PROP_WRITING_MODE, false ));
+        aElement = find(PropertyDefinition( PROP_WRITING_MODE ));
         if( aElement != end())
             aElement->second >>= eWritingMode;
 
@@ -954,7 +954,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
             nGridLinePitch = 1;
         }
 
-        operator[]( PropertyDefinition( PROP_GRID_LINES, false )) =
+        operator[]( PropertyDefinition( PROP_GRID_LINES )) =
                 uno::makeAny( static_cast<sal_Int16>(nTextAreaHeight/nGridLinePitch));
 
         sal_Int32 nCharWidth = 423; //240 twip/ 12 pt
@@ -962,7 +962,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
         const StyleSheetEntryPtr pEntry = rDM_Impl.GetStyleSheetTable()->FindStyleSheetByISTD(OUString::valueOf(static_cast<sal_Int32>(0), 16));
         if( pEntry.get( ) )
         {
-            PropertyMap::iterator aElement_ = pEntry->pProperties->find(PropertyDefinition( PROP_CHAR_HEIGHT_ASIAN, false ));
+            PropertyMap::iterator aElement_ = pEntry->pProperties->find(PropertyDefinition( PROP_CHAR_HEIGHT_ASIAN ));
             if( aElement_ != pEntry->pProperties->end())
             {
                 double fHeight = 0;
@@ -984,11 +984,11 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
             nFraction = (nFraction * 20)/0xFFF;
             nCharWidth += ConversionHelper::convertTwipToMM100( nFraction );
         }
-        operator[]( PropertyDefinition( PROP_GRID_BASE_HEIGHT, false )) = uno::makeAny( nCharWidth );
+        operator[]( PropertyDefinition( PROP_GRID_BASE_HEIGHT )) = uno::makeAny( nCharWidth );
         sal_Int32 nRubyHeight = nGridLinePitch - nCharWidth;
         if(nRubyHeight < 0 )
             nRubyHeight = 0;
-        operator[]( PropertyDefinition( PROP_GRID_RUBY_HEIGHT, false )) = uno::makeAny( nRubyHeight );
+        operator[]( PropertyDefinition( PROP_GRID_RUBY_HEIGHT )) = uno::makeAny( nRubyHeight );
 
         // #i119558#, force to set document as standard page mode,
         // refer to ww8 import process function "SwWW8ImplReader::SetDocumentGrid"
@@ -997,7 +997,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, false )) = uno::makeAny( !bSquaredPageMode );
+            operator[]( PropertyDefinition( PROP_GRID_STANDARD_MODE )) = uno::makeAny( !bSquaredPageMode );
             xDocProperties->setPropertyValue("DefaultPageMode", uno::makeAny( bSquaredPageMode ));
         }
         catch (const uno::Exception& rEx)
diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx
index e48c5c5..e9a7a7a 100644
--- a/writerfilter/source/dmapper/PropertyMap.hxx
+++ b/writerfilter/source/dmapper/PropertyMap.hxx
@@ -67,11 +67,9 @@ enum BorderPosition
 struct PropertyDefinition
 {
     PropertyIds eId;
-    bool        bIsTextProperty;
 
-    PropertyDefinition( PropertyIds _eId, bool _bIsTextProperty ) :
-        eId( _eId ),
-        bIsTextProperty( _bIsTextProperty ){}
+    PropertyDefinition( PropertyIds _eId ) :
+        eId( _eId ){}
 
     bool    operator== (const PropertyDefinition& rDef) const
             {   return rDef.eId == eId; }
diff --git a/writerfilter/source/dmapper/SdtHelper.cxx b/writerfilter/source/dmapper/SdtHelper.cxx
index 58c092f..3dfc493 100644
--- a/writerfilter/source/dmapper/SdtHelper.cxx
+++ b/writerfilter/source/dmapper/SdtHelper.cxx
@@ -39,10 +39,10 @@ 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, false));
+    PropertyMap::iterator aFontName = pDefaultCharProps->find(PropertyDefinition(PROP_CHAR_FONT_NAME));
     if (aFontName != pDefaultCharProps->end())
         aFont.SetName(aFontName->second.get<OUString>());
-    PropertyMap::iterator aHeight = pDefaultCharProps->find(PropertyDefinition(PROP_CHAR_HEIGHT, false));
+    PropertyMap::iterator aHeight = pDefaultCharProps->find(PropertyDefinition(PROP_CHAR_HEIGHT));
     if (aHeight != pDefaultCharProps->end())
     {
         nHeight = aHeight->second.get<double>() * 35; // points -> mm100
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 8352b1b..d45a5fe 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -118,10 +118,10 @@ void TableStyleSheetEntry::AddTblStylePr( TblStyleType nType, PropertyMapPtr pPr
         if ( nType == pTypesToFix[i] )
         {
             PropertyIds nChecked = pPropsToCheck[i];
-            PropertyMap::iterator pCheckedIt = pProps->find( PropertyDefinition( nChecked, false )  );
+            PropertyMap::iterator pCheckedIt = pProps->find( PropertyDefinition( nChecked )  );
 
             PropertyIds nInsideProp = ( i < 2 ) ? META_PROP_HORIZONTAL_BORDER : META_PROP_VERTICAL_BORDER;
-            PropertyMap::iterator pInsideIt = pProps->find( PropertyDefinition( nInsideProp, false )  );
+            PropertyMap::iterator pInsideIt = pProps->find( PropertyDefinition( nInsideProp )  );
 
             bool bHasChecked = pCheckedIt != pProps->end( );
             bool bHasInside = pInsideIt != pProps->end( );
@@ -193,7 +193,7 @@ 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, false );
+        PropertyDefinition aProp( nId );
         PropertyMap::iterator pIt = pToAdd->find( aProp );
 
         if ( pIt != pToAdd->end( ) )
@@ -204,7 +204,7 @@ void lcl_mergeProps( PropertyMapPtr pToFill,  PropertyMapPtr pToAdd, TblStyleTyp
             {
                 // 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, false ) );
+                pDestIt = pToFill->find( PropertyDefinition( nInsideProp ) );
                 if ( pDestIt != pToFill->end( ) )
                     pToFill->erase( pDestIt );
             }


More information about the Libreoffice-commits mailing list