diff options
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 26 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.hxx | 4 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapperTableHandler.cxx | 12 | ||||
-rw-r--r-- | writerfilter/source/dmapper/PropertyMap.cxx | 12 | ||||
-rw-r--r-- | writerfilter/source/dmapper/PropertyMap.hxx | 2 | ||||
-rw-r--r-- | writerfilter/source/dmapper/PropertyMapHelper.cxx | 2 | ||||
-rw-r--r-- | writerfilter/source/dmapper/PropertyMapHelper.hxx | 2 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx | 4 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx | 4 |
9 files changed, 33 insertions, 35 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 4e2bf14d0fbb..de167850a28f 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -1089,7 +1089,7 @@ sal_Int32 lcl_getCurrentNumberingProperty( } // In rtl-paragraphs the meaning of left/right are to be exchanged -static bool ExchangeLeftRight( const PropertyMapPtr rContext, DomainMapper_Impl* m_pImpl ) +static bool ExchangeLeftRight(const PropertyMapPtr& rContext, DomainMapper_Impl* m_pImpl) { bool bExchangeLeftRight = false; boost::optional<PropertyMap::Property> aPropPara = rContext->getProperty(PROP_WRITING_MODE); @@ -1118,9 +1118,9 @@ static bool ExchangeLeftRight( const PropertyMapPtr rContext, DomainMapper_Impl* } /// Check if the style or its parent has a list id, recursively. -static sal_Int32 lcl_getListId(const StyleSheetEntryPtr pEntry, const StyleSheetTablePtr pStyleTable) +static sal_Int32 lcl_getListId(const StyleSheetEntryPtr& rEntry, const StyleSheetTablePtr& rStyleTable) { - const StyleSheetPropertyMap* pEntryProperties = dynamic_cast<const StyleSheetPropertyMap*>(pEntry->pProperties.get()); + const StyleSheetPropertyMap* pEntryProperties = dynamic_cast<const StyleSheetPropertyMap*>(rEntry->pProperties.get()); if (!pEntryProperties) return -1; @@ -1130,15 +1130,15 @@ static sal_Int32 lcl_getListId(const StyleSheetEntryPtr pEntry, const StyleSheet return nListId; // The style has no parent. - if (pEntry->sBaseStyleIdentifier.isEmpty()) + if (rEntry->sBaseStyleIdentifier.isEmpty()) return -1; - const StyleSheetEntryPtr pParent = pStyleTable->FindStyleSheetByISTD(pEntry->sBaseStyleIdentifier); + const StyleSheetEntryPtr pParent = rStyleTable->FindStyleSheetByISTD(rEntry->sBaseStyleIdentifier); // No such parent style or loop in the style hierarchy. - if (!pParent || pParent == pEntry) + if (!pParent || pParent == rEntry) return -1; - return lcl_getListId(pParent, pStyleTable); + return lcl_getListId(pParent, rStyleTable); } void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext ) @@ -3171,7 +3171,7 @@ void DomainMapper::lcl_info(const std::string & /*info_*/) { } -void DomainMapper::handleUnderlineType(const Id nId, const ::std::shared_ptr<PropertyMap> pContext) +void DomainMapper::handleUnderlineType(const Id nId, const ::std::shared_ptr<PropertyMap>& rContext) { sal_Int16 nUnderline = awt::FontUnderline::NONE; @@ -3181,7 +3181,7 @@ void DomainMapper::handleUnderlineType(const Id nId, const ::std::shared_ptr<Pro nUnderline = awt::FontUnderline::NONE; break; case NS_ooxml::LN_Value_ST_Underline_words: - pContext->Insert(PROP_CHAR_WORD_MODE, uno::makeAny(true)); + rContext->Insert(PROP_CHAR_WORD_MODE, uno::makeAny(true)); // fall-through intended case NS_ooxml::LN_Value_ST_Underline_single: nUnderline = awt::FontUnderline::SINGLE; @@ -3232,10 +3232,10 @@ void DomainMapper::handleUnderlineType(const Id nId, const ::std::shared_ptr<Pro nUnderline = awt::FontUnderline::DOUBLEWAVE; break; } - pContext->Insert(PROP_CHAR_UNDERLINE, uno::makeAny(nUnderline)); + rContext->Insert(PROP_CHAR_UNDERLINE, uno::makeAny(nUnderline)); } -void DomainMapper::handleParaJustification(const sal_Int32 nIntValue, const ::std::shared_ptr<PropertyMap> pContext, const bool bExchangeLeftRight) +void DomainMapper::handleParaJustification(const sal_Int32 nIntValue, const ::std::shared_ptr<PropertyMap>& rContext, const bool bExchangeLeftRight) { sal_Int16 nAdjust = 0; sal_Int16 nLastLineAdjust = 0; @@ -3264,8 +3264,8 @@ void DomainMapper::handleParaJustification(const sal_Int32 nIntValue, const ::st nAdjust = static_cast< sal_Int16 > (bExchangeLeftRight ? style::ParagraphAdjust_RIGHT : style::ParagraphAdjust_LEFT); break; } - pContext->Insert( PROP_PARA_ADJUST, uno::makeAny( nAdjust ) ); - pContext->Insert( PROP_PARA_LAST_LINE_ADJUST, uno::makeAny( nLastLineAdjust ) ); + rContext->Insert( PROP_PARA_ADJUST, uno::makeAny( nAdjust ) ); + rContext->Insert( PROP_PARA_LAST_LINE_ADJUST, uno::makeAny( nLastLineAdjust ) ); m_pImpl->appendGrabBag(m_pImpl->m_aInteropGrabBag, "jc", aStringValue); } diff --git a/writerfilter/source/dmapper/DomainMapper.hxx b/writerfilter/source/dmapper/DomainMapper.hxx index 2c2065862e87..988c7ab8396d 100644 --- a/writerfilter/source/dmapper/DomainMapper.hxx +++ b/writerfilter/source/dmapper/DomainMapper.hxx @@ -163,8 +163,8 @@ private: // Table virtual void lcl_entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref) SAL_OVERRIDE; - void handleUnderlineType(const Id nId, const ::std::shared_ptr<PropertyMap> pContext); - void handleParaJustification(const sal_Int32 nIntValue, const ::std::shared_ptr<PropertyMap> pContext, const bool bExchangeLeftRight); + void handleUnderlineType(const Id nId, const ::std::shared_ptr<PropertyMap>& rContext); + void handleParaJustification(const sal_Int32 nIntValue, const ::std::shared_ptr<PropertyMap>& rContext, const bool bExchangeLeftRight); bool getColorFromId(const Id, sal_Int32 &nColor); sal_Int16 getEmphasisValue(const sal_Int32 nIntValue); OUString getBracketStringFromEnum(const sal_Int32 nIntValue, const bool bIsPrefix = true); diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx index de9467eea2d2..b31d16d20e50 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx @@ -84,18 +84,18 @@ void DomainMapperTableHandler::startTable(unsigned int nRows, -PropertyMapPtr lcl_SearchParentStyleSheetAndMergeProperties(const StyleSheetEntryPtr pStyleSheet, StyleSheetTablePtr pStyleSheetTable) +PropertyMapPtr lcl_SearchParentStyleSheetAndMergeProperties(const StyleSheetEntryPtr& rStyleSheet, StyleSheetTablePtr pStyleSheetTable) { PropertyMapPtr pRet; - if (!pStyleSheet) + if (!rStyleSheet) return pRet; - if(!pStyleSheet->sBaseStyleIdentifier.isEmpty()) + if(!rStyleSheet->sBaseStyleIdentifier.isEmpty()) { - const StyleSheetEntryPtr pParentStyleSheet = pStyleSheetTable->FindStyleSheetByISTD( pStyleSheet->sBaseStyleIdentifier ); + const StyleSheetEntryPtr pParentStyleSheet = pStyleSheetTable->FindStyleSheetByISTD(rStyleSheet->sBaseStyleIdentifier); //a loop in the style hierarchy, bail out - if (pParentStyleSheet == pStyleSheet) + if (pParentStyleSheet == rStyleSheet) return pRet; pRet = lcl_SearchParentStyleSheetAndMergeProperties( pParentStyleSheet, pStyleSheetTable ); @@ -107,7 +107,7 @@ PropertyMapPtr lcl_SearchParentStyleSheetAndMergeProperties(const StyleSheetEntr if (pRet) { - pRet->InsertProps(pStyleSheet->pProperties); + pRet->InsertProps(rStyleSheet->pProperties); } return pRet; diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index 63995b88a901..9cd85d41b035 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -352,22 +352,20 @@ void PropertyMap::dumpXml( const TagLogger::Pointer_t pLogger ) const } #endif -void PropertyMap::InsertProps(const PropertyMapPtr pMap) +void PropertyMap::InsertProps(const PropertyMapPtr& rMap) { - if(pMap) + if (rMap) { - MapIterator pEnd = pMap->m_vMap.end(); - for ( MapIterator iter = pMap->m_vMap.begin(); iter!=pEnd; ++iter ) + MapIterator pEnd = rMap->m_vMap.end(); + for ( MapIterator iter = rMap->m_vMap.begin(); iter!=pEnd; ++iter ) m_vMap[iter->first] = iter->second; - insertTableProperties(pMap.get()); + insertTableProperties(rMap.get()); Invalidate(); } } - - void PropertyMap::insertTableProperties( const PropertyMap* ) { #ifdef DEBUG_WRITERFILTER diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx index a1bb5c63dd5e..e430af59195b 100644 --- a/writerfilter/source/dmapper/PropertyMap.hxx +++ b/writerfilter/source/dmapper/PropertyMap.hxx @@ -145,7 +145,7 @@ public: void Erase( PropertyIds eId); //Imports properties from pMap, overwriting those with the same PropertyIds as the current map - void InsertProps(const std::shared_ptr<PropertyMap> pMap); + void InsertProps(const std::shared_ptr<PropertyMap>& rMap); //Returns a copy of the property if it exists, .first is its PropertyIds and .second is its Value (type css::uno::Any) boost::optional<Property> getProperty( PropertyIds eId ) const; diff --git a/writerfilter/source/dmapper/PropertyMapHelper.cxx b/writerfilter/source/dmapper/PropertyMapHelper.cxx index ad503a6795e1..a735a1d3267a 100644 --- a/writerfilter/source/dmapper/PropertyMapHelper.cxx +++ b/writerfilter/source/dmapper/PropertyMapHelper.cxx @@ -28,7 +28,7 @@ namespace dmapper using namespace ::com::sun::star; -void lcl_DumpTableColumnSeparators(const TagLogger::Pointer_t pLogger, const uno::Any & rTableColumnSeparators) +void lcl_DumpTableColumnSeparators(const TagLogger::Pointer_t& pLogger, const uno::Any & rTableColumnSeparators) { (void) pLogger; (void) rTableColumnSeparators; diff --git a/writerfilter/source/dmapper/PropertyMapHelper.hxx b/writerfilter/source/dmapper/PropertyMapHelper.hxx index 43620eb07458..819fc8b6ce7c 100644 --- a/writerfilter/source/dmapper/PropertyMapHelper.hxx +++ b/writerfilter/source/dmapper/PropertyMapHelper.hxx @@ -28,7 +28,7 @@ namespace writerfilter namespace dmapper { -void lcl_DumpTableColumnSeparators(const TagLogger::Pointer_t pLogger, +void lcl_DumpTableColumnSeparators(const TagLogger::Pointer_t& rLogger, const css::uno::Any & rTableColumnSeparators); #ifdef DEBUG_WRITERFILTER void lcl_DumpPropertyValues(const TagLogger::Pointer_t pLogger, diff --git a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx index fcd7e2bd8d6e..64a728550d5b 100644 --- a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx @@ -391,8 +391,8 @@ OOXMLValue * OOXMLInputStreamValue::clone() const struct OOXMLPropertySetImplCompare */ -bool OOXMLPropertySetImplCompare::operator()(const OOXMLProperty::Pointer_t x, - const OOXMLProperty::Pointer_t y) const +bool OOXMLPropertySetImplCompare::operator()(const OOXMLProperty::Pointer_t& x, + const OOXMLProperty::Pointer_t& y) const { bool bResult = false; diff --git a/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx b/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx index 79308ab41fd7..26c1715c393c 100644 --- a/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx +++ b/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx @@ -153,8 +153,8 @@ public: struct OOXMLPropertySetImplCompare { - bool operator()(const OOXMLProperty::Pointer_t x, - const OOXMLProperty::Pointer_t y) const; + bool operator()(const OOXMLProperty::Pointer_t& x, + const OOXMLProperty::Pointer_t& y) const; }; class OOXMLPropertySetImpl : public OOXMLPropertySet |