clang-tidy performance-unnecessary-value-param in writerfilter

Change-Id: I1f61be80ac1ebe42668580b09a261e7e3af1a403
This commit is contained in:
Noel Grandin 2016-04-12 10:34:46 +02:00
parent 8dcb7cf2a5
commit c473472fc0
39 changed files with 165 additions and 166 deletions

View File

@ -239,19 +239,19 @@ class OOXMLDocumentFactory
{ {
public: public:
static OOXMLStream::Pointer_t static OOXMLStream::Pointer_t
createStream(css::uno::Reference<css::uno::XComponentContext> rContext, createStream(const css::uno::Reference<css::uno::XComponentContext>& rContext,
css::uno::Reference<css::io::XInputStream> rStream, const css::uno::Reference<css::io::XInputStream>& rStream,
bool bRepairStorage); bool bRepairStorage);
static OOXMLStream::Pointer_t static OOXMLStream::Pointer_t
createStream(OOXMLStream::Pointer_t pStream, createStream(const OOXMLStream::Pointer_t& pStream,
OOXMLStream::StreamType_t nStreamType = OOXMLStream::DOCUMENT); OOXMLStream::StreamType_t nStreamType = OOXMLStream::DOCUMENT);
static OOXMLStream::Pointer_t static OOXMLStream::Pointer_t
createStream(OOXMLStream::Pointer_t pStream, const OUString & rId); createStream(const OOXMLStream::Pointer_t& pStream, const OUString & rId);
static OOXMLDocument * static OOXMLDocument *
createDocument(OOXMLStream::Pointer_t pStream, createDocument(const OOXMLStream::Pointer_t& pStream,
const css::uno::Reference<css::task::XStatusIndicator>& xStatusIndicator, const css::uno::Reference<css::task::XStatusIndicator>& xStatusIndicator,
bool bSkipImage, const css::uno::Sequence<css::beans::PropertyValue>& rDescriptor); bool bSkipImage, const css::uno::Sequence<css::beans::PropertyValue>& rDescriptor);

View File

@ -1155,7 +1155,7 @@ static sal_Int32 lcl_getListId(const StyleSheetEntryPtr& rEntry, const StyleShee
return lcl_getListId(pParent, rStyleTable); 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. // These SPRM's are not specific to any section, so it's expected that there is no context yet.
switch (rSprm.getId()) 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 ); m_pImpl->PushStyleProperties( pStyleProperties );
if ( bAffectTableMngr ) 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 ); m_pImpl->PushListProperties( pListProperties );
} }

View File

