summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-12 10:34:46 +0200
committerNoel Grandin <noel@peralex.com>2016-04-12 11:25:18 +0200
commitc473472fc03dc71f237caeb36395ce155121288a (patch)
treedece960982bf20ffc6ae2688a237b4b933a9292b /writerfilter
parent8dcb7cf2a55bd0bf6ebbd89e2b91a078e6623996 (diff)
clang-tidy performance-unnecessary-value-param in writerfilter
Change-Id: I1f61be80ac1ebe42668580b09a261e7e3af1a403
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/inc/ooxml/OOXMLDocument.hxx10
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx6
-rw-r--r--writerfilter/source/dmapper/DomainMapper.hxx6
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableHandler.cxx14
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableHandler.hxx6
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableManager.hxx8
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx38
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.hxx30
-rw-r--r--writerfilter/source/dmapper/GraphicImport.cxx6
-rw-r--r--writerfilter/source/dmapper/NumberingManager.cxx2
-rw-r--r--writerfilter/source/dmapper/NumberingManager.hxx2
-rw-r--r--writerfilter/source/dmapper/OLEHandler.cxx4
-rw-r--r--writerfilter/source/dmapper/OLEHandler.hxx8
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx8
-rw-r--r--writerfilter/source/dmapper/PropertyMap.hxx8
-rw-r--r--writerfilter/source/dmapper/SdtHelper.cxx2
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx6
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.hxx4
-rw-r--r--writerfilter/source/dmapper/TDefTableHandler.cxx4
-rw-r--r--writerfilter/source/dmapper/TDefTableHandler.hxx4
-rw-r--r--writerfilter/source/dmapper/TableManager.cxx14
-rw-r--r--writerfilter/source/dmapper/TableManager.hxx14
-rw-r--r--writerfilter/source/dmapper/TagLogger.cxx4
-rw-r--r--writerfilter/source/dmapper/TagLogger.hxx4
-rw-r--r--writerfilter/source/ooxml/OOXMLDocumentImpl.cxx8
-rw-r--r--writerfilter/source/ooxml/OOXMLDocumentImpl.hxx6
-rw-r--r--writerfilter/source/ooxml/OOXMLFactory.cxx2
-rw-r--r--writerfilter/source/ooxml/OOXMLFactory.hxx2
-rw-r--r--writerfilter/source/ooxml/OOXMLFastContextHandler.cxx24
-rw-r--r--writerfilter/source/ooxml/OOXMLFastContextHandler.hxx24
-rw-r--r--writerfilter/source/ooxml/OOXMLParserState.cxx8
-rw-r--r--writerfilter/source/ooxml/OOXMLParserState.hxx8
-rw-r--r--writerfilter/source/ooxml/OOXMLPropertySet.cxx6
-rw-r--r--writerfilter/source/ooxml/OOXMLPropertySet.hxx6
-rw-r--r--writerfilter/source/ooxml/OOXMLStreamImpl.cxx10
-rw-r--r--writerfilter/source/ooxml/OOXMLStreamImpl.hxx3
-rw-r--r--writerfilter/source/ooxml/factory_ns.py2
-rw-r--r--writerfilter/source/ooxml/factoryimpl_ns.py4
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx6
39 files changed, 165 insertions, 166 deletions
diff --git a/writerfilter/inc/ooxml/OOXMLDocument.hxx b/writerfilter/inc/ooxml/OOXMLDocument.hxx
index 1a5254d2d560..525e08aad3e5 100644
--- a/writerfilter/inc/ooxml/OOXMLDocument.hxx
+++ b/writerfilter/inc/ooxml/OOXMLDocument.hxx
@@ -239,19 +239,19 @@ class OOXMLDocumentFactory
{
public:
static OOXMLStream::Pointer_t
- createStream(css::uno::Reference<css::uno::XComponentContext> rContext,
- css::uno::Reference<css::io::XInputStream> rStream,
+ createStream(const css::uno::Reference<css::uno::XComponentContext>& rContext,
+ const css::uno::Reference<css::io::XInputStream>& rStream,
bool bRepairStorage);
static OOXMLStream::Pointer_t
- createStream(OOXMLStream::Pointer_t pStream,
+ createStream(const OOXMLStream::Pointer_t& pStream,
OOXMLStream::StreamType_t nStreamType = OOXMLStream::DOCUMENT);
static OOXMLStream::Pointer_t
- createStream(OOXMLStream::Pointer_t pStream, const OUString & rId);
+ createStream(const OOXMLStream::Pointer_t& pStream, const OUString & rId);
static OOXMLDocument *
- createDocument(OOXMLStream::Pointer_t pStream,
+ createDocument(const OOXMLStream::Pointer_t& pStream,
const css::uno::Reference<css::task::XStatusIndicator>& xStatusIndicator,
bool bSkipImage, const css::uno::Sequence<css::beans::PropertyValue>& rDescriptor);
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 9863c594c9b7..4fd72e034dfa 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1155,7 +1155,7 @@ static sal_Int32 lcl_getListId(const StyleSheetEntryPtr& rEntry, const StyleShee
return lcl_getListId(pParent, rStyleTable);
}
-void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
+void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext )
{
// These SPRM's are not specific to any section, so it's expected that there is no context yet.
switch (rSprm.getId())
@@ -2922,7 +2922,7 @@ void DomainMapper::lcl_endShape( )
}
}
-void DomainMapper::PushStyleSheetProperties( PropertyMapPtr pStyleProperties, bool bAffectTableMngr )
+void DomainMapper::PushStyleSheetProperties( const PropertyMapPtr& pStyleProperties, bool bAffectTableMngr )
{
m_pImpl->PushStyleProperties( pStyleProperties );
if ( bAffectTableMngr )
@@ -2939,7 +2939,7 @@ void DomainMapper::PopStyleSheetProperties( bool bAffectTableMngr )
}
}
-void DomainMapper::PushListProperties( ::std::shared_ptr<PropertyMap> pListProperties )
+void DomainMapper::PushListProperties( const ::std::shared_ptr<PropertyMap>& pListProperties )
{
m_pImpl->PushListProperties( pListProperties );
}
diff --git a/writerfilter/source/dmapper/DomainMapper.hxx b/writerfilter/source/dmapper/DomainMapper.hxx
index ddf1ac304509..fee11b17c1aa 100644
--- a/writerfilter/source/dmapper/DomainMapper.hxx
+++ b/writerfilter/source/dmapper/DomainMapper.hxx
@@ -91,12 +91,12 @@ public:
virtual void data(const sal_uInt8* buf, size_t len,
writerfilter::Reference<Properties>::Pointer_t ref) override;
- void sprmWithProps( Sprm& sprm, ::std::shared_ptr<PropertyMap> pContext );
+ void sprmWithProps( Sprm& sprm, const ::std::shared_ptr<PropertyMap>& pContext );
- void PushStyleSheetProperties( ::std::shared_ptr<PropertyMap> pStyleProperties, bool bAffectTableMngr = false );
+ void PushStyleSheetProperties( const ::std::shared_ptr<PropertyMap>& pStyleProperties, bool bAffectTableMngr = false );
void PopStyleSheetProperties( bool bAffectTableMngr = false );
- void PushListProperties( ::std::shared_ptr<PropertyMap> pListProperties );
+ void PushListProperties( const ::std::shared_ptr<PropertyMap>& pListProperties );
void PopListProperties();
bool IsOOXMLImport() const;
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index c16282e66e09..ef82f4b4c4bd 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -65,7 +65,7 @@ DomainMapperTableHandler::~DomainMapperTableHandler()
}
void DomainMapperTableHandler::startTable(unsigned int /*nDepth*/,
- TablePropertyMapPtr pProps)
+ const TablePropertyMapPtr& pProps)
{
m_aTableProperties = pProps;
m_aTableRanges.clear();
@@ -79,7 +79,7 @@ void DomainMapperTableHandler::startTable(unsigned int /*nDepth*/,
}
-PropertyMapPtr lcl_SearchParentStyleSheetAndMergeProperties(const StyleSheetEntryPtr& rStyleSheet, StyleSheetTablePtr pStyleSheetTable)
+PropertyMapPtr lcl_SearchParentStyleSheetAndMergeProperties(const StyleSheetEntryPtr& rStyleSheet, const StyleSheetTablePtr& pStyleSheetTable)
{
PropertyMapPtr pRet;
@@ -108,7 +108,7 @@ PropertyMapPtr lcl_SearchParentStyleSheetAndMergeProperties(const StyleSheetEntr
return pRet;
}
-void lcl_mergeBorder( PropertyIds nId, PropertyMapPtr pOrig, PropertyMapPtr pDest )
+void lcl_mergeBorder( PropertyIds nId, const PropertyMapPtr& pOrig, const PropertyMapPtr& pDest )
{
boost::optional<PropertyMap::Property> pOrigVal = pOrig->getProperty(nId);
@@ -118,7 +118,7 @@ void lcl_mergeBorder( PropertyIds nId, PropertyMapPtr pOrig, PropertyMapPtr pDes
}
}
-void lcl_computeCellBorders( PropertyMapPtr pTableBorders, PropertyMapPtr pCellProps,
+void lcl_computeCellBorders( const PropertyMapPtr& pTableBorders, const PropertyMapPtr& pCellProps,
sal_Int32 nCell, sal_Int32 nRow, bool bIsEndCol, bool bIsEndRow )
{
boost::optional<PropertyMap::Property> pVerticalVal = pCellProps->getProperty(META_PROP_VERTICAL_BORDER);
@@ -262,7 +262,7 @@ struct TableInfo
namespace
{
-bool lcl_extractTableBorderProperty(PropertyMapPtr pTableProperties, const PropertyIds nId, TableInfo& rInfo, table::BorderLine2& rLine)
+bool lcl_extractTableBorderProperty(const PropertyMapPtr& pTableProperties, const PropertyIds nId, TableInfo& rInfo, table::BorderLine2& rLine)
{
if (!pTableProperties)
return false;
@@ -1132,7 +1132,7 @@ void DomainMapperTableHandler::endTable(unsigned int nestedTableLevel)
#endif
}
-void DomainMapperTableHandler::startRow(TablePropertyMapPtr pProps)
+void DomainMapperTableHandler::startRow(const TablePropertyMapPtr& pProps)
{
m_aRowProperties.push_back( pProps );
m_aCellProperties.push_back( PropertyMapVector1() );
@@ -1155,7 +1155,7 @@ void DomainMapperTableHandler::endRow()
}
void DomainMapperTableHandler::startCell(const css::uno::Reference< css::text::XTextRange > & start,
- TablePropertyMapPtr pProps )
+ const TablePropertyMapPtr& pProps )
{
sal_uInt32 nRow = m_aRowProperties.size();
if ( pProps.get( ) )
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.hxx b/writerfilter/source/dmapper/DomainMapperTableHandler.hxx
index f661af8a4cd8..b1ac2f1df701 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.hxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.hxx
@@ -92,7 +92,7 @@ public:
@param nDepth depth of the table in surrounding table hierarchy
@param pProps properties of the table
*/
- void startTable(unsigned int nDepth, TablePropertyMapPtr pProps);
+ void startTable(unsigned int nDepth, const TablePropertyMapPtr& pProps);
/// Handle end of table.
void endTable(unsigned int nestedTableLevel);
/**
@@ -100,7 +100,7 @@ public:
@param pProps properties of the row
*/
- void startRow(TablePropertyMapPtr pProps);
+ void startRow(const TablePropertyMapPtr& pProps);
/// Handle end of row.
void endRow();
/**
@@ -109,7 +109,7 @@ public:
@param rT start handle of the cell
@param pProps properties of the cell
*/
- void startCell(const css::uno::Reference< css::text::XTextRange > & start, TablePropertyMapPtr pProps);
+ void startCell(const css::uno::Reference< css::text::XTextRange > & start, const TablePropertyMapPtr& pProps);
/**
Handle end of cell.
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.hxx b/writerfilter/source/dmapper/DomainMapperTableManager.hxx
index 18c4b4df0d4f..21e9809c5691 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.hxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.hxx
@@ -105,7 +105,7 @@ public:
const css::uno::Sequence<css::beans::PropertyValue> getCurrentTablePosition();
TablePositionHandler* getCurrentTableRealPosition();
- virtual void cellProps(TablePropertyMapPtr pProps) override
+ virtual void cellProps(const TablePropertyMapPtr& pProps) override
{
if ( m_pStyleProps.get( ) )
m_pStyleProps->InsertProps(pProps);
@@ -113,7 +113,7 @@ public:
TableManager::cellProps( pProps );
};
- virtual void cellPropsByCell(unsigned int i, TablePropertyMapPtr pProps) override
+ virtual void cellPropsByCell(unsigned int i, const TablePropertyMapPtr& pProps) override
{
if ( m_pStyleProps.get( ) )
m_pStyleProps->InsertProps(pProps);
@@ -121,7 +121,7 @@ public:
TableManager::cellPropsByCell( i, pProps );
};
- virtual void insertRowProps(TablePropertyMapPtr pProps) override
+ virtual void insertRowProps(const TablePropertyMapPtr& pProps) override
{
if ( m_pStyleProps.get( ) )
m_pStyleProps->InsertProps(pProps);
@@ -129,7 +129,7 @@ public:
TableManager::insertRowProps( pProps );
};
- virtual void insertTableProps(TablePropertyMapPtr pProps) override
+ virtual void insertTableProps(const TablePropertyMapPtr& pProps) override
{
if ( m_pStyleProps.get( ) )
m_pStyleProps->InsertProps(pProps);
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 8eee3596aa8c..4210cc99b55f 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -90,7 +90,7 @@ namespace writerfilter {
namespace dmapper{
//line numbering for header/footer
-void lcl_linenumberingHeaderFooter( uno::Reference<container::XNameContainer> xStyles, const OUString& rname, DomainMapper_Impl* dmapper )
+void lcl_linenumberingHeaderFooter( const uno::Reference<container::XNameContainer>& xStyles, const OUString& rname, DomainMapper_Impl* dmapper )
{
const StyleSheetEntryPtr pEntry = dmapper->GetStyleSheetTable()->FindStyleSheetByISTD( rname );
if (!pEntry)
@@ -114,7 +114,7 @@ void lcl_linenumberingHeaderFooter( uno::Reference<container::XNameContainer> xS
}
// Populate Dropdown Field properties from FFData structure
-void lcl_handleDropdownField( const uno::Reference< beans::XPropertySet >& rxFieldProps, FFDataHandler::Pointer_t pFFDataHandler )
+void lcl_handleDropdownField( const uno::Reference< beans::XPropertySet >& rxFieldProps, const FFDataHandler::Pointer_t& pFFDataHandler )
{
if ( rxFieldProps.is() )
{
@@ -135,7 +135,7 @@ void lcl_handleDropdownField( const uno::Reference< beans::XPropertySet >& rxFie
}
}
-void lcl_handleTextField( const uno::Reference< beans::XPropertySet >& rxFieldProps, FFDataHandler::Pointer_t pFFDataHandler )
+void lcl_handleTextField( const uno::Reference< beans::XPropertySet >& rxFieldProps, const FFDataHandler::Pointer_t& pFFDataHandler )
{
if ( rxFieldProps.is() && pFFDataHandler )
{
@@ -501,7 +501,7 @@ void DomainMapper_Impl::PushProperties(ContextType eId)
}
-void DomainMapper_Impl::PushStyleProperties( PropertyMapPtr pStyleProperties )
+void DomainMapper_Impl::PushStyleProperties( const PropertyMapPtr& pStyleProperties )
{
m_aPropertyStacks[CONTEXT_STYLESHEET].push( pStyleProperties );
m_aContextStack.push(CONTEXT_STYLESHEET);
@@ -510,7 +510,7 @@ void DomainMapper_Impl::PushStyleProperties( PropertyMapPtr pStyleProperties )
}
-void DomainMapper_Impl::PushListProperties(PropertyMapPtr pListProperties)
+void DomainMapper_Impl::PushListProperties(const PropertyMapPtr& pListProperties)
{
m_aPropertyStacks[CONTEXT_LIST].push( pListProperties );
m_aContextStack.push(CONTEXT_LIST);
@@ -787,7 +787,7 @@ void lcl_MoveBorderPropertiesToFrame(std::vector<beans::PropertyValue>& rFramePr
void lcl_AddRangeAndStyle(
ParagraphPropertiesPtr& pToBeSavedProperties,
uno::Reference< text::XTextAppend > const& xTextAppend,
- PropertyMapPtr pPropertyMap,
+ const PropertyMapPtr& pPropertyMap,
TextAppendContext& rAppendContext)
{
uno::Reference<text::XParagraphCursor> xParaCursor(
@@ -1008,7 +1008,7 @@ void DomainMapper_Impl::CheckUnregisteredFrameConversion( )
}
}
-void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap )
+void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap )
{
#ifdef DEBUG_WRITERFILTER
TagLogger::getInstance().startElement("finishParagraph");
@@ -1200,7 +1200,7 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap )
#endif
}
-void DomainMapper_Impl::appendTextPortion( const OUString& rString, PropertyMapPtr pPropertyMap )
+void DomainMapper_Impl::appendTextPortion( const OUString& rString, const PropertyMapPtr& pPropertyMap )
{
if (m_bDiscardHeaderFooter)
return;
@@ -1318,7 +1318,7 @@ void DomainMapper_Impl::appendTextContent(
}
-void DomainMapper_Impl::appendOLE( const OUString& rStreamName, OLEHandlerPtr pOLEHandler )
+void DomainMapper_Impl::appendOLE( const OUString& rStreamName, const OLEHandlerPtr& pOLEHandler )
{
static const char sEmbeddedService[] = "com.sun.star.text.TextEmbeddedObject";
try
@@ -1620,7 +1620,7 @@ void DomainMapper_Impl::PushFootOrEndnote( bool bIsFootnote )
}
void DomainMapper_Impl::CreateRedline(uno::Reference<text::XTextRange> const& xRange,
- RedlineParamsPtr pRedline)
+ const RedlineParamsPtr& pRedline)
{
if ( pRedline.get( ) )
{
@@ -2890,7 +2890,7 @@ const FieldConversionMap_t & lcl_GetEnhancedFieldConversion()
}
void DomainMapper_Impl::handleFieldAsk
- (FieldContextPtr pContext,
+ (const FieldContextPtr& pContext,
uno::Reference< uno::XInterface > & xFieldInterface,
uno::Reference< beans::XPropertySet > const& xFieldProperties)
{
@@ -2933,7 +2933,7 @@ void DomainMapper_Impl::handleFieldAsk
}
-void DomainMapper_Impl::handleRubyEQField( FieldContextPtr pContext)
+void DomainMapper_Impl::handleRubyEQField( const FieldContextPtr& pContext)
{
const OUString & rCommand(pContext->GetCommand());
sal_Int32 nIndex = 0, nEnd = 0;
@@ -3006,7 +3006,7 @@ void DomainMapper_Impl::handleRubyEQField( FieldContextPtr pContext)
}
void DomainMapper_Impl::handleAutoNum
- (FieldContextPtr pContext,
+ (const FieldContextPtr& pContext,
uno::Reference< uno::XInterface > & xFieldInterface,
uno::Reference< beans::XPropertySet > const& xFieldProperties)
{
@@ -3049,7 +3049,7 @@ void DomainMapper_Impl::handleAuthor
}
void DomainMapper_Impl::handleDocProperty
- (FieldContextPtr pContext,
+ (const FieldContextPtr& pContext,
OUString const& rFirstParam,
uno::Reference< uno::XInterface > & xFieldInterface,
uno::Reference< beans::XPropertySet > const&)
@@ -3203,7 +3203,7 @@ uno::Sequence< beans::PropertyValues > lcl_createTOXLevelHyperlinks( bool bHyper
}
void DomainMapper_Impl::handleToc
- (FieldContextPtr pContext,
+ (const FieldContextPtr& pContext,
uno::Reference< uno::XInterface > & /*xFieldInterface*/,
uno::Reference< beans::XPropertySet > const& /*xFieldProperties*/,
const OUString & sTOCServiceName)
@@ -3447,7 +3447,7 @@ void DomainMapper_Impl::handleToc
}
void DomainMapper_Impl::handleBibliography
- (FieldContextPtr pContext,
+ (const FieldContextPtr& pContext,
const OUString & sTOCServiceName)
{
uno::Reference< beans::XPropertySet > xTOC;
@@ -3469,7 +3469,7 @@ void DomainMapper_Impl::handleBibliography
}
void DomainMapper_Impl::handleIndex
- (FieldContextPtr pContext,
+ (const FieldContextPtr& pContext,
uno::Reference< uno::XInterface > & /*xFieldInterface*/,
uno::Reference< beans::XPropertySet > const& /*xFieldProperties*/,
const OUString & sTOCServiceName)
@@ -4392,7 +4392,7 @@ void DomainMapper_Impl::SetFieldResult(OUString const& rResult)
}
}
-void DomainMapper_Impl::SetFieldFFData(FFDataHandler::Pointer_t pFFDataHandler)
+void DomainMapper_Impl::SetFieldFFData(const FFDataHandler::Pointer_t& pFFDataHandler)
{
#ifdef DEBUG_WRITERFILTER
TagLogger::getInstance().startElement("setFieldFFData");
@@ -4699,7 +4699,7 @@ void DomainMapper_Impl::ResetGraphicImport()
}
-void DomainMapper_Impl::ImportGraphic(writerfilter::Reference< Properties >::Pointer_t ref, GraphicImportType eGraphicImportType)
+void DomainMapper_Impl::ImportGraphic(const writerfilter::Reference< Properties >::Pointer_t& ref, GraphicImportType eGraphicImportType)
{
GetGraphicImport(eGraphicImportType);
if( eGraphicImportType != IMPORT_AS_DETECTED_INLINE && eGraphicImportType != IMPORT_AS_DETECTED_ANCHOR )
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index 24f4bbe313f3..08757c1ce4bb 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -493,7 +493,7 @@ public:
}
void SetDocumentSettingsProperty( const OUString& rPropName, const css::uno::Any& rValue );
- static void CreateRedline(css::uno::Reference<css::text::XTextRange> const& xRange, RedlineParamsPtr pRedline);
+ static void CreateRedline(css::uno::Reference<css::text::XTextRange> const& xRange, const RedlineParamsPtr& pRedline);
void CheckParaMarkerRedline(css::uno::Reference<css::text::XTextRange> const& xRange);
@@ -547,17 +547,17 @@ public:
void setParaSdtEndDeferred(bool bParaSdtEndDeferred);
bool isParaSdtEndDeferred();
- void finishParagraph( PropertyMapPtr pPropertyMap );
- void appendTextPortion( const OUString& rString, PropertyMapPtr pPropertyMap );
+ void finishParagraph( const PropertyMapPtr& pPropertyMap );
+ void appendTextPortion( const OUString& rString, const PropertyMapPtr& pPropertyMap );
void appendTextContent(const css::uno::Reference<css::text::XTextContent>&, const css::uno::Sequence<css::beans::PropertyValue>&);
- void appendOLE( const OUString& rStreamName, OLEHandlerPtr pOleHandler );
+ void appendOLE( const OUString& rStreamName, const OLEHandlerPtr& pOleHandler );
void appendStarMath( const Value& v );
css::uno::Reference<css::beans::XPropertySet> appendTextSectionAfter(css::uno::Reference<css::text::XTextRange>& xBefore);
// push the new properties onto the stack and make it the 'current' property map
void PushProperties(ContextType eId);
- void PushStyleProperties(PropertyMapPtr pStyleProperties);
- void PushListProperties(PropertyMapPtr pListProperties);
+ void PushStyleProperties(const PropertyMapPtr& pStyleProperties);
+ void PushListProperties(const PropertyMapPtr& pListProperties);
void PopProperties(ContextType eId);
ContextType GetTopContextType() const { return m_aContextStack.top(); }
@@ -600,7 +600,7 @@ public:
GraphicImportPtr GetGraphicImport( GraphicImportType eGraphicImportType );
void ResetGraphicImport();
// this method deletes the current m_pGraphicImport after import
- void ImportGraphic(writerfilter::Reference< Properties>::Pointer_t, GraphicImportType eGraphicImportType );
+ void ImportGraphic(const writerfilter::Reference< Properties>::Pointer_t&, GraphicImportType eGraphicImportType );
void InitTabStopFromStyle(const css::uno::Sequence<css::style::TabStop>& rInitTabStops);
void IncorporateTabStop( const DeletableTabStop &aTabStop );
@@ -648,13 +648,13 @@ public:
void SetFieldLocked();
//collect the pieces of the command
void AppendFieldCommand(OUString& rPartOfCommand);
- void handleRubyEQField( FieldContextPtr pContext);
+ void handleRubyEQField( const FieldContextPtr& pContext);
void handleFieldAsk
- (FieldContextPtr pContext,
+ (const FieldContextPtr& pContext,
css::uno::Reference< css::uno::XInterface > & xFieldInterface,
css::uno::Reference< css::beans::XPropertySet > const& xFieldProperties);
void handleAutoNum
- (FieldContextPtr pContext,
+ (const FieldContextPtr& pContext,
css::uno::Reference< css::uno::XInterface > & xFieldInterface,
css::uno::Reference< css::beans::XPropertySet > const& xFieldProperties);
static void handleAuthor
@@ -663,23 +663,23 @@ public:
css::uno::Reference< css::beans::XPropertySet > const& xFieldProperties,
FieldId eFieldId);
void handleDocProperty
- (FieldContextPtr pContext,
+ (const FieldContextPtr& pContext,
OUString const& rFirstParam,
css::uno::Reference< css::uno::XInterface > & xFieldInterface,
css::uno::Reference< css::beans::XPropertySet > const& xFieldProperties);
void handleToc
- (FieldContextPtr pContext,
+ (const FieldContextPtr& pContext,
css::uno::Reference< css::uno::XInterface > & xFieldInterface,
css::uno::Reference< css::beans::XPropertySet > const& xFieldProperties,
const OUString & sTOCServiceName);
void handleIndex
- (FieldContextPtr pContext,
+ (const FieldContextPtr& pContext,
css::uno::Reference< css::uno::XInterface > & xFieldInterface,
css::uno::Reference< css::beans::XPropertySet > const& xFieldProperties,
const OUString & sTOCServiceName);
void handleBibliography
- (FieldContextPtr pContext,
+ (const FieldContextPtr& pContext,
const OUString & sTOCServiceName);
/// The field command has to be closed (cFieldSep appeared).
void CloseFieldCommand();
@@ -689,7 +689,7 @@ public:
//apply the result text to the related field
void SetFieldResult(OUString const& rResult);
// set FFData of top field context
- void SetFieldFFData( FFDataHandler::Pointer_t pFFDataHandler );
+ void SetFieldFFData( const FFDataHandler::Pointer_t& pFFDataHandler );
/// The end of field is reached (cFieldEnd appeared) - the command might still be open.
void PopFieldContext();
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index 417b52a79078..df9b3f6d3773 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -342,7 +342,7 @@ public:
return bYSizeValid;
}
- void applyMargins(uno::Reference< beans::XPropertySet > xGraphicObjectProperties) const
+ void applyMargins(const uno::Reference< beans::XPropertySet >& xGraphicObjectProperties) const
{
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_LEFT_MARGIN ), uno::makeAny(nLeftMargin));
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_RIGHT_MARGIN ), uno::makeAny(nRightMargin));
@@ -350,7 +350,7 @@ public:
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_BOTTOM_MARGIN ), uno::makeAny(nBottomMargin));
}
- void applyPosition(uno::Reference< beans::XPropertySet > xGraphicObjectProperties) const
+ void applyPosition(const uno::Reference< beans::XPropertySet >& xGraphicObjectProperties) const
{
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_HORI_ORIENT ),
uno::makeAny(nHoriOrient));
@@ -358,7 +358,7 @@ public:
uno::makeAny(nVertOrient));
}
- void applyRelativePosition(uno::Reference< beans::XPropertySet > xGraphicObjectProperties, bool bRelativeOnly = false) const
+ void applyRelativePosition(const uno::Reference< beans::XPropertySet >& xGraphicObjectProperties, bool bRelativeOnly = false) const
{
if (!bRelativeOnly)
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_HORI_ORIENT_POSITION),
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 1ee372b6dc0c..f3552ea1ef9b 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -121,7 +121,7 @@ void ListLevel::SetValue( Id nId, sal_Int32 nValue )
}
}
-void ListLevel::SetParaStyle( std::shared_ptr< StyleSheetEntry > pStyle )
+void ListLevel::SetParaStyle( const std::shared_ptr< StyleSheetEntry >& pStyle )
{
if (!pStyle)
return;
diff --git a/writerfilter/source/dmapper/NumberingManager.hxx b/writerfilter/source/dmapper/NumberingManager.hxx
index caed77570a71..8235c808949b 100644
--- a/writerfilter/source/dmapper/NumberingManager.hxx
+++ b/writerfilter/source/dmapper/NumberingManager.hxx
@@ -81,7 +81,7 @@ public:
void SetGraphicURL( const OUString& sValue ) { m_sGraphicURL = sValue; };
void SetGraphicBitmap(css::uno::Reference<css::graphic::XGraphic> const& sValue)
{ m_sGraphicBitmap = sValue; }
- void SetParaStyle( std::shared_ptr< StyleSheetEntry > pStyle );
+ void SetParaStyle( const std::shared_ptr< StyleSheetEntry >& pStyle );
// Getters
OUString GetBulletChar( ) { return m_sBulletChar; };
diff --git a/writerfilter/source/dmapper/OLEHandler.cxx b/writerfilter/source/dmapper/OLEHandler.cxx
index f7d55c611fd0..13ea16ecfebf 100644
--- a/writerfilter/source/dmapper/OLEHandler.cxx
+++ b/writerfilter/source/dmapper/OLEHandler.cxx
@@ -180,7 +180,7 @@ void OLEHandler::lcl_sprm(Sprm & rSprm)
}
}
-void OLEHandler::importStream(uno::Reference<uno::XComponentContext> xComponentContext, uno::Reference<text::XTextDocument> xTextDocument, uno::Reference<text::XTextContent> xOLE)
+void OLEHandler::importStream(const uno::Reference<uno::XComponentContext>& xComponentContext, const uno::Reference<text::XTextDocument>& xTextDocument, const uno::Reference<text::XTextContent>& xOLE)
{
OUString aFilterService;
if (m_sProgId == "Word.Document.12")
@@ -217,7 +217,7 @@ void OLEHandler::importStream(uno::Reference<uno::XComponentContext> xComponentC
m_sProgId, m_sDrawAspect);
}
-OUString OLEHandler::getCLSID(uno::Reference<uno::XComponentContext> xComponentContext) const
+OUString OLEHandler::getCLSID(const uno::Reference<uno::XComponentContext>& xComponentContext) const
{
OUString aRet;
diff --git a/writerfilter/source/dmapper/OLEHandler.hxx b/writerfilter/source/dmapper/OLEHandler.hxx
index 8d6fbd6ac91b..b8ffb179efe4 100644
--- a/writerfilter/source/dmapper/OLEHandler.hxx
+++ b/writerfilter/source/dmapper/OLEHandler.hxx
@@ -85,12 +85,12 @@ public:
bool isOLEObject() { return m_xInputStream.is(); }
/// In case of a valid CLSID, import the native data to the previously created empty OLE object.
- void importStream(css::uno::Reference<css::uno::XComponentContext> xComponentContext,
- css::uno::Reference<css::text::XTextDocument> xTextDocument,
- css::uno::Reference<css::text::XTextContent> xOLE);
+ void importStream(const css::uno::Reference<css::uno::XComponentContext>& xComponentContext,
+ const css::uno::Reference<css::text::XTextDocument>& xTextDocument,
+ const css::uno::Reference<css::text::XTextContent>& xOLE);
/// Get the CLSID of the OLE object, in case we can find one based on m_sProgId.
- OUString getCLSID(css::uno::Reference<css::uno::XComponentContext> xComponentContext) const;
+ OUString getCLSID(const css::uno::Reference<css::uno::XComponentContext>& xComponentContext) const;
OUString copyOLEOStream(css::uno::Reference<css::text::XTextDocument> const& xTextDocument);
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index bd88d4dd7c53..2b7babe7c3aa 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -804,8 +804,8 @@ bool SectionPropertyMap::HasFooter(bool bFirstPage) const
#define MIN_HEAD_FOOT_HEIGHT 100 //minimum header/footer height
void SectionPropertyMap::CopyHeaderFooterTextProperty (
- uno::Reference< beans::XPropertySet > xPrevStyle,
- uno::Reference< beans::XPropertySet > xStyle,
+ const uno::Reference< beans::XPropertySet >& xPrevStyle,
+ const uno::Reference< beans::XPropertySet >& xStyle,
PropertyIds ePropId )
{
try {
@@ -830,8 +830,8 @@ void SectionPropertyMap::CopyHeaderFooterTextProperty (
// Copy headers and footers from the previous page style.
void SectionPropertyMap::CopyHeaderFooter(
- uno::Reference< beans::XPropertySet > xPrevStyle,
- uno::Reference< beans::XPropertySet > xStyle,
+ const uno::Reference< beans::XPropertySet >& xPrevStyle,
+ const uno::Reference< beans::XPropertySet >& xStyle,
bool bOmitRightHeader, bool bOmitLeftHeader,
bool bOmitRightFooter, bool bOmitLeftFooter)
{
diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx
index ac2b8b53b3ac..1d82a1c589d5 100644
--- a/writerfilter/source/dmapper/PropertyMap.hxx
+++ b/writerfilter/source/dmapper/PropertyMap.hxx
@@ -250,13 +250,13 @@ class SectionPropertyMap : public PropertyMap
DomainMapper_Impl& rDM_Impl);
void CopyLastHeaderFooter( bool bFirstPage, DomainMapper_Impl& rDM_Impl );
static void CopyHeaderFooter(
- css::uno::Reference<css::beans::XPropertySet> xPrevStyle,
- css::uno::Reference<css::beans::XPropertySet> xStyle,
+ const css::uno::Reference<css::beans::XPropertySet>& xPrevStyle,
+ const css::uno::Reference<css::beans::XPropertySet>& xStyle,
bool bOmitRightHeader=false, bool bOmitLeftHeader=false,
bool bOmitRightFooter=false, bool bOmitLeftFooter=false);
static void CopyHeaderFooterTextProperty(
- css::uno::Reference<css::beans::XPropertySet> xPrevStyle,
- css::uno::Reference<css::beans::XPropertySet> xStyle,
+ const css::uno::Reference<css::beans::XPropertySet>& xPrevStyle,
+ const css::uno::Reference<css::beans::XPropertySet>& xStyle,
PropertyIds ePropId );
void PrepareHeaderFooterProperties( bool bFirstPage );
bool HasHeader( bool bFirstPage ) const;
diff --git a/writerfilter/source/dmapper/SdtHelper.cxx b/writerfilter/source/dmapper/SdtHelper.cxx
index 6fad59ef1b56..680363958367 100644
--- a/writerfilter/source/dmapper/SdtHelper.cxx
+++ b/writerfilter/source/dmapper/SdtHelper.cxx
@@ -25,7 +25,7 @@ namespace dmapper
using namespace ::com::sun::star;
/// w:sdt's w:dropDownList doesn't have width, so guess the size based on the longest string.
-awt::Size lcl_getOptimalWidth(StyleSheetTablePtr pStyleSheet, OUString& rDefault, std::vector<OUString>& rItems)
+awt::Size lcl_getOptimalWidth(const StyleSheetTablePtr& pStyleSheet, OUString& rDefault, std::vector<OUString>& rItems)
{
OUString aLongest = rDefault;
sal_Int32 nHeight = 0;
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 8519e176eebf..d4af3dfe75d9 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -96,7 +96,7 @@ TableStyleSheetEntry::~TableStyleSheetEntry( )
m_pStyleSheet = nullptr;
}
-void TableStyleSheetEntry::AddTblStylePr( TblStyleType nType, PropertyMapPtr pProps )
+void TableStyleSheetEntry::AddTblStylePr( TblStyleType nType, const PropertyMapPtr& pProps )
{
static const int nTypesProps = 4;
static const TblStyleType pTypesToFix[nTypesProps] =
@@ -169,7 +169,7 @@ void StyleSheetEntry::AppendInteropGrabBag(const beans::PropertyValue& rValue)
m_aInteropGrabBag.push_back(rValue);
}
-void lcl_mergeProps( PropertyMapPtr pToFill, PropertyMapPtr pToAdd, TblStyleType nStyleId )
+void lcl_mergeProps( const PropertyMapPtr& pToFill, const PropertyMapPtr& pToAdd, TblStyleType nStyleId )
{
static const PropertyIds pPropsToCheck[] =
{
@@ -900,7 +900,7 @@ uno::Sequence< OUString > PropValVector::getNames()
return comphelper::containerToSequence(aRet);
}
-void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
+void StyleSheetTable::ApplyStyleSheets( const FontTablePtr& rFontTable )
{
try
{
diff --git a/writerfilter/source/dmapper/StyleSheetTable.hxx b/writerfilter/source/dmapper/StyleSheetTable.hxx
index 89bb128ae773..a2344dbba3df 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.hxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.hxx
@@ -90,7 +90,7 @@ public:
StyleSheetTable(DomainMapper& rDMapper, css::uno::Reference<css::text::XTextDocument> const& xTextDocument, bool bIsNewDoc);
virtual ~StyleSheetTable();
- void ApplyStyleSheets( FontTablePtr rFontTable );
+ void ApplyStyleSheets( const FontTablePtr& rFontTable );
const StyleSheetEntryPtr FindStyleSheetByISTD(const OUString& sIndex);
const StyleSheetEntryPtr FindStyleSheetByStyleName(const OUString& rIndex);
const StyleSheetEntryPtr FindStyleSheetByConvertedStyleName(const OUString& rIndex);
@@ -134,7 +134,7 @@ public:
// Adds a new tblStylePr to the table style entry. This method
// fixes some possible properties conflicts, like borders ones.
- void AddTblStylePr( TblStyleType nType, PropertyMapPtr pProps );
+ void AddTblStylePr( TblStyleType nType, const PropertyMapPtr& pProps );
// Gets all the properties
// + corresponding to the mask,
diff --git a/writerfilter/source/dmapper/TDefTableHandler.cxx b/writerfilter/source/dmapper/TDefTableHandler.cxx
index 274307268356..fa756e44ed6c 100644
--- a/writerfilter/source/dmapper/TDefTableHandler.cxx
+++ b/writerfilter/source/dmapper/TDefTableHandler.cxx
@@ -314,7 +314,7 @@ void TDefTableHandler::lcl_attribute(Id rName, Value & rVal)
}
-void TDefTableHandler::localResolve(Id rName, writerfilter::Reference<Properties>::Pointer_t pProperties)
+void TDefTableHandler::localResolve(Id rName, const writerfilter::Reference<Properties>::Pointer_t& pProperties)
{
if( pProperties.get())
{
@@ -417,7 +417,7 @@ void TDefTableHandler::lcl_sprm(Sprm & rSprm)
}
void TDefTableHandler::fillCellProperties(
- size_t nCell, ::std::shared_ptr< TablePropertyMap > pCellProperties ) const
+ size_t nCell, const ::std::shared_ptr< TablePropertyMap >& pCellProperties ) const
{
if( m_aCellBorderPositions.size() > nCell )
{
diff --git a/writerfilter/source/dmapper/TDefTableHandler.hxx b/writerfilter/source/dmapper/TDefTableHandler.hxx
index e92ec26de357..3e8ce7f802f4 100644
--- a/writerfilter/source/dmapper/TDefTableHandler.hxx
+++ b/writerfilter/source/dmapper/TDefTableHandler.hxx
@@ -61,7 +61,7 @@ private:
std::vector<css::beans::PropertyValue> m_aInteropGrabBag;
void appendGrabBag(const OUString& aKey, const OUString& aValue);
- void localResolve(Id Name, writerfilter::Reference<Properties>::Pointer_t pProperties);
+ void localResolve(Id Name, const writerfilter::Reference<Properties>::Pointer_t& pProperties);
// Properties
virtual void lcl_attribute(Id Name, Value & val) override;
@@ -71,7 +71,7 @@ public:
TDefTableHandler();
virtual ~TDefTableHandler();
- void fillCellProperties( size_t nCell, ::std::shared_ptr< TablePropertyMap > pCellProperties) const;
+ void fillCellProperties( size_t nCell, const ::std::shared_ptr< TablePropertyMap >& pCellProperties) const;
void enableInteropGrabBag(const OUString& aName);
css::beans::PropertyValue getInteropGrabBag(const OUString& aName = OUString());
static OUString getBorderTypeString(sal_Int32 nType);
diff --git a/writerfilter/source/dmapper/TableManager.cxx b/writerfilter/source/dmapper/TableManager.cxx
index 793aff594cdb..b574d83bd032 100644
--- a/writerfilter/source/dmapper/TableManager.cxx
+++ b/writerfilter/source/dmapper/TableManager.cxx
@@ -30,7 +30,7 @@ void TableManager::clearData()
{
}
-void TableManager::openCell(const css::uno::Reference<css::text::XTextRange>& rHandle, TablePropertyMapPtr pProps)
+void TableManager::openCell(const css::uno::Reference<css::text::XTextRange>& rHandle, const TablePropertyMapPtr& pProps)
{
#ifdef DEBUG_WRITERFILTER
TagLogger::getInstance().startElement("tablemanager.openCell");
@@ -59,7 +59,7 @@ void TableManager::endOfCellAction()
{
}
-void TableManager::insertTableProps(TablePropertyMapPtr pProps)
+void TableManager::insertTableProps(const TablePropertyMapPtr& pProps)
{
#ifdef DEBUG_WRITERFILTER
TagLogger::getInstance().startElement("tablemanager.insertTableProps");
@@ -75,7 +75,7 @@ void TableManager::insertTableProps(TablePropertyMapPtr pProps)
#endif
}
-void TableManager::insertRowProps(TablePropertyMapPtr pProps)
+void TableManager::insertRowProps(const TablePropertyMapPtr& pProps)
{
#ifdef DEBUG_WRITERFILTER
TagLogger::getInstance().startElement("tablemanager.insertRowProps");
@@ -91,7 +91,7 @@ void TableManager::insertRowProps(TablePropertyMapPtr pProps)
#endif
}
-void TableManager::cellPropsByCell(unsigned int i, TablePropertyMapPtr pProps)
+void TableManager::cellPropsByCell(unsigned int i, const TablePropertyMapPtr& pProps)
{
#ifdef DEBUG_WRITERFILTER
TagLogger::getInstance().startElement("tablemanager.cellPropsByCell");
@@ -104,7 +104,7 @@ void TableManager::cellPropsByCell(unsigned int i, TablePropertyMapPtr pProps)
#endif
}
-void TableManager::cellProps(TablePropertyMapPtr pProps)
+void TableManager::cellProps(const TablePropertyMapPtr& pProps)
{
#ifdef DEBUG_WRITERFILTER
TagLogger::getInstance().startElement("tablemanager.cellProps");
@@ -204,7 +204,7 @@ void TableManager::closeCell(const css::uno::Reference<css::text::XTextRange>& r
}
}
-void TableManager::ensureOpenCell(TablePropertyMapPtr pProps)
+void TableManager::ensureOpenCell(const TablePropertyMapPtr& pProps)
{
#ifdef DEBUG_WRITERFILTER
TagLogger::getInstance().startElement("tablemanager.ensureOpenCell");
@@ -409,7 +409,7 @@ void TableManager::handle(const css::uno::Reference<css::text::XTextRange>& rHan
setHandle(rHandle);
}
-void TableManager::setHandler(std::shared_ptr<DomainMapperTableHandler> pTableDataHandler)
+void TableManager::setHandler(const std::shared_ptr<DomainMapperTableHandler>& pTableDataHandler)
{
mpTableDataHandler = pTableDataHandler;
}
diff --git a/writerfilter/source/dmapper/TableManager.hxx b/writerfilter/source/dmapper/TableManager.hxx
index 8f907cc35091..e32012047566 100644
--- a/writerfilter/source/dmapper/TableManager.hxx
+++ b/writerfilter/source/dmapper/TableManager.hxx
@@ -351,7 +351,7 @@ private:
Open a cell at current level.
*/
- void openCell(const css::uno::Reference<css::text::XTextRange>& handle, TablePropertyMapPtr pProps);
+ void openCell(const css::uno::Reference<css::text::XTextRange>& handle, const TablePropertyMapPtr& pProps);
/**
Close a cell at current level.
@@ -361,7 +361,7 @@ private:
/**
Ensure a cell is open at the current level.
*/
- void ensureOpenCell(TablePropertyMapPtr pProps);
+ void ensureOpenCell(const TablePropertyMapPtr& pProps);
protected:
/**
@@ -402,7 +402,7 @@ public:
@param pTableDataHandler the handler
*/
- void setHandler(std::shared_ptr<DomainMapperTableHandler> pTableDataHandler);
+ void setHandler(const std::shared_ptr<DomainMapperTableHandler>& pTableDataHandler);
/**
Set the current handle.
@@ -482,7 +482,7 @@ public:
@param pProps the properties
*/
- virtual void cellProps(TablePropertyMapPtr pProps);
+ virtual void cellProps(const TablePropertyMapPtr& pProps);
/**
Handle properties of a certain cell in the current row.
@@ -490,21 +490,21 @@ public:
@paran i index of the cell in the current row
@param pProps the properties
*/
- virtual void cellPropsByCell(unsigned int i, TablePropertyMapPtr pProps);
+ virtual void cellPropsByCell(unsigned int i, const TablePropertyMapPtr& pProps);
/**
Handle properties of the current row.
@param pProps the properties
*/
- virtual void insertRowProps(TablePropertyMapPtr pProps);
+ virtual void insertRowProps(const TablePropertyMapPtr& pProps);
/**
Handle properties of the current table.
@param pProps the properties
*/
- virtual void insertTableProps(TablePropertyMapPtr pProps);
+ virtual void insertTableProps(const TablePropertyMapPtr& pProps);
/**
Return if table manager has detected paragraph to ignore.
diff --git a/writerfilter/source/dmapper/TagLogger.cxx b/writerfilter/source/dmapper/TagLogger.cxx
index 58f6bf8b8a6e..90d0f46e9c9c 100644
--- a/writerfilter/source/dmapper/TagLogger.cxx
+++ b/writerfilter/source/dmapper/TagLogger.cxx
@@ -105,7 +105,7 @@ struct TheTagLogger:
endElement();
}
- void TagLogger::unoPropertySet(uno::Reference<beans::XPropertySet> rPropSet)
+ void TagLogger::unoPropertySet(const uno::Reference<beans::XPropertySet>& rPropSet)
{
uno::Reference<beans::XPropertySetInfo> xPropSetInfo(rPropSet->getPropertySetInfo());
uno::Sequence<beans::Property> aProps(xPropSetInfo->getProperties());
@@ -175,7 +175,7 @@ struct TheTagLogger:
xmlFree( xmlName );
}
- void TagLogger::attribute(const std::string & name, const uno::Any aAny)
+ void TagLogger::attribute(const std::string & name, const uno::Any& aAny)
{
if (!pWriter)
return;
diff --git a/writerfilter/source/dmapper/TagLogger.hxx b/writerfilter/source/dmapper/TagLogger.hxx
index 5bd212807a94..b03da6cfcfe5 100644
--- a/writerfilter/source/dmapper/TagLogger.hxx
+++ b/writerfilter/source/dmapper/TagLogger.hxx
@@ -50,14 +50,14 @@ namespace writerfilter
void endDocument();
void element(const std::string & name);
- void unoPropertySet(css::uno::Reference<css::beans::XPropertySet> rPropSet);
+ void unoPropertySet(const css::uno::Reference<css::beans::XPropertySet>& rPropSet);
void startElement(const std::string & name);
#endif
void attribute(const std::string & name, const std::string & value);
#ifdef DEBUG_WRITERFILTER
void attribute(const std::string & name, const OUString & value);
void attribute(const std::string & name, sal_uInt32 value);
- void attribute(const std::string & name, const css::uno::Any aAny);
+ void attribute(const std::string & name, const css::uno::Any& aAny);
void chars(const std::string & chars);
void chars(const OUString & chars);
void endElement();
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
index c3f99d216352..180a2b0ae662 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
@@ -122,7 +122,7 @@ void OOXMLDocumentImpl::resolveFastSubStream(Stream & rStreamHandler,
}
void OOXMLDocumentImpl::resolveFastSubStreamWithId(Stream & rStream,
- writerfilter::Reference<Stream>::Pointer_t pStream,
+ const writerfilter::Reference<Stream>::Pointer_t& pStream,
sal_uInt32 nId)
{
rStream.substream(nId, pStream);
@@ -180,7 +180,7 @@ uno::Reference<xml::dom::XDocument> OOXMLDocumentImpl::importSubStream(OOXMLStre
}
-void OOXMLDocumentImpl::importSubStreamRelations(OOXMLStream::Pointer_t pStream, OOXMLStream::StreamType_t nType)
+void OOXMLDocumentImpl::importSubStreamRelations(const OOXMLStream::Pointer_t& pStream, OOXMLStream::StreamType_t nType)
{
uno::Reference<xml::dom::XDocument> xRelation;
OOXMLStream::Pointer_t cStream;
@@ -706,7 +706,7 @@ void OOXMLDocumentImpl::resolveGlossaryStream(Stream & /*rStream*/)
}
}
-void OOXMLDocumentImpl::resolveEmbeddingsStream(OOXMLStream::Pointer_t pStream)
+void OOXMLDocumentImpl::resolveEmbeddingsStream(const OOXMLStream::Pointer_t& pStream)
{
uno::Reference<embed::XRelationshipAccess> xRelationshipAccess;
xRelationshipAccess.set((dynamic_cast<OOXMLStreamImpl&>(*pStream.get())).accessDocumentStream(), uno::UNO_QUERY_THROW);
@@ -935,7 +935,7 @@ uno::Sequence<beans::PropertyValue > OOXMLDocumentImpl::getEmbeddingsList( )
OOXMLDocument *
OOXMLDocumentFactory::createDocument
-(OOXMLStream::Pointer_t pStream,
+(const OOXMLStream::Pointer_t& pStream,
const uno::Reference<task::XStatusIndicator>& xStatusIndicator,
bool mbSkipImages, const uno::Sequence<beans::PropertyValue>& rDescriptor)
{
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx
index 6af6f8a1ac5c..e8da24dd2929 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx
@@ -72,12 +72,12 @@ protected:
OOXMLStream::StreamType_t nType);
static void resolveFastSubStreamWithId(Stream & rStream,
- writerfilter::Reference<Stream>::Pointer_t pStream,
+ const writerfilter::Reference<Stream>::Pointer_t& pStream,
sal_uInt32 nId);
css::uno::Reference<css::xml::dom::XDocument> importSubStream(OOXMLStream::StreamType_t nType);
- void importSubStreamRelations(OOXMLStream::Pointer_t pStream, OOXMLStream::StreamType_t nType);
+ void importSubStreamRelations(const OOXMLStream::Pointer_t& pStream, OOXMLStream::StreamType_t nType);
writerfilter::Reference<Stream>::Pointer_t
getSubStream(const OUString & rId);
@@ -91,7 +91,7 @@ protected:
void resolveCustomXmlStream(Stream & rStream);
void resolveActiveXStream(Stream & rStream);
void resolveGlossaryStream(Stream & rStream);
- void resolveEmbeddingsStream(OOXMLStream::Pointer_t pStream);
+ void resolveEmbeddingsStream(const OOXMLStream::Pointer_t& pStream);
public:
OOXMLDocumentImpl(OOXMLStream::Pointer_t pStream, const css::uno::Reference<css::task::XStatusIndicator>& xStatusIndicator, bool bSkipImages, const css::uno::Sequence<css::beans::PropertyValue>& rDescriptor);
virtual ~OOXMLDocumentImpl();
diff --git a/writerfilter/source/ooxml/OOXMLFactory.cxx b/writerfilter/source/ooxml/OOXMLFactory.cxx
index 4425dba74673..4227ae21aa07 100644
--- a/writerfilter/source/ooxml/OOXMLFactory.cxx
+++ b/writerfilter/source/ooxml/OOXMLFactory.cxx
@@ -187,7 +187,7 @@ void OOXMLFactory_ns::charactersAction(OOXMLFastContextHandler *, const OUString
{
}
-void OOXMLFactory_ns::attributeAction(OOXMLFastContextHandler *, Token_t, OOXMLValue::Pointer_t)
+void OOXMLFactory_ns::attributeAction(OOXMLFastContextHandler *, Token_t, const OOXMLValue::Pointer_t&)
{
}
diff --git a/writerfilter/source/ooxml/OOXMLFactory.hxx b/writerfilter/source/ooxml/OOXMLFactory.hxx
index acea3afa2171..edf9e630c067 100644
--- a/writerfilter/source/ooxml/OOXMLFactory.hxx
+++ b/writerfilter/source/ooxml/OOXMLFactory.hxx
@@ -70,7 +70,7 @@ public:
virtual void startAction(OOXMLFastContextHandler * pHandler);
virtual void charactersAction(OOXMLFastContextHandler * pHandler, const OUString & rString);
virtual void endAction(OOXMLFastContextHandler * pHandler);
- virtual void attributeAction(OOXMLFastContextHandler * pHandler, Token_t nToken, OOXMLValue::Pointer_t pValue);
+ virtual void attributeAction(OOXMLFastContextHandler * pHandler, Token_t nToken, const OOXMLValue::Pointer_t& pValue);
protected:
virtual ~OOXMLFactory_ns();
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index 9721aef46e95..7cc6e2c9f122 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -475,12 +475,12 @@ void OOXMLFastContextHandler::setLastSectionGroup()
}
void OOXMLFastContextHandler::newProperty
-(const Id & /*nId*/, OOXMLValue::Pointer_t /*pVal*/)
+(const Id & /*nId*/, const OOXMLValue::Pointer_t& /*pVal*/)
{
}
void OOXMLFastContextHandler::setPropertySet
-(OOXMLPropertySet::Pointer_t /* pPropertySet */)
+(const OOXMLPropertySet::Pointer_t& /* pPropertySet */)
{
}
@@ -755,7 +755,7 @@ void OOXMLFastContextHandler::setXNoteId(const sal_Int32 nId)
mpParserState->setXNoteId(nId);
}
-void OOXMLFastContextHandler::setXNoteId(OOXMLValue::Pointer_t pValue)
+void OOXMLFastContextHandler::setXNoteId(const OOXMLValue::Pointer_t& pValue)
{
mpParserState->setXNoteId(sal_Int32(pValue->getInt()));
}
@@ -878,7 +878,7 @@ OOXMLFastContextHandlerStream::~OOXMLFastContextHandlerStream()
}
void OOXMLFastContextHandlerStream::newProperty(const Id & rId,
- OOXMLValue::Pointer_t pVal)
+ const OOXMLValue::Pointer_t& pVal)
{
if (rId != 0x0)
{
@@ -952,7 +952,7 @@ OOXMLValue::Pointer_t OOXMLFastContextHandlerProperties::getValue() const
}
void OOXMLFastContextHandlerProperties::newProperty
-(const Id & rId, OOXMLValue::Pointer_t pVal)
+(const Id & rId, const OOXMLValue::Pointer_t& pVal)
{
if (rId != 0x0)
{
@@ -1049,7 +1049,7 @@ void OOXMLFastContextHandlerProperties::setParent
}
void OOXMLFastContextHandlerProperties::setPropertySet
-(OOXMLPropertySet::Pointer_t pPropertySet)
+(const OOXMLPropertySet::Pointer_t& pPropertySet)
{
if (pPropertySet.get() != nullptr)
mpPropertySet = pPropertySet;
@@ -1106,7 +1106,7 @@ OOXMLFastContextHandlerValue::~OOXMLFastContextHandlerValue()
{
}
-void OOXMLFastContextHandlerValue::setValue(OOXMLValue::Pointer_t pValue)
+void OOXMLFastContextHandlerValue::setValue(const OOXMLValue::Pointer_t& pValue)
{
mpValue = pValue;
}
@@ -1259,12 +1259,12 @@ void OOXMLFastContextHandlerXNote::lcl_endFastElement
setForwardEvents(mbForwardEventsSaved);
}
-void OOXMLFastContextHandlerXNote::checkId(OOXMLValue::Pointer_t pValue)
+void OOXMLFastContextHandlerXNote::checkId(const OOXMLValue::Pointer_t& pValue)
{
mnMyXNoteId = sal_Int32(pValue->getInt());
}
-void OOXMLFastContextHandlerXNote::checkType(OOXMLValue::Pointer_t pValue)
+void OOXMLFastContextHandlerXNote::checkType(const OOXMLValue::Pointer_t& pValue)
{
mnMyXNoteType = pValue->getInt();
}
@@ -1367,7 +1367,7 @@ void OOXMLFastContextHandlerTextTableRow::endRow()
// Handle w:gridBefore here by faking necessary input that'll fake cells. I'm apparently
// not insane enough to find out how to add cells in dmapper.
-void OOXMLFastContextHandlerTextTableRow::handleGridBefore( OOXMLValue::Pointer_t val )
+void OOXMLFastContextHandlerTextTableRow::handleGridBefore( const OOXMLValue::Pointer_t& val )
{
int count = val->getInt();
for( int i = 0;
@@ -1844,7 +1844,7 @@ OOXMLFastContextHandlerWrapper::getFastContextHandler() const
}
void OOXMLFastContextHandlerWrapper::newProperty
-(const Id & rId, OOXMLValue::Pointer_t pVal)
+(const Id & rId, const OOXMLValue::Pointer_t& pVal)
{
if (mxContext.is())
{
@@ -1855,7 +1855,7 @@ void OOXMLFastContextHandlerWrapper::newProperty
}
void OOXMLFastContextHandlerWrapper::setPropertySet
-(OOXMLPropertySet::Pointer_t pPropertySet)
+(const OOXMLPropertySet::Pointer_t& pPropertySet)
{
if (mxContext.is())
{
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
index ff888be08b1a..70726a76731c 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
@@ -99,8 +99,8 @@ public:
virtual void attributes(const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs) throw (css::uno::RuntimeException, css::xml::sax::SAXException);
- virtual void newProperty(const Id & rId, OOXMLValue::Pointer_t pVal);
- virtual void setPropertySet(OOXMLPropertySet::Pointer_t pPropertySet);
+ virtual void newProperty(const Id & rId, const OOXMLValue::Pointer_t& pVal);
+ virtual void setPropertySet(const OOXMLPropertySet::Pointer_t& pPropertySet);
virtual OOXMLPropertySet::Pointer_t getPropertySet() const;
virtual void setToken(Token_t nToken);
@@ -120,7 +120,7 @@ public:
void setDocument(OOXMLDocumentImpl* pDocument);
OOXMLDocumentImpl* getDocument();
- void setXNoteId(OOXMLValue::Pointer_t pValue);
+ void setXNoteId(const OOXMLValue::Pointer_t& pValue);
void setXNoteId(const sal_Int32 nId);
sal_Int32 getXNoteId() const;
void setForwardEvents(bool bForwardEvents);
@@ -247,7 +247,7 @@ public:
OOXMLPropertySet::Pointer_t getPropertySetAttrs() const { return mpPropertySetAttrs;}
- virtual void newProperty(const Id & rId, OOXMLValue::Pointer_t pVal) override;
+ virtual void newProperty(const Id & rId, const OOXMLValue::Pointer_t& pVal) override;
void sendProperty(Id nId);
virtual OOXMLPropertySet::Pointer_t getPropertySet() const override;
@@ -266,7 +266,7 @@ public:
virtual OOXMLValue::Pointer_t getValue() const override;
virtual ResourceEnum_t getResource() const override { return PROPERTIES; }
- virtual void newProperty(const Id & nId, OOXMLValue::Pointer_t pVal) override;
+ virtual void newProperty(const Id & nId, const OOXMLValue::Pointer_t& pVal) override;
void handleXNotes();
void handleHdrFtr();
@@ -276,7 +276,7 @@ public:
void handleOLE();
void handleFontRel();
- virtual void setPropertySet(OOXMLPropertySet::Pointer_t pPropertySet) override;
+ virtual void setPropertySet(const OOXMLPropertySet::Pointer_t& pPropertySet) override;
virtual OOXMLPropertySet::Pointer_t getPropertySet() const override;
protected:
@@ -313,7 +313,7 @@ public:
explicit OOXMLFastContextHandlerValue(OOXMLFastContextHandler * pContext);
virtual ~OOXMLFastContextHandlerValue();
- void setValue(OOXMLValue::Pointer_t pValue);
+ void setValue(const OOXMLValue::Pointer_t& pValue);
virtual OOXMLValue::Pointer_t getValue() const override;
virtual void lcl_endFastElement(Token_t Element)
@@ -361,9 +361,9 @@ public:
explicit OOXMLFastContextHandlerXNote(OOXMLFastContextHandler * pContext);
virtual ~OOXMLFastContextHandlerXNote();
- void checkId(OOXMLValue::Pointer_t pValue);
+ void checkId(const OOXMLValue::Pointer_t& pValue);
- void checkType(OOXMLValue::Pointer_t pValue);
+ void checkType(const OOXMLValue::Pointer_t& pValue);
virtual std::string getType() const override { return "XNote"; }
@@ -403,7 +403,7 @@ public:
static void startRow();
void endRow();
- void handleGridBefore( OOXMLValue::Pointer_t val );
+ void handleGridBefore( const OOXMLValue::Pointer_t& val );
private:
static OOXMLProperty::Pointer_t fakeNoBorder( Id id );
};
@@ -503,8 +503,8 @@ public:
void addNamespace(const Id & nId);
void addToken( Token_t Element );
- virtual void newProperty(const Id & rId, OOXMLValue::Pointer_t pVal) override;
- virtual void setPropertySet(OOXMLPropertySet::Pointer_t pPropertySet) override;
+ virtual void newProperty(const Id & rId, const OOXMLValue::Pointer_t& pVal) override;
+ virtual void setPropertySet(const OOXMLPropertySet::Pointer_t& pPropertySet) override;
virtual OOXMLPropertySet::Pointer_t getPropertySet() const override;
virtual std::string getType() const override;
diff --git a/writerfilter/source/ooxml/OOXMLParserState.cxx b/writerfilter/source/ooxml/OOXMLParserState.cxx
index 3178bdf83115..71d0290b707a 100644
--- a/writerfilter/source/ooxml/OOXMLParserState.cxx
+++ b/writerfilter/source/ooxml/OOXMLParserState.cxx
@@ -121,7 +121,7 @@ void OOXMLParserState::resolveCharacterProperties(Stream & rStream)
}
}
-void OOXMLParserState::setCharacterProperties(OOXMLPropertySet::Pointer_t pProps)
+void OOXMLParserState::setCharacterProperties(const OOXMLPropertySet::Pointer_t& pProps)
{
if (mpCharacterProps.get() == nullptr)
mpCharacterProps = pProps;
@@ -129,7 +129,7 @@ void OOXMLParserState::setCharacterProperties(OOXMLPropertySet::Pointer_t pProps
mpCharacterProps->add(pProps);
}
-void OOXMLParserState::setCellProperties(OOXMLPropertySet::Pointer_t pProps)
+void OOXMLParserState::setCellProperties(const OOXMLPropertySet::Pointer_t& pProps)
{
if (!mCellProps.empty())
{
@@ -142,7 +142,7 @@ void OOXMLParserState::setCellProperties(OOXMLPropertySet::Pointer_t pProps)
}
}
-void OOXMLParserState::setRowProperties(OOXMLPropertySet::Pointer_t pProps)
+void OOXMLParserState::setRowProperties(const OOXMLPropertySet::Pointer_t& pProps)
{
if (!mRowProps.empty())
{
@@ -198,7 +198,7 @@ void OOXMLParserState::resolveTableProperties(Stream & rStream)
}
}
-void OOXMLParserState::setTableProperties(OOXMLPropertySet::Pointer_t pProps)
+void OOXMLParserState::setTableProperties(const OOXMLPropertySet::Pointer_t& pProps)
{
if (!mTableProps.empty())
{
diff --git a/writerfilter/source/ooxml/OOXMLParserState.hxx b/writerfilter/source/ooxml/OOXMLParserState.hxx
index 5e62c3642294..ea3e00401313 100644
--- a/writerfilter/source/ooxml/OOXMLParserState.hxx
+++ b/writerfilter/source/ooxml/OOXMLParserState.hxx
@@ -95,13 +95,13 @@ public:
const OUString & getTarget() const;
void resolveCharacterProperties(Stream & rStream);
- void setCharacterProperties(OOXMLPropertySet::Pointer_t pProps);
+ void setCharacterProperties(const OOXMLPropertySet::Pointer_t& pProps);
void resolveCellProperties(Stream & rStream);
- void setCellProperties(OOXMLPropertySet::Pointer_t pProps);
+ void setCellProperties(const OOXMLPropertySet::Pointer_t& pProps);
void resolveRowProperties(Stream & rStream);
- void setRowProperties(OOXMLPropertySet::Pointer_t pProps);
+ void setRowProperties(const OOXMLPropertySet::Pointer_t& pProps);
void resolveTableProperties(Stream & rStream);
- void setTableProperties(OOXMLPropertySet::Pointer_t pProps);
+ void setTableProperties(const OOXMLPropertySet::Pointer_t& pProps);
void startTable();
void endTable();
diff --git a/writerfilter/source/ooxml/OOXMLPropertySet.cxx b/writerfilter/source/ooxml/OOXMLPropertySet.cxx
index 82c6cfd0bf93..81e52ace7594 100644
--- a/writerfilter/source/ooxml/OOXMLPropertySet.cxx
+++ b/writerfilter/source/ooxml/OOXMLPropertySet.cxx
@@ -385,7 +385,7 @@ OOXMLPropertySet::end() const
return mProperties.end();
}
-void OOXMLPropertySet::add(OOXMLProperty::Pointer_t pProperty)
+void OOXMLPropertySet::add(const OOXMLProperty::Pointer_t& pProperty)
{
if (pProperty.get() != nullptr && pProperty->getId() != 0x0)
{
@@ -393,7 +393,7 @@ void OOXMLPropertySet::add(OOXMLProperty::Pointer_t pProperty)
}
}
-void OOXMLPropertySet::add(OOXMLPropertySet::Pointer_t pPropertySet)
+void OOXMLPropertySet::add(const OOXMLPropertySet::Pointer_t& pPropertySet)
{
if (pPropertySet.get() != nullptr)
{
@@ -722,7 +722,7 @@ void OOXMLTable::resolve(Table & rTable)
}
}
-void OOXMLTable::add(ValuePointer_t pPropertySet)
+void OOXMLTable::add(const ValuePointer_t& pPropertySet)
{
if (pPropertySet.get() != nullptr)
mPropertySets.push_back(pPropertySet);
diff --git a/writerfilter/source/ooxml/OOXMLPropertySet.hxx b/writerfilter/source/ooxml/OOXMLPropertySet.hxx
index c7deb523163d..27e7b1233348 100644
--- a/writerfilter/source/ooxml/OOXMLPropertySet.hxx
+++ b/writerfilter/source/ooxml/OOXMLPropertySet.hxx
@@ -151,8 +151,8 @@ public:
virtual ~OOXMLPropertySet();
void resolve(Properties & rHandler) override;
- void add(OOXMLProperty::Pointer_t pProperty);
- void add(OOXMLPropertySet::Pointer_t pPropertySet);
+ void add(const OOXMLProperty::Pointer_t& pProperty);
+ void add(const OOXMLPropertySet::Pointer_t& pPropertySet);
OOXMLPropertySet * clone() const;
OOXMLProperties_t::iterator begin();
@@ -175,7 +175,7 @@ public:
virtual ~OOXMLTable();
void resolve(Table & rTable) override;
- void add(ValuePointer_t pPropertySet);
+ void add(const ValuePointer_t& pPropertySet);
OOXMLTable * clone() const;
private:
typedef std::vector<ValuePointer_t> PropertySets_t;
diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
index 8ffcb5854c47..317403688fb4 100644
--- a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
@@ -81,7 +81,7 @@ const OUString & OOXMLStreamImpl::getTarget() const
return msTarget;
}
-bool OOXMLStreamImpl::lcl_getTarget(uno::Reference<embed::XRelationshipAccess>
+bool OOXMLStreamImpl::lcl_getTarget(const uno::Reference<embed::XRelationshipAccess>&
xRelationshipAccess,
StreamType_t nStreamType,
const OUString & rId,
@@ -411,8 +411,8 @@ uno::Reference <xml::sax::XFastTokenHandler> OOXMLStreamImpl::getFastTokenHandle
OOXMLStream::Pointer_t
OOXMLDocumentFactory::createStream
-(uno::Reference<uno::XComponentContext> xContext,
- uno::Reference<io::XInputStream> rStream,
+(const uno::Reference<uno::XComponentContext>& xContext,
+ const uno::Reference<io::XInputStream>& rStream,
bool bRepairStorage)
{
OOXMLStreamImpl * pStream = new OOXMLStreamImpl(xContext, rStream,
@@ -422,7 +422,7 @@ OOXMLDocumentFactory::createStream
OOXMLStream::Pointer_t
OOXMLDocumentFactory::createStream
-(OOXMLStream::Pointer_t pStream, OOXMLStream::StreamType_t nStreamType)
+(const OOXMLStream::Pointer_t& pStream, OOXMLStream::StreamType_t nStreamType)
{
OOXMLStream::Pointer_t pRet;
if (OOXMLStreamImpl* pImpl = dynamic_cast<OOXMLStreamImpl *>(pStream.get()))
@@ -432,7 +432,7 @@ OOXMLDocumentFactory::createStream
OOXMLStream::Pointer_t
OOXMLDocumentFactory::createStream
-(OOXMLStream::Pointer_t pStream, const OUString & rId)
+(const OOXMLStream::Pointer_t& pStream, const OUString & rId)
{
OOXMLStream::Pointer_t pRet;
if (OOXMLStreamImpl* pImpl = dynamic_cast<OOXMLStreamImpl *>(pStream.get()))
diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.hxx b/writerfilter/source/ooxml/OOXMLStreamImpl.hxx
index 8c9069a5a4e5..70d12fc9a091 100644
--- a/writerfilter/source/ooxml/OOXMLStreamImpl.hxx
+++ b/writerfilter/source/ooxml/OOXMLStreamImpl.hxx
@@ -53,8 +53,7 @@ class OOXMLStreamImpl : public OOXMLStream
/// Cache holding an Id <-> Target map of external relations.
std::map<OUString, OUString> maIdCache;
- bool lcl_getTarget(css::uno::Reference<css::embed::XRelationshipAccess>
- xRelationshipAccess,
+ bool lcl_getTarget(const css::uno::Reference<css::embed::XRelationshipAccess>& xRelationshipAccess,
StreamType_t nStreamType,
const OUString & rId,
OUString & rDocumentTarget);
diff --git a/writerfilter/source/ooxml/factory_ns.py b/writerfilter/source/ooxml/factory_ns.py
index c9194cf9dc14..be990dca0a08 100644
--- a/writerfilter/source/ooxml/factory_ns.py
+++ b/writerfilter/source/ooxml/factory_ns.py
@@ -51,7 +51,7 @@ public:
print(" void %sAction(OOXMLFastContextHandler* pHandler);" % action)
print("""virtual void charactersAction(OOXMLFastContextHandler* pHandler, const OUString & sText);
- virtual void attributeAction(OOXMLFastContextHandler* pHandler, Token_t nToken, OOXMLValue::Pointer_t pValue);
+ virtual void attributeAction(OOXMLFastContextHandler* pHandler, Token_t nToken, const OOXMLValue::Pointer_t& pValue);
virtual ~OOXMLFactory_%s();
diff --git a/writerfilter/source/ooxml/factoryimpl_ns.py b/writerfilter/source/ooxml/factoryimpl_ns.py
index 927f0307b440..6ad9a83038a0 100644
--- a/writerfilter/source/ooxml/factoryimpl_ns.py
+++ b/writerfilter/source/ooxml/factoryimpl_ns.py
@@ -674,7 +674,7 @@ def factoryAttributeAction(nsNode):
nsLabel = nsToLabel(nsNode)
inner = factoryAttributeActionInner(nsNode)
if len(inner):
- print("""void OOXMLFactory_%s::attributeAction(OOXMLFastContextHandler* _pHandler, Token_t nToken, OOXMLValue::Pointer_t pValue)
+ print("""void OOXMLFactory_%s::attributeAction(OOXMLFastContextHandler* _pHandler, Token_t nToken, const OOXMLValue::Pointer_t& pValue)
{
switch (_pHandler->getDefine())
{""" % nsLabel)
@@ -685,7 +685,7 @@ def factoryAttributeAction(nsNode):
print("}")
print()
else:
- print("void OOXMLFactory_%s::attributeAction(OOXMLFastContextHandler*, Token_t, OOXMLValue::Pointer_t)" % nsLabel)
+ print("void OOXMLFactory_%s::attributeAction(OOXMLFastContextHandler*, Token_t, const OOXMLValue::Pointer_t&)" % nsLabel)
print("{")
print("}")
print()
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index a526fc2f77ea..6d5b1d3a1d23 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -65,7 +65,7 @@ static Id lcl_getParagraphBorder(sal_uInt32 nIndex)
return aBorderIds[nIndex];
}
-static void lcl_putNestedAttribute(RTFSprms& rSprms, Id nParent, Id nId, RTFValue::Pointer_t pValue,
+static void lcl_putNestedAttribute(RTFSprms& rSprms, Id nParent, Id nId, const RTFValue::Pointer_t& pValue,
RTFOverwrite eOverwrite = RTFOverwrite::YES, bool bAttribute = true)
{
RTFValue::Pointer_t pParent = rSprms.find(nParent, /*bFirst=*/true, /*bForWrite=*/true);
@@ -86,7 +86,7 @@ static void lcl_putNestedAttribute(RTFSprms& rSprms, Id nParent, Id nId, RTFValu
rAttributes.set(nId, pValue, eOverwrite);
}
-static void lcl_putNestedSprm(RTFSprms& rSprms, Id nParent, Id nId, RTFValue::Pointer_t pValue)
+static void lcl_putNestedSprm(RTFSprms& rSprms, Id nParent, Id nId, const RTFValue::Pointer_t& pValue)
{
lcl_putNestedAttribute(rSprms, nParent, nId, pValue, RTFOverwrite::NO_APPEND, false);
}
@@ -123,7 +123,7 @@ static RTFSprms& lcl_getLastAttributes(RTFSprms& rSprms, Id nId)
}
static void
-lcl_putBorderProperty(RTFStack& aStates, Id nId, RTFValue::Pointer_t pValue)
+lcl_putBorderProperty(RTFStack& aStates, Id nId, const RTFValue::Pointer_t& pValue)
{
RTFSprms* pAttributes = nullptr;
if (aStates.top().nBorderState == RTFBorderState::PARAGRAPH_BOX)