@ -91,12 +91,12 @@ public:
virtual void data(const sal_uInt8* buf, size_t len, virtual void data(const sal_uInt8* buf, size_t len,
writerfilter::Reference<Properties>::Pointer_t ref) override; 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 PopStyleSheetProperties( bool bAffectTableMngr = false );
void PushListProperties( ::std::shared_ptr<PropertyMap> pListProperties ); void PushListProperties( const ::std::shared_ptr<PropertyMap>& pListProperties );
void PopListProperties(); void PopListProperties();
bool IsOOXMLImport() const; bool IsOOXMLImport() const;

View File

@ -65,7 +65,7 @@ DomainMapperTableHandler::~DomainMapperTableHandler()
} }
void DomainMapperTableHandler::startTable(unsigned int /*nDepth*/, void DomainMapperTableHandler::startTable(unsigned int /*nDepth*/,
TablePropertyMapPtr pProps) const TablePropertyMapPtr& pProps)
{ {
m_aTableProperties = pProps; m_aTableProperties = pProps;
m_aTableRanges.clear(); 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; PropertyMapPtr pRet;
@ -108,7 +108,7 @@ PropertyMapPtr lcl_SearchParentStyleSheetAndMergeProperties(const StyleSheetEntr
return pRet; 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); 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 ) sal_Int32 nCell, sal_Int32 nRow, bool bIsEndCol, bool bIsEndRow )
{ {
boost::optional<PropertyMap::Property> pVerticalVal = pCellProps->getProperty(META_PROP_VERTICAL_BORDER); boost::optional<PropertyMap::Property> pVerticalVal = pCellProps->getProperty(META_PROP_VERTICAL_BORDER);
@ -262,7 +262,7 @@ struct TableInfo
namespace 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) if (!pTableProperties)
return false; return false;
@ -1132,7 +1132,7 @@ void DomainMapperTableHandler::endTable(unsigned int nestedTableLevel)
#endif #endif
} }
void DomainMapperTableHandler::startRow(TablePropertyMapPtr pProps) void DomainMapperTableHandler::startRow(const TablePropertyMapPtr& pProps)
{ {
m_aRowProperties.push_back( pProps ); m_aRowProperties.push_back( pProps );
m_aCellProperties.push_back( PropertyMapVector1() ); m_aCellProperties.push_back( PropertyMapVector1() );
@ -1155,7 +1155,7 @@ void DomainMapperTableHandler::endRow()
} }
void DomainMapperTableHandler::startCell(const css::uno::Reference< css::text::XTextRange > & start, void DomainMapperTableHandler::startCell(const css::uno::Reference< css::text::XTextRange > & start,
TablePropertyMapPtr pProps ) const TablePropertyMapPtr& pProps )
{ {
sal_uInt32 nRow = m_aRowProperties.size(); sal_uInt32 nRow = m_aRowProperties.size();
if ( pProps.get( ) ) if ( pProps.get( ) )

View File

@ -92,7 +92,7 @@ public:
@param nDepth depth of the table in surrounding table hierarchy @param nDepth depth of the table in surrounding table hierarchy
@param pProps properties of the table @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. /// Handle end of table.
void endTable(unsigned int nestedTableLevel); void endTable(unsigned int nestedTableLevel);
/** /**
@ -100,7 +100,7 @@ public:
@param pProps properties of the row @param pProps properties of the row
*/ */
void startRow(TablePropertyMapPtr pProps); void startRow(const TablePropertyMapPtr& pProps);
/// Handle end of row. /// Handle end of row.
void endRow(); void endRow();
/** /**
@ -109,7 +109,7 @@ public:
@param rT start handle of the cell @param rT start handle of the cell
@param pProps properties 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. Handle end of cell.

View File

@ -105,7 +105,7 @@ public:
const css::uno::Sequence<css::beans::PropertyValue> getCurrentTablePosition(); const css::uno::Sequence<css::beans::PropertyValue> getCurrentTablePosition();
TablePositionHandler* getCurrentTableRealPosition(); TablePositionHandler* getCurrentTableRealPosition();
virtual void cellProps(TablePropertyMapPtr pProps) override virtual void cellProps(const TablePropertyMapPtr& pProps) override
{ {
if ( m_pStyleProps.get( ) ) if ( m_pStyleProps.get( ) )
m_pStyleProps->InsertProps(pProps); m_pStyleProps->InsertProps(pProps);
@ -113,7 +113,7 @@ public:
TableManager::cellProps( pProps ); 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( ) ) if ( m_pStyleProps.get( ) )
m_pStyleProps->InsertProps(pProps); m_pStyleProps->InsertProps(pProps);
@ -121,7 +121,7 @@ public:
TableManager::cellPropsByCell( i, pProps ); TableManager::cellPropsByCell( i, pProps );
}; };
virtual void insertRowProps(TablePropertyMapPtr pProps) override virtual void insertRowProps(const TablePropertyMapPtr& pProps) override
{ {
if ( m_pStyleProps.get( ) ) if ( m_pStyleProps.get( ) )
m_pStyleProps->InsertProps(pProps); m_pStyleProps->InsertProps(pProps);
@ -129,7 +129,7 @@ public:
TableManager::insertRowProps( pProps ); TableManager::insertRowProps( pProps );
}; };
virtual void insertTableProps(TablePropertyMapPtr pProps) override virtual void insertTableProps(const TablePropertyMapPtr& pProps) override
{ {
if ( m_pStyleProps.get( ) ) if ( m_pStyleProps.get( ) )
m_pStyleProps->InsertProps(pProps); m_pStyleProps->InsertProps(pProps);

View File

@ -90,7 +90,7 @@ namespace writerfilter {
namespace dmapper{ namespace dmapper{
//line numbering for header/footer //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 ); const StyleSheetEntryPtr pEntry = dmapper->GetStyleSheetTable()->FindStyleSheetByISTD( rname );
if (!pEntry) if (!pEntry)
@ -114,7 +114,7 @@ void lcl_linenumberingHeaderFooter( uno::Reference<container::XNameContainer> xS
} }
// Populate Dropdown Field properties from FFData structure // 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() ) 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 ) 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_aPropertyStacks[CONTEXT_STYLESHEET].push( pStyleProperties );
m_aContextStack.push(CONTEXT_STYLESHEET); 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_aPropertyStacks[CONTEXT_LIST].push( pListProperties );
m_aContextStack.push(CONTEXT_LIST); m_aContextStack.push(CONTEXT_LIST);
@ -787,7 +787,7 @@ void lcl_MoveBorderPropertiesToFrame(std::vector<beans::PropertyValue>& rFramePr
void lcl_AddRangeAndStyle( void lcl_AddRangeAndStyle(
ParagraphPropertiesPtr& pToBeSavedProperties, ParagraphPropertiesPtr& pToBeSavedProperties,
uno::Reference< text::XTextAppend > const& xTextAppend, uno::Reference< text::XTextAppend > const& xTextAppend,
PropertyMapPtr pPropertyMap, const PropertyMapPtr& pPropertyMap,
TextAppendContext& rAppendContext) TextAppendContext& rAppendContext)
{ {
uno::Reference<text::XParagraphCursor> xParaCursor( 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 #ifdef DEBUG_WRITERFILTER
TagLogger::getInstance().startElement("finishParagraph"); TagLogger::getInstance().startElement("finishParagraph");
@ -1200,7 +1200,7 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap )
#endif #endif
} }
void DomainMapper_Impl::appendTextPortion( const OUString& rString, PropertyMapPtr pPropertyMap ) void DomainMapper_Impl::appendTextPortion( const OUString& rString, const PropertyMapPtr& pPropertyMap )
{ {
if (m_bDiscardHeaderFooter) if (m_bDiscardHeaderFooter)
return; 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"; static const char sEmbeddedService[] = "com.sun.star.text.TextEmbeddedObject";
try try
@ -1620,7 +1620,7 @@ void DomainMapper_Impl::PushFootOrEndnote( bool bIsFootnote )
} }
void DomainMapper_Impl::CreateRedline(uno::Reference<text::XTextRange> const& xRange, void DomainMapper_Impl::CreateRedline(uno::Reference<text::XTextRange> const& xRange,
RedlineParamsPtr pRedline) const RedlineParamsPtr& pRedline)
{ {
if ( pRedline.get( ) ) if ( pRedline.get( ) )
{ {
@ -2890,7 +2890,7 @@ const FieldConversionMap_t & lcl_GetEnhancedFieldConversion()
} }
void DomainMapper_Impl::handleFieldAsk void DomainMapper_Impl::handleFieldAsk
(FieldContextPtr pContext, (const FieldContextPtr& pContext,
uno::Reference< uno::XInterface > & xFieldInterface, uno::Reference< uno::XInterface > & xFieldInterface,
uno::Reference< beans::XPropertySet > const& xFieldProperties) 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()); const OUString & rCommand(pContext->GetCommand());
sal_Int32 nIndex = 0, nEnd = 0; sal_Int32 nIndex = 0, nEnd = 0;
@ -3006,7 +3006,7 @@ void DomainMapper_Impl::handleRubyEQField( FieldContextPtr pContext)
} }
void DomainMapper_Impl::handleAutoNum void DomainMapper_Impl::handleAutoNum
(FieldContextPtr pContext, (const FieldContextPtr& pContext,
uno::Reference< uno::XInterface > & xFieldInterface, uno::Reference< uno::XInterface > & xFieldInterface,
uno::Reference< beans::XPropertySet > const& xFieldProperties) uno::Reference< beans::XPropertySet > const& xFieldProperties)
{ {
@ -3049,7 +3049,7 @@ void DomainMapper_Impl::handleAuthor
} }
void DomainMapper_Impl::handleDocProperty void DomainMapper_Impl::handleDocProperty
(FieldContextPtr pContext, (const FieldContextPtr& pContext,
OUString const& rFirstParam, OUString const& rFirstParam,
uno::Reference< uno::XInterface > & xFieldInterface, uno::Reference< uno::XInterface > & xFieldInterface,
uno::Reference< beans::XPropertySet > const&) uno::Reference< beans::XPropertySet > const&)
@ -3203,7 +3203,7 @@ uno::Sequence< beans::PropertyValues > lcl_createTOXLevelHyperlinks( bool bHyper
} }
void DomainMapper_Impl::handleToc void DomainMapper_Impl::handleToc
(FieldContextPtr pContext, (const FieldContextPtr& pContext,
uno::Reference< uno::XInterface > & /*xFieldInterface*/, uno::Reference< uno::XInterface > & /*xFieldInterface*/,
uno::Reference< beans::XPropertySet > const& /*xFieldProperties*/, uno::Reference< beans::XPropertySet > const& /*xFieldProperties*/,
const OUString & sTOCServiceName) const OUString & sTOCServiceName)
@ -3447,7 +3447,7 @@ void DomainMapper_Impl::handleToc
} }
void DomainMapper_Impl::handleBibliography void DomainMapper_Impl::handleBibliography
(FieldContextPtr pContext, (const FieldContextPtr& pContext,
const OUString & sTOCServiceName) const OUString & sTOCServiceName)
{ {
uno::Reference< beans::XPropertySet > xTOC; uno::Reference< beans::XPropertySet > xTOC;
@ -3469,7 +3469,7 @@ void DomainMapper_Impl::handleBibliography
} }
void DomainMapper_Impl::handleIndex void DomainMapper_Impl::handleIndex
(FieldContextPtr pContext, (const FieldContextPtr& pContext,
uno::Reference< uno::XInterface > & /*xFieldInterface*/, uno::Reference< uno::XInterface > & /*xFieldInterface*/,
uno::Reference< beans::XPropertySet > const& /*xFieldProperties*/, uno::Reference< beans::XPropertySet > const& /*xFieldProperties*/,
const OUString & sTOCServiceName) 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 #ifdef DEBUG_WRITERFILTER
TagLogger::getInstance().startElement("setFieldFFData"); 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); GetGraphicImport(eGraphicImportType);
if( eGraphicImportType != IMPORT_AS_DETECTED_INLINE && eGraphicImportType != IMPORT_AS_DETECTED_ANCHOR ) if( eGraphicImportType != IMPORT_AS_DETECTED_INLINE && eGraphicImportType != IMPORT_AS_DETECTED_ANCHOR )

View File

@ -493,7 +493,7 @@ public:
} }
void SetDocumentSettingsProperty( const OUString& rPropName, const css::uno::Any& rValue ); 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); void CheckParaMarkerRedline(css::uno::Reference<css::text::XTextRange> const& xRange);
@ -547,17 +547,17 @@ public:
void setParaSdtEndDeferred(bool bParaSdtEndDeferred); void setParaSdtEndDeferred(bool bParaSdtEndDeferred);
bool isParaSdtEndDeferred(); bool isParaSdtEndDeferred();
void finishParagraph( PropertyMapPtr pPropertyMap ); void finishParagraph( const PropertyMapPtr& pPropertyMap );
void appendTextPortion( const OUString& rString, 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 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 ); void appendStarMath( const Value& v );
css::uno::Reference<css::beans::XPropertySet> appendTextSectionAfter(css::uno::Reference<css::text::XTextRange>& xBefore); 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 // push the new properties onto the stack and make it the 'current' property map
void PushProperties(ContextType eId); void PushProperties(ContextType eId);
void PushStyleProperties(PropertyMapPtr pStyleProperties); void PushStyleProperties(const PropertyMapPtr& pStyleProperties);
void PushListProperties(PropertyMapPtr pListProperties); void PushListProperties(const PropertyMapPtr& pListProperties);
void PopProperties(ContextType eId); void PopProperties(ContextType eId);
ContextType GetTopContextType() const { return m_aContextStack.top(); } ContextType GetTopContextType() const { return m_aContextStack.top(); }
@ -600,7 +600,7 @@ public:
GraphicImportPtr GetGraphicImport( GraphicImportType eGraphicImportType ); GraphicImportPtr GetGraphicImport( GraphicImportType eGraphicImportType );
void ResetGraphicImport(); void ResetGraphicImport();
// this method deletes the current m_pGraphicImport after import // 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 InitTabStopFromStyle(const css::uno::Sequence<css::style::TabStop>& rInitTabStops);
void IncorporateTabStop( const DeletableTabStop &aTabStop ); void IncorporateTabStop( const DeletableTabStop &aTabStop );
@ -648,13 +648,13 @@ public:
void SetFieldLocked(); void SetFieldLocked();
//collect the pieces of the command //collect the pieces of the command
void AppendFieldCommand(OUString& rPartOfCommand); void AppendFieldCommand(OUString& rPartOfCommand);
void handleRubyEQField( FieldContextPtr pContext); void handleRubyEQField( const FieldContextPtr& pContext);
void handleFieldAsk void handleFieldAsk
(FieldContextPtr pContext, (const FieldContextPtr& pContext,
css::uno::Reference< css::uno::XInterface > & xFieldInterface, css::uno::Reference< css::uno::XInterface > & xFieldInterface,
css::uno::Reference< css::beans::XPropertySet > const& xFieldProperties); css::uno::Reference< css::beans::XPropertySet > const& xFieldProperties);
void handleAutoNum void handleAutoNum
(FieldContextPtr pContext, (const FieldContextPtr& pContext,
css::uno::Reference< css::uno::XInterface > & xFieldInterface, css::uno::Reference< css::uno::XInterface > & xFieldInterface,
css::uno::Reference< css::beans::XPropertySet > const& xFieldProperties); css::uno::Reference< css::beans::XPropertySet > const& xFieldProperties);
static void handleAuthor static void handleAuthor
@ -663,23 +663,23 @@ public:
css::uno::Reference< css::beans::XPropertySet > const& xFieldProperties, css::uno::Reference< css::beans::XPropertySet > const& xFieldProperties,
FieldId eFieldId); FieldId eFieldId);
void handleDocProperty void handleDocProperty
(FieldContextPtr pContext, (const FieldContextPtr& pContext,
OUString const& rFirstParam, OUString const& rFirstParam,
css::uno::Reference< css::uno::XInterface > & xFieldInterface, css::uno::Reference< css::uno::XInterface > & xFieldInterface,
css::uno::Reference< css::beans::XPropertySet > const& xFieldProperties); css::uno::Reference< css::beans::XPropertySet > const& xFieldProperties);
void handleToc void handleToc
(FieldContextPtr pContext, (const FieldContextPtr& pContext,
css::uno::Reference< css::uno::XInterface > & xFieldInterface, css::uno::Reference< css::uno::XInterface > & xFieldInterface,
css::uno::Reference< css::beans::XPropertySet > const& xFieldProperties, css::uno::Reference< css::beans::XPropertySet > const& xFieldProperties,
const OUString & sTOCServiceName); const OUString & sTOCServiceName);
void handleIndex void handleIndex
(FieldContextPtr pContext, (const FieldContextPtr& pContext,
css::uno::Reference< css::uno::XInterface > & xFieldInterface, css::uno::Reference< css::uno::XInterface > & xFieldInterface,
css::uno::Reference< css::beans::XPropertySet > const& xFieldProperties, css::uno::Reference< css::beans::XPropertySet > const& xFieldProperties,
const OUString & sTOCServiceName); const OUString & sTOCServiceName);
void handleBibliography void handleBibliography
(FieldContextPtr pContext, (const FieldContextPtr& pContext,
const OUString & sTOCServiceName); const OUString & sTOCServiceName);
/// The field command has to be closed (cFieldSep appeared). /// The field command has to be closed (cFieldSep appeared).
void CloseFieldCommand(); void CloseFieldCommand();
@ -689,7 +689,7 @@ public:
//apply the result text to the related field //apply the result text to the related field
void SetFieldResult(OUString const& rResult); void SetFieldResult(OUString const& rResult);
// set FFData of top field context // 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. /// The end of field is reached (cFieldEnd appeared) - the command might still be open.
void PopFieldContext(); void PopFieldContext();

View File

@ -342,7 +342,7 @@ public:
return bYSizeValid; 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_LEFT_MARGIN ), uno::makeAny(nLeftMargin));
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_RIGHT_MARGIN ), uno::makeAny(nRightMargin)); xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_RIGHT_MARGIN ), uno::makeAny(nRightMargin));
@ -350,7 +350,7 @@ public:
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_BOTTOM_MARGIN ), uno::makeAny(nBottomMargin)); 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 ), xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_HORI_ORIENT ),
uno::makeAny(nHoriOrient)); uno::makeAny(nHoriOrient));
@ -358,7 +358,7 @@ public:
uno::makeAny(nVertOrient)); 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) if (!bRelativeOnly)
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_HORI_ORIENT_POSITION), xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_HORI_ORIENT_POSITION),

View File

@ -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) if (!pStyle)
return; return;

View File

@ -81,7 +81,7 @@ public:
void SetGraphicURL( const OUString& sValue ) { m_sGraphicURL = sValue; }; void SetGraphicURL( const OUString& sValue ) { m_sGraphicURL = sValue; };
void SetGraphicBitmap(css::uno::Reference<css::graphic::XGraphic> const& sValue) void SetGraphicBitmap(css::uno::Reference<css::graphic::XGraphic> const& sValue)
{ m_sGraphicBitmap = sValue; } { m_sGraphicBitmap = sValue; }
void SetParaStyle( std::shared_ptr< StyleSheetEntry > pStyle ); void SetParaStyle( const std::shared_ptr< StyleSheetEntry >& pStyle );
// Getters // Getters
OUString GetBulletChar( ) { return m_sBulletChar; }; OUString GetBulletChar( ) { return m_sBulletChar; };

View File

@ -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; OUString aFilterService;
if (m_sProgId == "Word.Document.12") if (m_sProgId == "Word.Document.12")
@ -217,7 +217,7 @@ void OLEHandler::importStream(uno::Reference<uno::XComponentContext> xComponentC
m_sProgId, m_sDrawAspect); 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; OUString aRet;

View File

@ -85,12 +85,12 @@ public:
bool isOLEObject() { return m_xInputStream.is(); } bool isOLEObject() { return m_xInputStream.is(); }
/// In case of a valid CLSID, import the native data to the previously created empty OLE object. /// 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, void importStream(const css::uno::Reference<css::uno::XComponentContext>& xComponentContext,
css::uno::Reference<css::text::XTextDocument> xTextDocument, const css::uno::Reference<css::text::XTextDocument>& xTextDocument,
css::uno::Reference<css::text::XTextContent> xOLE); 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. /// 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); OUString copyOLEOStream(css::uno::Reference<css::text::XTextDocument> const& xTextDocument);

View File

@ -804,8 +804,8 @@ bool SectionPropertyMap::HasFooter(bool bFirstPage) const
#define MIN_HEAD_FOOT_HEIGHT 100 //minimum header/footer height #define MIN_HEAD_FOOT_HEIGHT 100 //minimum header/footer height
void SectionPropertyMap::CopyHeaderFooterTextProperty ( void SectionPropertyMap::CopyHeaderFooterTextProperty (
uno::Reference< beans::XPropertySet > xPrevStyle, const uno::Reference< beans::XPropertySet >& xPrevStyle,
uno::Reference< beans::XPropertySet > xStyle, const uno::Reference< beans::XPropertySet >& xStyle,
PropertyIds ePropId ) PropertyIds ePropId )
{ {
try { try {
@ -830,8 +830,8 @@ void SectionPropertyMap::CopyHeaderFooterTextProperty (
// Copy headers and footers from the previous page style. // Copy headers and footers from the previous page style.
void SectionPropertyMap::CopyHeaderFooter( void SectionPropertyMap::CopyHeaderFooter(
uno::Reference< beans::XPropertySet > xPrevStyle, const uno::Reference< beans::XPropertySet >& xPrevStyle,
uno::Reference< beans::XPropertySet > xStyle, const uno::Reference< beans::XPropertySet >& xStyle,
bool bOmitRightHeader, bool bOmitLeftHeader, bool bOmitRightHeader, bool bOmitLeftHeader,
bool bOmitRightFooter, bool bOmitLeftFooter) bool bOmitRightFooter, bool bOmitLeftFooter)
{ {

View File

@ -250,13 +250,13 @@ class SectionPropertyMap : public PropertyMap
DomainMapper_Impl& rDM_Impl); DomainMapper_Impl& rDM_Impl);
void CopyLastHeaderFooter( bool bFirstPage, DomainMapper_Impl& rDM_Impl ); void CopyLastHeaderFooter( bool bFirstPage, DomainMapper_Impl& rDM_Impl );
static void CopyHeaderFooter( static void CopyHeaderFooter(
css::uno::Reference<css::beans::XPropertySet> xPrevStyle, const css::uno::Reference<css::beans::XPropertySet>& xPrevStyle,
css::uno::Reference<css::beans::XPropertySet> xStyle, const css::uno::Reference<css::beans::XPropertySet>& xStyle,
bool bOmitRightHeader=false, bool bOmitLeftHeader=false, bool bOmitRightHeader=false, bool bOmitLeftHeader=false,
bool bOmitRightFooter=false, bool bOmitLeftFooter=false); bool bOmitRightFooter=false, bool bOmitLeftFooter=false);
static void CopyHeaderFooterTextProperty( static void CopyHeaderFooterTextProperty(
css::uno::Reference<css::beans::XPropertySet> xPrevStyle, const css::uno::Reference<css::beans::XPropertySet>& xPrevStyle,
css::uno::Reference<css::beans::XPropertySet> xStyle, const css::uno::Reference<css::beans::XPropertySet>& xStyle,
PropertyIds ePropId ); PropertyIds ePropId );
void PrepareHeaderFooterProperties( bool bFirstPage ); void PrepareHeaderFooterProperties( bool bFirstPage );
bool HasHeader( bool bFirstPage ) const; bool HasHeader( bool bFirstPage ) const;

View File

@ -25,7 +25,7 @@ namespace dmapper
using namespace ::com::sun::star; using namespace ::com::sun::star;
/// w:sdt's w:dropDownList doesn't have width, so guess the size based on the longest string. /// 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; OUString aLongest = rDefault;
sal_Int32 nHeight = 0; sal_Int32 nHeight = 0;

View File

@ -96,7 +96,7 @@ TableStyleSheetEntry::~TableStyleSheetEntry( )
m_pStyleSheet = nullptr; 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 int nTypesProps = 4;
static const TblStyleType pTypesToFix[nTypesProps] = static const TblStyleType pTypesToFix[nTypesProps] =
@ -169,7 +169,7 @@ void StyleSheetEntry::AppendInteropGrabBag(const beans::PropertyValue& rValue)
m_aInteropGrabBag.push_back(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[] = static const PropertyIds pPropsToCheck[] =
{ {
@ -900,7 +900,7 @@ uno::Sequence< OUString > PropValVector::getNames()
return comphelper::containerToSequence(aRet); return comphelper::containerToSequence(aRet);
} }
void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable ) void StyleSheetTable::ApplyStyleSheets( const FontTablePtr& rFontTable )
{ {
try try
{ {

View File

@ -90,7 +90,7 @@ public:
StyleSheetTable(DomainMapper& rDMapper, css::uno::Reference<css::text::XTextDocument> const& xTextDocument, bool bIsNewDoc); StyleSheetTable(DomainMapper& rDMapper, css::uno::Reference<css::text::XTextDocument> const& xTextDocument, bool bIsNewDoc);
virtual ~StyleSheetTable(); virtual ~StyleSheetTable();
void ApplyStyleSheets( FontTablePtr rFontTable ); void ApplyStyleSheets( const FontTablePtr& rFontTable );
const StyleSheetEntryPtr FindStyleSheetByISTD(const OUString& sIndex); const StyleSheetEntryPtr FindStyleSheetByISTD(const OUString& sIndex);
const StyleSheetEntryPtr FindStyleSheetByStyleName(const OUString& rIndex); const StyleSheetEntryPtr FindStyleSheetByStyleName(const OUString& rIndex);
const StyleSheetEntryPtr FindStyleSheetByConvertedStyleName(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 // Adds a new tblStylePr to the table style entry. This method
// fixes some possible properties conflicts, like borders ones. // 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 // Gets all the properties
// + corresponding to the mask, // + corresponding to the mask,

View File

@ -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()) if( pProperties.get())
{ {
@ -417,7 +417,7 @@ void TDefTableHandler::lcl_sprm(Sprm & rSprm)
} }
void TDefTableHandler::fillCellProperties( 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 ) if( m_aCellBorderPositions.size() > nCell )
{ {

View File

@ -61,7 +61,7 @@ private:
std::vector<css::beans::PropertyValue> m_aInteropGrabBag; std::vector<css::beans::PropertyValue> m_aInteropGrabBag;
void appendGrabBag(const OUString& aKey, const OUString& aValue); 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 // Properties
virtual void lcl_attribute(Id Name, Value & val) override; virtual void lcl_attribute(Id Name, Value & val) override;
@ -71,7 +71,7 @@ public:
TDefTableHandler(); TDefTableHandler();
virtual ~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); void enableInteropGrabBag(const OUString& aName);
css::beans::PropertyValue getInteropGrabBag(const OUString& aName = OUString()); css::beans::PropertyValue getInteropGrabBag(const OUString& aName = OUString());
static OUString getBorderTypeString(sal_Int32 nType); static OUString getBorderTypeString(sal_Int32 nType);

View File

@ -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 #ifdef DEBUG_WRITERFILTER
TagLogger::getInstance().startElement("tablemanager.openCell"); 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 #ifdef DEBUG_WRITERFILTER
TagLogger::getInstance().startElement("tablemanager.insertTableProps"); TagLogger::getInstance().startElement("tablemanager.insertTableProps");
@ -75,7 +75,7 @@ void TableManager::insertTableProps(TablePropertyMapPtr pProps)
#endif #endif
} }
void TableManager::insertRowProps(TablePropertyMapPtr pProps) void TableManager::insertRowProps(const TablePropertyMapPtr& pProps)
{ {
#ifdef DEBUG_WRITERFILTER #ifdef DEBUG_WRITERFILTER
TagLogger::getInstance().startElement("tablemanager.insertRowProps"); TagLogger::getInstance().startElement("tablemanager.insertRowProps");
@ -91,7 +91,7 @@ void TableManager::insertRowProps(TablePropertyMapPtr pProps)
#endif #endif
} }
void TableManager::cellPropsByCell(unsigned int i, TablePropertyMapPtr pProps) void TableManager::cellPropsByCell(unsigned int i, const TablePropertyMapPtr& pProps)
{ {
#ifdef DEBUG_WRITERFILTER #ifdef DEBUG_WRITERFILTER
TagLogger::getInstance().startElement("tablemanager.cellPropsByCell"); TagLogger::getInstance().startElement("tablemanager.cellPropsByCell");
@ -104,7 +104,7 @@ void TableManager::cellPropsByCell(unsigned int i, TablePropertyMapPtr pProps)
#endif #endif
} }
void TableManager::cellProps(TablePropertyMapPtr pProps) void TableManager::cellProps(const TablePropertyMapPtr& pProps)
{ {
#ifdef DEBUG_WRITERFILTER #ifdef DEBUG_WRITERFILTER
TagLogger::getInstance().startElement("tablemanager.cellProps"); 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 #ifdef DEBUG_WRITERFILTER
TagLogger::getInstance().startElement("tablemanager.ensureOpenCell"); TagLogger::getInstance().startElement("tablemanager.ensureOpenCell");
@ -409,7 +409,7 @@ void TableManager::handle(const css::uno::Reference<css::text::XTextRange>& rHan
setHandle(rHandle); setHandle(rHandle);
} }
void TableManager::setHandler(std::shared_ptr<DomainMapperTableHandler> pTableDataHandler) void TableManager::setHandler(const std::shared_ptr<DomainMapperTableHandler>& pTableDataHandler)
{ {
mpTableDataHandler = pTableDataHandler; mpTableDataHandler = pTableDataHandler;
} }

View File

@ -351,7 +351,7 @@ private:
Open a cell at current level. 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. Close a cell at current level.
@ -361,7 +361,7 @@ private:
/** /**
Ensure a cell is open at the current level. Ensure a cell is open at the current level.
*/ */
void ensureOpenCell(TablePropertyMapPtr pProps); void ensureOpenCell(const TablePropertyMapPtr& pProps);
protected: protected:
/** /**
@ -402,7 +402,7 @@ public:
@param pTableDataHandler the handler @param pTableDataHandler the handler
*/ */
void setHandler(std::shared_ptr<DomainMapperTableHandler> pTableDataHandler); void setHandler(const std::shared_ptr<DomainMapperTableHandler>& pTableDataHandler);
/** /**
Set the current handle. Set the current handle.
@ -482,7 +482,7 @@ public:
@param pProps the properties @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. 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 @paran i index of the cell in the current row
@param pProps the properties @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. Handle properties of the current row.
@param pProps the properties @param pProps the properties
*/ */
virtual void insertRowProps(TablePropertyMapPtr pProps); virtual void insertRowProps(const TablePropertyMapPtr& pProps);
/** /**
Handle properties of the current table. Handle properties of the current table.
@param pProps the properties @param pProps the properties
*/ */
virtual void insertTableProps(TablePropertyMapPtr pProps); virtual void insertTableProps(const TablePropertyMapPtr& pProps);
/** /**
Return if table manager has detected paragraph to ignore. Return if table manager has detected paragraph to ignore.

View File

@ -105,7 +105,7 @@ struct TheTagLogger:
endElement(); 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::Reference<beans::XPropertySetInfo> xPropSetInfo(rPropSet->getPropertySetInfo());
uno::Sequence<beans::Property> aProps(xPropSetInfo->getProperties()); uno::Sequence<beans::Property> aProps(xPropSetInfo->getProperties());
@ -175,7 +175,7 @@ struct TheTagLogger:
xmlFree( xmlName ); 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) if (!pWriter)
return; return;

View File

@ -50,14 +50,14 @@ namespace writerfilter
void endDocument(); void endDocument();
void element(const std::string & name); 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); void startElement(const std::string & name);
#endif #endif
void attribute(const std::string & name, const std::string & value); void attribute(const std::string & name, const std::string & value);
#ifdef DEBUG_WRITERFILTER #ifdef DEBUG_WRITERFILTER
void attribute(const std::string & name, const OUString & value); void attribute(const std::string & name, const OUString & value);
void attribute(const std::string & name, sal_uInt32 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 std::string & chars);
void chars(const OUString & chars); void chars(const OUString & chars);
void endElement(); void endElement();

View File

@ -122,7 +122,7 @@ void OOXMLDocumentImpl::resolveFastSubStream(Stream & rStreamHandler,
} }
void OOXMLDocumentImpl::resolveFastSubStreamWithId(Stream & rStream, void OOXMLDocumentImpl::resolveFastSubStreamWithId(Stream & rStream,
writerfilter::Reference<Stream>::Pointer_t pStream, const writerfilter::Reference<Stream>::Pointer_t& pStream,
sal_uInt32 nId) sal_uInt32 nId)
{ {
rStream.substream(nId, pStream); 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; uno::Reference<xml::dom::XDocument> xRelation;
OOXMLStream::Pointer_t cStream; 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; uno::Reference<embed::XRelationshipAccess> xRelationshipAccess;
xRelationshipAccess.set((dynamic_cast<OOXMLStreamImpl&>(*pStream.get())).accessDocumentStream(), uno::UNO_QUERY_THROW); xRelationshipAccess.set((dynamic_cast<OOXMLStreamImpl&>(*pStream.get())).accessDocumentStream(), uno::UNO_QUERY_THROW);
@ -935,7 +935,7 @@ uno::Sequence<beans::PropertyValue > OOXMLDocumentImpl::getEmbeddingsList( )
OOXMLDocument * OOXMLDocument *
OOXMLDocumentFactory::createDocument OOXMLDocumentFactory::createDocument
(OOXMLStream::Pointer_t pStream, (const OOXMLStream::Pointer_t& pStream,
const uno::Reference<task::XStatusIndicator>& xStatusIndicator, const uno::Reference<task::XStatusIndicator>& xStatusIndicator,
bool mbSkipImages, const uno::Sequence<beans::PropertyValue>& rDescriptor) bool mbSkipImages, const uno::Sequence<beans::PropertyValue>& rDescriptor)
{ {

View File

@ -72,12 +72,12 @@ protected:
OOXMLStream::StreamType_t nType); OOXMLStream::StreamType_t nType);
static void resolveFastSubStreamWithId(Stream & rStream, static void resolveFastSubStreamWithId(Stream & rStream,
writerfilter::Reference<Stream>::Pointer_t pStream, const writerfilter::Reference<Stream>::Pointer_t& pStream,
sal_uInt32 nId); sal_uInt32 nId);
css::uno::Reference<css::xml::dom::XDocument> importSubStream(OOXMLStream::StreamType_t nType); 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 writerfilter::Reference<Stream>::Pointer_t
getSubStream(const OUString & rId); getSubStream(const OUString & rId);
@ -91,7 +91,7 @@ protected:
void resolveCustomXmlStream(Stream & rStream); void resolveCustomXmlStream(Stream & rStream);
void resolveActiveXStream(Stream & rStream); void resolveActiveXStream(Stream & rStream);
void resolveGlossaryStream(Stream & rStream); void resolveGlossaryStream(Stream & rStream);
void resolveEmbeddingsStream(OOXMLStream::Pointer_t pStream); void resolveEmbeddingsStream(const OOXMLStream::Pointer_t& pStream);
public: public:
OOXMLDocumentImpl(OOXMLStream::Pointer_t pStream, const css::uno::Reference<css::task::XStatusIndicator>& xStatusIndicator, bool bSkipImages, const css::uno::Sequence<css::beans::PropertyValue>& rDescriptor); 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(); virtual ~OOXMLDocumentImpl();

View File

@ -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&)
{ {
} }

View File

@ -70,7 +70,7 @@ public:
virtual void startAction(OOXMLFastContextHandler * pHandler); virtual void startAction(OOXMLFastContextHandler * pHandler);
virtual void charactersAction(OOXMLFastContextHandler * pHandler, const OUString & rString); virtual void charactersAction(OOXMLFastContextHandler * pHandler, const OUString & rString);
virtual void endAction(OOXMLFastContextHandler * pHandler); 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: protected:
virtual ~OOXMLFactory_ns(); virtual ~OOXMLFactory_ns();

View File

@ -475,12 +475,12 @@ void OOXMLFastContextHandler::setLastSectionGroup()
} }
void OOXMLFastContextHandler::newProperty void OOXMLFastContextHandler::newProperty
(const Id & /*nId*/, OOXMLValue::Pointer_t /*pVal*/) (const Id & /*nId*/, const OOXMLValue::Pointer_t& /*pVal*/)
{ {
} }
void OOXMLFastContextHandler::setPropertySet 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); mpParserState->setXNoteId(nId);
} }
void OOXMLFastContextHandler::setXNoteId(OOXMLValue::Pointer_t pValue) void OOXMLFastContextHandler::setXNoteId(const OOXMLValue::Pointer_t& pValue)
{ {
mpParserState->setXNoteId(sal_Int32(pValue->getInt())); mpParserState->setXNoteId(sal_Int32(pValue->getInt()));
} }
@ -878,7 +878,7 @@ OOXMLFastContextHandlerStream::~OOXMLFastContextHandlerStream()
} }
void OOXMLFastContextHandlerStream::newProperty(const Id & rId, void OOXMLFastContextHandlerStream::newProperty(const Id & rId,
OOXMLValue::Pointer_t pVal) const OOXMLValue::Pointer_t& pVal)
{ {
if (rId != 0x0) if (rId != 0x0)
{ {
@ -952,7 +952,7 @@ OOXMLValue::Pointer_t OOXMLFastContextHandlerProperties::getValue() const
} }
void OOXMLFastContextHandlerProperties::newProperty void OOXMLFastContextHandlerProperties::newProperty
(const Id & rId, OOXMLValue::Pointer_t pVal) (const Id & rId, const OOXMLValue::Pointer_t& pVal)
{ {
if (rId != 0x0) if (rId != 0x0)
{ {
@ -1049,7 +1049,7 @@ void OOXMLFastContextHandlerProperties::setParent
} }
void OOXMLFastContextHandlerProperties::setPropertySet void OOXMLFastContextHandlerProperties::setPropertySet
(OOXMLPropertySet::Pointer_t pPropertySet) (const OOXMLPropertySet::Pointer_t& pPropertySet)
{ {
if (pPropertySet.get() != nullptr) if (pPropertySet.get() != nullptr)
mpPropertySet = pPropertySet; 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; mpValue = pValue;
} }
@ -1259,12 +1259,12 @@ void OOXMLFastContextHandlerXNote::lcl_endFastElement
setForwardEvents(mbForwardEventsSaved); setForwardEvents(mbForwardEventsSaved);
} }
void OOXMLFastContextHandlerXNote::checkId(OOXMLValue::Pointer_t pValue) void OOXMLFastContextHandlerXNote::checkId(const OOXMLValue::Pointer_t& pValue)
{ {
mnMyXNoteId = sal_Int32(pValue->getInt()); mnMyXNoteId = sal_Int32(pValue->getInt());
} }
void OOXMLFastContextHandlerXNote::checkType(OOXMLValue::Pointer_t pValue) void OOXMLFastContextHandlerXNote::checkType(const OOXMLValue::Pointer_t& pValue)
{ {
mnMyXNoteType = pValue->getInt(); 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 // 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. // 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(); int count = val->getInt();
for( int i = 0; for( int i = 0;
@ -1844,7 +1844,7 @@ OOXMLFastContextHandlerWrapper::getFastContextHandler() const
} }
void OOXMLFastContextHandlerWrapper::newProperty void OOXMLFastContextHandlerWrapper::newProperty
(const Id & rId, OOXMLValue::Pointer_t pVal) (const Id & rId, const OOXMLValue::Pointer_t& pVal)
{ {
if (mxContext.is()) if (mxContext.is())
{ {
@ -1855,7 +1855,7 @@ void OOXMLFastContextHandlerWrapper::newProperty
} }
void OOXMLFastContextHandlerWrapper::setPropertySet void OOXMLFastContextHandlerWrapper::setPropertySet
(OOXMLPropertySet::Pointer_t pPropertySet) (const OOXMLPropertySet::Pointer_t& pPropertySet)
{ {
if (mxContext.is()) if (mxContext.is())
{ {

View File

@ -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 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 newProperty(const Id & rId, const OOXMLValue::Pointer_t& pVal);
virtual void setPropertySet(OOXMLPropertySet::Pointer_t pPropertySet); virtual void setPropertySet(const OOXMLPropertySet::Pointer_t& pPropertySet);
virtual OOXMLPropertySet::Pointer_t getPropertySet() const; virtual OOXMLPropertySet::Pointer_t getPropertySet() const;
virtual void setToken(Token_t nToken); virtual void setToken(Token_t nToken);
@ -120,7 +120,7 @@ public:
void setDocument(OOXMLDocumentImpl* pDocument); void setDocument(OOXMLDocumentImpl* pDocument);
OOXMLDocumentImpl* getDocument(); OOXMLDocumentImpl* getDocument();
void setXNoteId(OOXMLValue::Pointer_t pValue); void setXNoteId(const OOXMLValue::Pointer_t& pValue);
void setXNoteId(const sal_Int32 nId); void setXNoteId(const sal_Int32 nId);
sal_Int32 getXNoteId() const; sal_Int32 getXNoteId() const;
void setForwardEvents(bool bForwardEvents); void setForwardEvents(bool bForwardEvents);
@ -247,7 +247,7 @@ public:
OOXMLPropertySet::Pointer_t getPropertySetAttrs() const { return mpPropertySetAttrs;} 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); void sendProperty(Id nId);
virtual OOXMLPropertySet::Pointer_t getPropertySet() const override; virtual OOXMLPropertySet::Pointer_t getPropertySet() const override;
@ -266,7 +266,7 @@ public:
virtual OOXMLValue::Pointer_t getValue() const override; virtual OOXMLValue::Pointer_t getValue() const override;
virtual ResourceEnum_t getResource() const override { return PROPERTIES; } 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 handleXNotes();
void handleHdrFtr(); void handleHdrFtr();
@ -276,7 +276,7 @@ public:
void handleOLE(); void handleOLE();
void handleFontRel(); 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; virtual OOXMLPropertySet::Pointer_t getPropertySet() const override;
protected: protected:
@ -313,7 +313,7 @@ public:
explicit OOXMLFastContextHandlerValue(OOXMLFastContextHandler * pContext); explicit OOXMLFastContextHandlerValue(OOXMLFastContextHandler * pContext);
virtual ~OOXMLFastContextHandlerValue(); virtual ~OOXMLFastContextHandlerValue();
void setValue(OOXMLValue::Pointer_t pValue); void setValue(const OOXMLValue::Pointer_t& pValue);
virtual OOXMLValue::Pointer_t getValue() const override; virtual OOXMLValue::Pointer_t getValue() const override;
virtual void lcl_endFastElement(Token_t Element) virtual void lcl_endFastElement(Token_t Element)
@ -361,9 +361,9 @@ public:
explicit OOXMLFastContextHandlerXNote(OOXMLFastContextHandler * pContext); explicit OOXMLFastContextHandlerXNote(OOXMLFastContextHandler * pContext);
virtual ~OOXMLFastContextHandlerXNote(); 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"; } virtual std::string getType() const override { return "XNote"; }
@ -403,7 +403,7 @@ public:
static void startRow(); static void startRow();
void endRow(); void endRow();
void handleGridBefore( OOXMLValue::Pointer_t val ); void handleGridBefore( const OOXMLValue::Pointer_t& val );
private: private:
static OOXMLProperty::Pointer_t fakeNoBorder( Id id ); static OOXMLProperty::Pointer_t fakeNoBorder( Id id );
}; };
@ -503,8 +503,8 @@ public:
void addNamespace(const Id & nId); void addNamespace(const Id & nId);
void addToken( Token_t Element ); void addToken( Token_t Element );
virtual void newProperty(const Id & rId, OOXMLValue::Pointer_t pVal) override; virtual void newProperty(const Id & rId, const OOXMLValue::Pointer_t& pVal) override;
virtual void setPropertySet(OOXMLPropertySet::Pointer_t pPropertySet) override; virtual void setPropertySet(const OOXMLPropertySet::Pointer_t& pPropertySet) override;
virtual OOXMLPropertySet::Pointer_t getPropertySet() const override; virtual OOXMLPropertySet::Pointer_t getPropertySet() const override;
virtual std::string getType() const override; virtual std::string getType() const override;

View File

@ -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) if (mpCharacterProps.get() == nullptr)
mpCharacterProps = pProps; mpCharacterProps = pProps;
@ -129,7 +129,7 @@ void OOXMLParserState::setCharacterProperties(OOXMLPropertySet::Pointer_t pProps
mpCharacterProps->add(pProps); mpCharacterProps->add(pProps);
} }
void OOXMLParserState::setCellProperties(OOXMLPropertySet::Pointer_t pProps) void OOXMLParserState::setCellProperties(const OOXMLPropertySet::Pointer_t& pProps)
{ {
if (!mCellProps.empty()) 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()) 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()) if (!mTableProps.empty())
{ {

View File

@ -95,13 +95,13 @@ public:
const OUString & getTarget() const; const OUString & getTarget() const;
void resolveCharacterProperties(Stream & rStream); void resolveCharacterProperties(Stream & rStream);
void setCharacterProperties(OOXMLPropertySet::Pointer_t pProps); void setCharacterProperties(const OOXMLPropertySet::Pointer_t& pProps);
void resolveCellProperties(Stream & rStream); void resolveCellProperties(Stream & rStream);
void setCellProperties(OOXMLPropertySet::Pointer_t pProps); void setCellProperties(const OOXMLPropertySet::Pointer_t& pProps);
void resolveRowProperties(Stream & rStream); void resolveRowProperties(Stream & rStream);
void setRowProperties(OOXMLPropertySet::Pointer_t pProps); void setRowProperties(const OOXMLPropertySet::Pointer_t& pProps);
void resolveTableProperties(Stream & rStream); void resolveTableProperties(Stream & rStream);
void setTableProperties(OOXMLPropertySet::Pointer_t pProps); void setTableProperties(const OOXMLPropertySet::Pointer_t& pProps);
void startTable(); void startTable();
void endTable(); void endTable();

View File

@ -385,7 +385,7 @@ OOXMLPropertySet::end() const
return mProperties.end(); 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) 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) 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) if (pPropertySet.get() != nullptr)
mPropertySets.push_back(pPropertySet); mPropertySets.push_back(pPropertySet);

View File

@ -151,8 +151,8 @@ public:
virtual ~OOXMLPropertySet(); virtual ~OOXMLPropertySet();
void resolve(Properties & rHandler) override; void resolve(Properties & rHandler) override;
void add(OOXMLProperty::Pointer_t pProperty); void add(const OOXMLProperty::Pointer_t& pProperty);
void add(OOXMLPropertySet::Pointer_t pPropertySet); void add(const OOXMLPropertySet::Pointer_t& pPropertySet);
OOXMLPropertySet * clone() const; OOXMLPropertySet * clone() const;
OOXMLProperties_t::iterator begin(); OOXMLProperties_t::iterator begin();
@ -175,7 +175,7 @@ public:
virtual ~OOXMLTable(); virtual ~OOXMLTable();
void resolve(Table & rTable) override; void resolve(Table & rTable) override;
void add(ValuePointer_t pPropertySet); void add(const ValuePointer_t& pPropertySet);
OOXMLTable * clone() const; OOXMLTable * clone() const;
private: private:
typedef std::vector<ValuePointer_t> PropertySets_t; typedef std::vector<ValuePointer_t> PropertySets_t;

View File

@ -81,7 +81,7 @@ const OUString & OOXMLStreamImpl::getTarget() const
return msTarget; return msTarget;
} }
bool OOXMLStreamImpl::lcl_getTarget(uno::Reference<embed::XRelationshipAccess> bool OOXMLStreamImpl::lcl_getTarget(const uno::Reference<embed::XRelationshipAccess>&
xRelationshipAccess, xRelationshipAccess,
StreamType_t nStreamType, StreamType_t nStreamType,
const OUString & rId, const OUString & rId,
@ -411,8 +411,8 @@ uno::Reference <xml::sax::XFastTokenHandler> OOXMLStreamImpl::getFastTokenHandle
OOXMLStream::Pointer_t OOXMLStream::Pointer_t
OOXMLDocumentFactory::createStream OOXMLDocumentFactory::createStream
(uno::Reference<uno::XComponentContext> xContext, (const uno::Reference<uno::XComponentContext>& xContext,
uno::Reference<io::XInputStream> rStream, const uno::Reference<io::XInputStream>& rStream,
bool bRepairStorage) bool bRepairStorage)
{ {
OOXMLStreamImpl * pStream = new OOXMLStreamImpl(xContext, rStream, OOXMLStreamImpl * pStream = new OOXMLStreamImpl(xContext, rStream,
@ -422,7 +422,7 @@ OOXMLDocumentFactory::createStream
OOXMLStream::Pointer_t OOXMLStream::Pointer_t
OOXMLDocumentFactory::createStream OOXMLDocumentFactory::createStream
(OOXMLStream::Pointer_t pStream, OOXMLStream::StreamType_t nStreamType) (const OOXMLStream::Pointer_t& pStream, OOXMLStream::StreamType_t nStreamType)
{ {
OOXMLStream::Pointer_t pRet; OOXMLStream::Pointer_t pRet;
if (OOXMLStreamImpl* pImpl = dynamic_cast<OOXMLStreamImpl *>(pStream.get())) if (OOXMLStreamImpl* pImpl = dynamic_cast<OOXMLStreamImpl *>(pStream.get()))
@ -432,7 +432,7 @@ OOXMLDocumentFactory::createStream
OOXMLStream::Pointer_t OOXMLStream::Pointer_t
OOXMLDocumentFactory::createStream OOXMLDocumentFactory::createStream
(OOXMLStream::Pointer_t pStream, const OUString & rId) (const OOXMLStream::Pointer_t& pStream, const OUString & rId)
{ {
OOXMLStream::Pointer_t pRet; OOXMLStream::Pointer_t pRet;
if (OOXMLStreamImpl* pImpl = dynamic_cast<OOXMLStreamImpl *>(pStream.get())) if (OOXMLStreamImpl* pImpl = dynamic_cast<OOXMLStreamImpl *>(pStream.get()))

View File

@ -53,8 +53,7 @@ class OOXMLStreamImpl : public OOXMLStream
/// Cache holding an Id <-> Target map of external relations. /// Cache holding an Id <-> Target map of external relations.
std::map<OUString, OUString> maIdCache; std::map<OUString, OUString> maIdCache;
bool lcl_getTarget(css::uno::Reference<css::embed::XRelationshipAccess> bool lcl_getTarget(const css::uno::Reference<css::embed::XRelationshipAccess>& xRelationshipAccess,
xRelationshipAccess,
StreamType_t nStreamType, StreamType_t nStreamType,
const OUString & rId, const OUString & rId,
OUString & rDocumentTarget); OUString & rDocumentTarget);

View File

@ -51,7 +51,7 @@ public:
print(" void %sAction(OOXMLFastContextHandler* pHandler);" % action) print(" void %sAction(OOXMLFastContextHandler* pHandler);" % action)
print("""virtual void charactersAction(OOXMLFastContextHandler* pHandler, const OUString & sText); 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(); virtual ~OOXMLFactory_%s();

View File

@ -674,7 +674,7 @@ def factoryAttributeAction(nsNode):
nsLabel = nsToLabel(nsNode) nsLabel = nsToLabel(nsNode)
inner = factoryAttributeActionInner(nsNode) inner = factoryAttributeActionInner(nsNode)
if len(inner): 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()) switch (_pHandler->getDefine())
{""" % nsLabel) {""" % nsLabel)
@ -685,7 +685,7 @@ def factoryAttributeAction(nsNode):
print("}") print("}")
print() print()
else: 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("}") print("}")
print() print()

View File

@ -65,7 +65,7 @@ static Id lcl_getParagraphBorder(sal_uInt32 nIndex)
return aBorderIds[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) RTFOverwrite eOverwrite = RTFOverwrite::YES, bool bAttribute = true)
{ {
RTFValue::Pointer_t pParent = rSprms.find(nParent, /*bFirst=*/true, /*bForWrite=*/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); 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); lcl_putNestedAttribute(rSprms, nParent, nId, pValue, RTFOverwrite::NO_APPEND, false);
} }
@ -123,7 +123,7 @@ static RTFSprms& lcl_getLastAttributes(RTFSprms& rSprms, Id nId)
} }
static void 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; RTFSprms* pAttributes = nullptr;
if (aStates.top().nBorderState == RTFBorderState::PARAGRAPH_BOX) if (aStates.top().nBorderState == RTFBorderState::PARAGRAPH_BOX)