diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx index 774cba78c3a1..bd23785b6ef2 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx @@ -55,6 +55,7 @@ #ifdef DBG_UTIL #include "PropertyMapHelper.hxx" #include +#include #endif namespace writerfilter::dmapper { @@ -81,9 +82,9 @@ using namespace ::std; #define MAXTABLECELLS 63 DomainMapperTableHandler::DomainMapperTableHandler( - css::uno::Reference const& xText, + css::uno::Reference xText, DomainMapper_Impl& rDMapper_Impl) - : m_xText(xText), + : m_xText(std::move(xText)), m_rDMapper_Impl( rDMapper_Impl ), m_bHadFootOrEndnote(false) { diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.hxx b/writerfilter/source/dmapper/DomainMapperTableHandler.hxx index 4e396b6b23fc..f05fc1e474f1 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.hxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.hxx @@ -79,7 +79,7 @@ class DomainMapperTableHandler final : public virtual SvRefBase public: typedef tools::SvRef Pointer_t; - DomainMapperTableHandler(css::uno::Reference const& xText, + DomainMapperTableHandler(css::uno::Reference xText, DomainMapper_Impl& rDMapper_Impl); ~DomainMapperTableHandler() override; diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index ba66d5c340f7..f5ca32d6f6f6 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -87,6 +87,7 @@ #include #include #include +#include #include #include #include @@ -312,7 +313,7 @@ uno::Any FloatingTableInfo::getPropertyValue(std::u16string_view propertyName) DomainMapper_Impl::DomainMapper_Impl( DomainMapper& rDMapper, - uno::Reference const& xContext, + uno::Reference xContext, uno::Reference const& xModel, SourceDocumentType eDocumentType, utl::MediaDescriptor const & rMediaDesc) : @@ -321,7 +322,7 @@ DomainMapper_Impl::DomainMapper_Impl( m_pOOXMLDocument(nullptr), m_xTextDocument( xModel, uno::UNO_QUERY ), m_xTextFactory( xModel, uno::UNO_QUERY ), - m_xComponentContext( xContext ), + m_xComponentContext(std::move( xContext )), m_bForceGenericFields(!utl::ConfigManager::IsFuzzing() && officecfg::Office::Common::Filter::Microsoft::Import::ForceImportWWFieldsAsGenericFields::get()), m_bSetUserFieldContent( false ), m_bSetCitation( false ), @@ -5055,9 +5056,9 @@ bool HeaderFooterContext::getTextInserted() const sal_Int32 HeaderFooterContext::getTableDepth() const { return m_nTableDepth; } -FieldContext::FieldContext(uno::Reference< text::XTextRange > const& xStart) +FieldContext::FieldContext(uno::Reference< text::XTextRange > xStart) : m_bFieldCommandCompleted(false) - , m_xStartRange( xStart ) + , m_xStartRange(std::move( xStart )) , m_bFieldLocked( false ) { m_pProperties = new PropertyMap(); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx index 4072a646840b..21a87c47bee0 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -198,7 +199,7 @@ class FieldContext : public virtual SvRefBase std::vector m_aParagraphsToFinish; public: - explicit FieldContext(css::uno::Reference const& xStart); + explicit FieldContext(css::uno::Reference xStart); ~FieldContext() override; const css::uno::Reference& GetStartRange() const { return m_xStartRange; } @@ -264,7 +265,7 @@ struct TextAppendContext */ std::vector m_aAnchoredObjects; - inline TextAppendContext(const css::uno::Reference& xAppend, const css::uno::Reference& xCur); + inline TextAppendContext(css::uno::Reference xAppend, const css::uno::Reference& xCur); }; struct AnchoredContext @@ -272,8 +273,8 @@ struct AnchoredContext css::uno::Reference xTextContent; bool bToRemove; - explicit AnchoredContext(const css::uno::Reference& xContent) - : xTextContent(xContent), bToRemove(false) + explicit AnchoredContext(css::uno::Reference xContent) + : xTextContent(std::move(xContent)), bToRemove(false) { } }; @@ -305,10 +306,10 @@ struct BookmarkInsertPosition bool m_bIsStartOfText; OUString m_sBookmarkName; css::uno::Reference m_xTextRange; - BookmarkInsertPosition(bool bIsStartOfText, const OUString& rName, css::uno::Reference const& xTextRange): + BookmarkInsertPosition(bool bIsStartOfText, OUString rName, css::uno::Reference xTextRange): m_bIsStartOfText( bIsStartOfText ), - m_sBookmarkName( rName ), - m_xTextRange( xTextRange ) + m_sBookmarkName(std::move( rName )), + m_xTextRange(std::move( xTextRange )) {} }; @@ -321,12 +322,12 @@ struct PermInsertPosition css::uno::Reference m_xTextRange; - PermInsertPosition(bool bIsStartOfText, sal_Int32 id, const OUString& ed, const OUString& edGrp, css::uno::Reference const& xTextRange) + PermInsertPosition(bool bIsStartOfText, sal_Int32 id, OUString ed, OUString edGrp, css::uno::Reference xTextRange) : m_bIsStartOfText(bIsStartOfText) , m_Id(id) - , m_Ed(ed) - , m_EdGrp(edGrp) - , m_xTextRange(xTextRange) + , m_Ed(std::move(ed)) + , m_EdGrp(std::move(edGrp)) + , m_xTextRange(std::move(xTextRange)) {} OUString createBookmarkName() const @@ -406,12 +407,12 @@ struct FloatingTableInfo /// Tables in footnotes and endnotes are always floating bool m_bConvertToFloatingInFootnote = false; - FloatingTableInfo(css::uno::Reference const& xStart, - css::uno::Reference const& xEnd, + FloatingTableInfo(css::uno::Reference xStart, + css::uno::Reference xEnd, const css::uno::Sequence& aFrameProperties, sal_Int32 nTableWidth, sal_Int32 nTableWidthType, bool bConvertToFloatingInFootnote) - : m_xStart(xStart), - m_xEnd(xEnd), + : m_xStart(std::move(xStart)), + m_xEnd(std::move(xEnd)), m_aFrameProperties(aFrameProperties), m_nTableWidth(nTableWidth), m_nTableWidthType(nTableWidthType), @@ -642,7 +643,7 @@ private: public: DomainMapper_Impl( DomainMapper& rDMapper, - css::uno::Reference < css::uno::XComponentContext > const& xContext, + css::uno::Reference < css::uno::XComponentContext > xContext, css::uno::Reference< css::lang::XComponent > const& xModel, SourceDocumentType eDocumentType, utl::MediaDescriptor const & rMediaDesc); @@ -1210,8 +1211,8 @@ private: std::unordered_map m_aCommentProps; }; -TextAppendContext::TextAppendContext(const css::uno::Reference& xAppend, const css::uno::Reference& xCur) - : xTextAppend(xAppend) +TextAppendContext::TextAppendContext(css::uno::Reference xAppend, const css::uno::Reference& xCur) + : xTextAppend(std::move(xAppend)) { xCursor.set(xCur, css::uno::UNO_QUERY); xInsertPosition = xCursor; diff --git a/writerfilter/source/dmapper/FontTable.cxx b/writerfilter/source/dmapper/FontTable.cxx index 470deff835ad..f0d4e7077742 100644 --- a/writerfilter/source/dmapper/FontTable.cxx +++ b/writerfilter/source/dmapper/FontTable.cxx @@ -20,6 +20,7 @@ #include "FontTable.hxx" #include #include +#include #include #include #include @@ -233,10 +234,10 @@ void FontTable::addEmbeddedFont(const css::uno::Reference m_pImpl->xEmbeddedFontHelper->addEmbeddedFont(stream, fontName, extra, key); } -EmbeddedFontHandler::EmbeddedFontHandler(FontTable& rFontTable, const OUString& _fontName, const char* _style ) +EmbeddedFontHandler::EmbeddedFontHandler(FontTable& rFontTable, OUString _fontName, const char* _style ) : LoggedProperties("EmbeddedFontHandler") , fontTable( rFontTable ) -, fontName( _fontName ) +, fontName(std::move( _fontName )) , style( _style ) { } diff --git a/writerfilter/source/dmapper/FontTable.hxx b/writerfilter/source/dmapper/FontTable.hxx index 5f32776a2819..e1aad48238f9 100644 --- a/writerfilter/source/dmapper/FontTable.hxx +++ b/writerfilter/source/dmapper/FontTable.hxx @@ -88,7 +88,7 @@ typedef tools::SvRef< FontTable > FontTablePtr; class EmbeddedFontHandler : public LoggedProperties { public: - EmbeddedFontHandler(FontTable& rFontTable, const OUString& fontName, const char* style); + EmbeddedFontHandler(FontTable& rFontTable, OUString fontName, const char* style); virtual ~EmbeddedFontHandler() override; private: virtual void lcl_attribute( Id name, Value& val ) override; diff --git a/writerfilter/source/dmapper/FormControlHelper.cxx b/writerfilter/source/dmapper/FormControlHelper.cxx index 0ce84f198aaf..4e2cd3ecd50a 100644 --- a/writerfilter/source/dmapper/FormControlHelper.cxx +++ b/writerfilter/source/dmapper/FormControlHelper.cxx @@ -35,6 +35,7 @@ #include #include "FormControlHelper.hxx" +#include #include #include #include @@ -129,8 +130,8 @@ uno::Reference FormControlHelper::FormControlHelper_ FormControlHelper::FormControlHelper(FieldId eFieldId, uno::Reference const& xTextDocument, - FFDataHandler::Pointer_t const & pFFData) - : m_pFFData(pFFData), m_pImpl(new FormControlHelper_Impl) + FFDataHandler::Pointer_t pFFData) + : m_pFFData(std::move(pFFData)), m_pImpl(new FormControlHelper_Impl) { m_pImpl->m_eFieldId = eFieldId; m_pImpl->rTextDocument = xTextDocument; diff --git a/writerfilter/source/dmapper/FormControlHelper.hxx b/writerfilter/source/dmapper/FormControlHelper.hxx index b1f2620249c0..326637f85f78 100644 --- a/writerfilter/source/dmapper/FormControlHelper.hxx +++ b/writerfilter/source/dmapper/FormControlHelper.hxx @@ -32,7 +32,7 @@ public: typedef tools::SvRef Pointer_t; FormControlHelper(FieldId eFieldId, css::uno::Reference const& rTextDocument, - FFDataHandler::Pointer_t const& pFFData); + FFDataHandler::Pointer_t pFFData); ~FormControlHelper() override; void insertControl(css::uno::Reference const& xTextRange); diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index 1c347d1fdfcf..f3b145a947d5 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -82,6 +82,7 @@ #include #include #include +#include using namespace css; @@ -450,8 +451,8 @@ public: } }; -GraphicImport::GraphicImport(uno::Reference const& xComponentContext, - uno::Reference const& xTextFactory, +GraphicImport::GraphicImport(uno::Reference xComponentContext, + uno::Reference xTextFactory, DomainMapper& rDMapper, GraphicImportType eImportType, std::pair& rPositionOffsets, @@ -461,8 +462,8 @@ GraphicImport::GraphicImport(uno::Reference const& xComp , LoggedTable("GraphicImport") , LoggedStream("GraphicImport") , m_pImpl(new GraphicImport_Impl(eImportType, rDMapper, rPositionOffsets, rAligns, rPositivePercentages)) -, m_xComponentContext(xComponentContext) -, m_xTextFactory(xTextFactory) +, m_xComponentContext(std::move(xComponentContext)) +, m_xTextFactory(std::move(xTextFactory)) { } diff --git a/writerfilter/source/dmapper/GraphicImport.hxx b/writerfilter/source/dmapper/GraphicImport.hxx index 93be2df3f601..9bd3f4aaaa3e 100644 --- a/writerfilter/source/dmapper/GraphicImport.hxx +++ b/writerfilter/source/dmapper/GraphicImport.hxx @@ -81,8 +81,8 @@ class GraphicImport : public LoggedProperties, public LoggedTable void putPropertyToFrameGrabBag( const OUString& sPropertyName, const css::uno::Any& aPropertyValue ); public: - explicit GraphicImport( css::uno::Reference const& xComponentContext, - css::uno::Reference const& xTextFactory, + explicit GraphicImport( css::uno::Reference xComponentContext, + css::uno::Reference xTextFactory, DomainMapper& rDomainMapper, GraphicImportType eGraphicImportType, std::pair& rPositionOffsets, diff --git a/writerfilter/source/dmapper/LoggedResources.cxx b/writerfilter/source/dmapper/LoggedResources.cxx index 661bf17cd1e8..bc883b20a6ea 100644 --- a/writerfilter/source/dmapper/LoggedResources.cxx +++ b/writerfilter/source/dmapper/LoggedResources.cxx @@ -20,6 +20,7 @@ #include "LoggedResources.hxx" #include "TagLogger.hxx" #include +#include using namespace ::com::sun::star; @@ -27,8 +28,8 @@ namespace writerfilter { #ifdef DBG_UTIL -LoggedResourcesHelper::LoggedResourcesHelper(const std::string& sPrefix) - : msPrefix(sPrefix) +LoggedResourcesHelper::LoggedResourcesHelper(std::string sPrefix) + : msPrefix(std::move(sPrefix)) { } diff --git a/writerfilter/source/dmapper/LoggedResources.hxx b/writerfilter/source/dmapper/LoggedResources.hxx index cecf64c91b23..abb52cd91ebe 100644 --- a/writerfilter/source/dmapper/LoggedResources.hxx +++ b/writerfilter/source/dmapper/LoggedResources.hxx @@ -31,7 +31,7 @@ namespace writerfilter class LoggedResourcesHelper final { public: - explicit LoggedResourcesHelper(const std::string& sPrefix); + explicit LoggedResourcesHelper(std::string sPrefix); ~LoggedResourcesHelper(); void startElement(const std::string& sElement); diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx index cb97f59ffdee..cb1e365be146 100644 --- a/writerfilter/source/dmapper/NumberingManager.cxx +++ b/writerfilter/source/dmapper/NumberingManager.cxx @@ -45,6 +45,7 @@ #include #include #include +#include using namespace com::sun::star; @@ -638,11 +639,11 @@ void ListDef::CreateNumberingRules( DomainMapper& rDMapper, ListsManager::ListsManager(DomainMapper& rDMapper, - const uno::Reference & xFactory) + uno::Reference xFactory) : LoggedProperties("ListsManager") , LoggedTable("ListsManager") , m_rDMapper(rDMapper) - , m_xFactory(xFactory) + , m_xFactory(std::move(xFactory)) { } diff --git a/writerfilter/source/dmapper/NumberingManager.hxx b/writerfilter/source/dmapper/NumberingManager.hxx index 2c1e0af3cb77..4bae58b8e51c 100644 --- a/writerfilter/source/dmapper/NumberingManager.hxx +++ b/writerfilter/source/dmapper/NumberingManager.hxx @@ -231,7 +231,7 @@ private: public: - ListsManager(DomainMapper& rDMapper, const css::uno::Reference& xFactory); + ListsManager(DomainMapper& rDMapper, css::uno::Reference xFactory); virtual ~ListsManager() override; typedef tools::SvRef< ListsManager > Pointer; diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index 1ae28759db33..25d3043578f8 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -64,6 +64,7 @@ #include "PropertyMapHelper.hxx" #include #include +#include using namespace com::sun::star; @@ -2005,8 +2006,8 @@ private: OUString m_aName; public: - explicit NamedPropertyValue( const OUString& i_aStr ) - : m_aName( i_aStr ) + explicit NamedPropertyValue( OUString i_aStr ) + : m_aName(std::move( i_aStr )) { } diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx index e9a0fdbd5df0..0678440810b0 100644 --- a/writerfilter/source/dmapper/PropertyMap.hxx +++ b/writerfilter/source/dmapper/PropertyMap.hxx @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -98,15 +99,15 @@ private: bool m_bIsDocDefault; public: - PropValue( const css::uno::Any& rValue, GrabBagType i_GrabBagType, bool bDocDefault ) - : m_aValue( rValue ) + PropValue( css::uno::Any aValue, GrabBagType i_GrabBagType, bool bDocDefault ) + : m_aValue(std::move( aValue )) , m_GrabBagType( i_GrabBagType ) , m_bIsDocDefault( bDocDefault ) { } - PropValue( const css::uno::Any& rValue, GrabBagType i_GrabBagType ) - : m_aValue( rValue ) + PropValue( css::uno::Any aValue, GrabBagType i_GrabBagType ) + : m_aValue(std::move( aValue )) , m_GrabBagType( i_GrabBagType ) , m_bIsDocDefault( false ) { diff --git a/writerfilter/source/dmapper/SdtHelper.cxx b/writerfilter/source/dmapper/SdtHelper.cxx index 0301264bbaef..1df5319f85f3 100644 --- a/writerfilter/source/dmapper/SdtHelper.cxx +++ b/writerfilter/source/dmapper/SdtHelper.cxx @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -76,9 +77,9 @@ static awt::Size lcl_getOptimalWidth(const StyleSheetTablePtr& pStyleSheet, } SdtHelper::SdtHelper(DomainMapper_Impl& rDM_Impl, - css::uno::Reference const& xContext) + css::uno::Reference xContext) : m_rDM_Impl(rDM_Impl) - , m_xComponentContext(xContext) + , m_xComponentContext(std::move(xContext)) , m_aControlType(SdtControlType::unknown) , m_bHasElements(false) , m_bOutsideAParagraph(false) diff --git a/writerfilter/source/dmapper/SdtHelper.hxx b/writerfilter/source/dmapper/SdtHelper.hxx index 441fa927b045..fbf33de2c0fc 100644 --- a/writerfilter/source/dmapper/SdtHelper.hxx +++ b/writerfilter/source/dmapper/SdtHelper.hxx @@ -128,7 +128,7 @@ class SdtHelper final : public virtual SvRefBase public: explicit SdtHelper(DomainMapper_Impl& rDM_Impl, - css::uno::Reference const& xContext); + css::uno::Reference xContext); ~SdtHelper() override; std::vector& getDropDownItems() { return m_aDropDownItems; } diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index 7b1e74358ff0..9cb3fee6865c 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -24,6 +24,7 @@ #include "BorderHandler.hxx" #include "LatentStyleHandler.hxx" #include +#include #include #include #include @@ -255,8 +256,8 @@ struct ListCharStylePropertyMap_t OUString sCharStyleName; PropertyValueVector_t aPropertyValues; - ListCharStylePropertyMap_t(const OUString& rCharStyleName, PropertyValueVector_t&& rPropertyValues): - sCharStyleName( rCharStyleName ), + ListCharStylePropertyMap_t(OUString _sCharStyleName, PropertyValueVector_t&& rPropertyValues): + sCharStyleName(std::move( _sCharStyleName )), aPropertyValues( std::move(rPropertyValues) ) {} }; @@ -277,7 +278,7 @@ struct StyleSheetTable_Impl bool m_bHasImportedDefaultParaProps; bool m_bIsNewDoc; - StyleSheetTable_Impl(DomainMapper& rDMapper, uno::Reference< text::XTextDocument> const& xTextDocument, bool bIsNewDoc); + StyleSheetTable_Impl(DomainMapper& rDMapper, uno::Reference< text::XTextDocument> xTextDocument, bool bIsNewDoc); OUString HasListCharStyle( const PropertyValueVector_t& rCharProperties ); @@ -289,10 +290,10 @@ struct StyleSheetTable_Impl StyleSheetTable_Impl::StyleSheetTable_Impl(DomainMapper& rDMapper, - uno::Reference< text::XTextDocument> const& xTextDocument, + uno::Reference< text::XTextDocument> xTextDocument, bool const bIsNewDoc) : m_rDMapper( rDMapper ), - m_xTextDocument( xTextDocument ), + m_xTextDocument(std::move( xTextDocument )), m_pDefaultParaProps(new PropertyMap), m_pDefaultCharProps(new PropertyMap), m_sDefaultParaStyleName("Normal"), diff --git a/writerfilter/source/dmapper/TableData.hxx b/writerfilter/source/dmapper/TableData.hxx index a863e9d9fdd7..b151ef9c06d6 100644 --- a/writerfilter/source/dmapper/TableData.hxx +++ b/writerfilter/source/dmapper/TableData.hxx @@ -23,6 +23,7 @@ #include "PropertyMap.hxx" +#include #include namespace writerfilter::dmapper @@ -56,7 +57,7 @@ public: typedef tools::SvRef Pointer_t; CellData(css::uno::Reference const & start, TablePropertyMapPtr pProps) - : mStart(start), mEnd(start), mpProps(pProps), mbOpen(true) + : mStart(start), mEnd(start), mpProps(std::move(pProps)), mbOpen(true) , m_nGridSpan(1) { } diff --git a/writerfilter/source/ooxml/OOXMLBinaryObjectReference.cxx b/writerfilter/source/ooxml/OOXMLBinaryObjectReference.cxx index 1cf7ba7d01cc..f33d9bed0e0e 100644 --- a/writerfilter/source/ooxml/OOXMLBinaryObjectReference.cxx +++ b/writerfilter/source/ooxml/OOXMLBinaryObjectReference.cxx @@ -19,14 +19,16 @@ #include "OOXMLBinaryObjectReference.hxx" #include +#include + namespace writerfilter::ooxml { using namespace ::com::sun::star; OOXMLBinaryObjectReference::OOXMLBinaryObjectReference -(OOXMLStream::Pointer_t const & pStream) -: mpStream(pStream), mbRead(false) +(OOXMLStream::Pointer_t pStream) +: mpStream(std::move(pStream)), mbRead(false) { } diff --git a/writerfilter/source/ooxml/OOXMLBinaryObjectReference.hxx b/writerfilter/source/ooxml/OOXMLBinaryObjectReference.hxx index 84940b625858..09502f208199 100644 --- a/writerfilter/source/ooxml/OOXMLBinaryObjectReference.hxx +++ b/writerfilter/source/ooxml/OOXMLBinaryObjectReference.hxx @@ -33,7 +33,7 @@ class OOXMLBinaryObjectReference : public writerfilter::Reference void read(); public: - explicit OOXMLBinaryObjectReference(OOXMLStream::Pointer_t const& pStream); + explicit OOXMLBinaryObjectReference(OOXMLStream::Pointer_t pStream); virtual ~OOXMLBinaryObjectReference() override; virtual void resolve(BinaryObj& rHandler) override; diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx index 62cab6655fc9..237bca5a978c 100644 --- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx @@ -42,6 +42,7 @@ #include #include +#include // this extern variable is declared in OOXMLStreamImpl.hxx OUString customTarget; @@ -50,9 +51,9 @@ using namespace ::com::sun::star; namespace writerfilter::ooxml { -OOXMLDocumentImpl::OOXMLDocumentImpl(OOXMLStream::Pointer_t const & pStream, const uno::Reference& xStatusIndicator, bool bSkipImages, const uno::Sequence& rDescriptor) - : mpStream(pStream) - , mxStatusIndicator(xStatusIndicator) +OOXMLDocumentImpl::OOXMLDocumentImpl(OOXMLStream::Pointer_t pStream, uno::Reference xStatusIndicator, bool bSkipImages, const uno::Sequence& rDescriptor) + : mpStream(std::move(pStream)) + , mxStatusIndicator(std::move(xStatusIndicator)) , mnXNoteId(0) , mbIsSubstream(false) , mbSkipImages(bSkipImages) @@ -416,8 +417,8 @@ namespace { // Ensures that the indicator is reset after exiting OOXMLDocumentImpl::resolve class StatusIndicatorGuard{ public: - explicit StatusIndicatorGuard(css::uno::Reference const & xStatusIndicator) - :mxStatusIndicator(xStatusIndicator) + explicit StatusIndicatorGuard(css::uno::Reference xStatusIndicator) + :mxStatusIndicator(std::move(xStatusIndicator)) { } diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx index fc26f8aeec5a..d7a8a00bd58c 100644 --- a/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx +++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx @@ -100,7 +100,7 @@ private: void resolveCommentsExtendedStream(Stream & rStream); public: - OOXMLDocumentImpl(OOXMLStream::Pointer_t const & pStream, const css::uno::Reference& xStatusIndicator, bool bSkipImages, const css::uno::Sequence& rDescriptor); + OOXMLDocumentImpl(OOXMLStream::Pointer_t pStream, css::uno::Reference xStatusIndicator, bool bSkipImages, const css::uno::Sequence& rDescriptor); virtual ~OOXMLDocumentImpl() override; virtual void resolve(Stream & rStream) override; diff --git a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx index aba5ec0acb92..60a3df570012 100644 --- a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx @@ -21,6 +21,7 @@ #include "OOXMLFastContextHandler.hxx" #include "OOXMLFactory.hxx" #include +#include namespace writerfilter::ooxml { @@ -29,11 +30,11 @@ using namespace ::std; OOXMLFastDocumentHandler::OOXMLFastDocumentHandler( - uno::Reference< uno::XComponentContext > const & context, + uno::Reference< uno::XComponentContext > context, Stream* pStream, OOXMLDocumentImpl* pDocument, sal_Int32 nXNoteId ) - : m_xContext(context) + : m_xContext(std::move(context)) , mpStream( pStream ) , mpDocument( pDocument ) , mnXNoteId( nXNoteId ) diff --git a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx index 8bcbdb68fe05..3d28d2bd742c 100644 --- a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx +++ b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx @@ -35,7 +35,7 @@ class OOXMLFastDocumentHandler : public cppu::WeakImplHelper const & context, + css::uno::Reference< css::uno::XComponentContext > context, Stream* pStream, OOXMLDocumentImpl* pDocument, sal_Int32 nXNoteId ); diff --git a/writerfilter/source/ooxml/OOXMLPropertySet.cxx b/writerfilter/source/ooxml/OOXMLPropertySet.cxx index 1d1724c9c451..7a7d9a7d9150 100644 --- a/writerfilter/source/ooxml/OOXMLPropertySet.cxx +++ b/writerfilter/source/ooxml/OOXMLPropertySet.cxx @@ -24,15 +24,16 @@ #include #include #include +#include namespace writerfilter::ooxml { using namespace ::std; using namespace com::sun::star; -OOXMLProperty::OOXMLProperty(Id id, const OOXMLValue::Pointer_t& pValue, +OOXMLProperty::OOXMLProperty(Id id, OOXMLValue::Pointer_t pValue, OOXMLProperty::Type_t eType) - : mId(id), mpValue(pValue), meType(eType) + : mId(id), mpValue(std::move(pValue)), meType(eType) { } @@ -171,9 +172,8 @@ OOXMLValue * OOXMLValue::clone() const class OOXMLBinaryValue */ -OOXMLBinaryValue::OOXMLBinaryValue(OOXMLBinaryObjectReference::Pointer_t const & - pBinaryObj) -: mpBinaryObj(pBinaryObj) +OOXMLBinaryValue::OOXMLBinaryValue(OOXMLBinaryObjectReference::Pointer_t pBinaryObj) +: mpBinaryObj(std::move(pBinaryObj)) { } @@ -259,8 +259,8 @@ OOXMLValue * OOXMLBooleanValue::clone() const class OOXMLStringValue */ -OOXMLStringValue::OOXMLStringValue(const OUString & rStr) -: mStr(rStr) +OOXMLStringValue::OOXMLStringValue(OUString sStr) +: mStr(std::move(sStr)) { } @@ -293,8 +293,8 @@ OOXMLValue * OOXMLStringValue::clone() const /* class OOXMLInputStreamValue */ -OOXMLInputStreamValue::OOXMLInputStreamValue(uno::Reference const & xInputStream) -: mxInputStream(xInputStream) +OOXMLInputStreamValue::OOXMLInputStreamValue(uno::Reference xInputStream) +: mxInputStream(std::move(xInputStream)) { } @@ -430,8 +430,8 @@ string OOXMLPropertySet::toString() class OOXMLPropertySetValue */ -OOXMLPropertySetValue::OOXMLPropertySetValue(const OOXMLPropertySet::Pointer_t& pPropertySet) - : mpPropertySet(pPropertySet) +OOXMLPropertySetValue::OOXMLPropertySetValue(OOXMLPropertySet::Pointer_t pPropertySet) + : mpPropertySet(std::move(pPropertySet)) { } @@ -689,8 +689,8 @@ string OOXMLMeasurementOrPercentValue::toString() const */ -OOXMLShapeValue::OOXMLShapeValue(uno::Reference const & rShape) -: mrShape(rShape) +OOXMLShapeValue::OOXMLShapeValue(uno::Reference xShape) +: mrShape(std::move(xShape)) { } @@ -720,8 +720,8 @@ OOXMLValue * OOXMLShapeValue::clone() const */ -OOXMLStarMathValue::OOXMLStarMathValue( uno::Reference< embed::XEmbeddedObject > const & c ) -: component(c) +OOXMLStarMathValue::OOXMLStarMathValue( uno::Reference< embed::XEmbeddedObject > c ) +: component(std::move(c)) { } diff --git a/writerfilter/source/ooxml/OOXMLPropertySet.hxx b/writerfilter/source/ooxml/OOXMLPropertySet.hxx index ceabfb586011..d13fd8c5bb61 100644 --- a/writerfilter/source/ooxml/OOXMLPropertySet.hxx +++ b/writerfilter/source/ooxml/OOXMLPropertySet.hxx @@ -65,7 +65,7 @@ private: Type_t meType; public: - OOXMLProperty(Id id, const OOXMLValue::Pointer_t& pValue, Type_t eType); + OOXMLProperty(Id id, OOXMLValue::Pointer_t pValue, Type_t eType); OOXMLProperty(const OOXMLProperty& rSprm) = delete; virtual ~OOXMLProperty() override; @@ -84,7 +84,7 @@ class OOXMLBinaryValue final : public OOXMLValue mutable OOXMLBinaryObjectReference::Pointer_t mpBinaryObj; public: - explicit OOXMLBinaryValue(OOXMLBinaryObjectReference::Pointer_t const& pBinaryObj); + explicit OOXMLBinaryValue(OOXMLBinaryObjectReference::Pointer_t pBinaryObj); virtual ~OOXMLBinaryValue() override; virtual writerfilter::Reference::Pointer_t getBinary() override; @@ -123,7 +123,7 @@ class OOXMLStringValue final : public OOXMLValue OUString mStr; public: - explicit OOXMLStringValue(const OUString& rStr); + explicit OOXMLStringValue(OUString sStr); virtual ~OOXMLStringValue() override; OOXMLStringValue(OOXMLStringValue const&) = default; @@ -144,7 +144,7 @@ class OOXMLInputStreamValue final : public OOXMLValue css::uno::Reference mxInputStream; public: - explicit OOXMLInputStreamValue(css::uno::Reference const& xInputStream); + explicit OOXMLInputStreamValue(css::uno::Reference xInputStream); virtual ~OOXMLInputStreamValue() override; virtual css::uno::Any getAny() const override; @@ -216,7 +216,7 @@ class OOXMLPropertySetValue final : public OOXMLValue OOXMLPropertySet::Pointer_t mpPropertySet; public: - explicit OOXMLPropertySetValue(const OOXMLPropertySet::Pointer_t& pPropertySet); + explicit OOXMLPropertySetValue(OOXMLPropertySet::Pointer_t pPropertySet); virtual ~OOXMLPropertySetValue() override; OOXMLPropertySetValue(OOXMLPropertySetValue const&) = default; @@ -339,7 +339,7 @@ class OOXMLShapeValue final : public OOXMLValue css::uno::Reference mrShape; public: - explicit OOXMLShapeValue(css::uno::Reference const& rShape); + explicit OOXMLShapeValue(css::uno::Reference xShape); virtual ~OOXMLShapeValue() override; virtual css::uno::Any getAny() const override; @@ -354,7 +354,7 @@ class OOXMLStarMathValue final : public OOXMLValue css::uno::Reference component; public: - explicit OOXMLStarMathValue(css::uno::Reference const& component); + explicit OOXMLStarMathValue(css::uno::Reference component); virtual ~OOXMLStarMathValue() override; virtual css::uno::Any getAny() const override; diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx index 1cfd4813998e..a737255595d5 100644 --- a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx @@ -23,6 +23,7 @@ #include #include #include +#include namespace writerfilter::ooxml { @@ -31,9 +32,9 @@ using namespace com::sun::star; OOXMLStreamImpl::OOXMLStreamImpl (uno::Reference const & xContext, - uno::Reference const & xStorageStream, + uno::Reference xStorageStream, StreamType_t nType, bool bRepairStorage) -: mxContext(xContext), mxStorageStream(xStorageStream), mnStreamType(nType) +: mxContext(xContext), mxStorageStream(std::move(xStorageStream)), mnStreamType(nType) { mxStorage.set (comphelper::OStorageHelper::GetStorageOfFormatFromInputStream @@ -57,12 +58,12 @@ OOXMLStreamImpl::OOXMLStreamImpl } OOXMLStreamImpl::OOXMLStreamImpl -(OOXMLStreamImpl const & rOOXMLStream, const OUString & rId) +(OOXMLStreamImpl const & rOOXMLStream, OUString sId) : mxContext(rOOXMLStream.mxContext), mxStorageStream(rOOXMLStream.mxStorageStream), mxStorage(rOOXMLStream.mxStorage), mnStreamType(UNKNOWN), - msId(rId), + msId(std::move(sId)), msPath(rOOXMLStream.msPath) { mxRelationshipAccess.set(rOOXMLStream.mxDocumentStream, uno::UNO_QUERY_THROW); diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.hxx b/writerfilter/source/ooxml/OOXMLStreamImpl.hxx index e09db3c4f5af..ec65290c6214 100644 --- a/writerfilter/source/ooxml/OOXMLStreamImpl.hxx +++ b/writerfilter/source/ooxml/OOXMLStreamImpl.hxx @@ -61,9 +61,9 @@ public: (OOXMLStreamImpl const & rStream, StreamType_t nType); OOXMLStreamImpl (css::uno::Reference const & xContext, - css::uno::Reference const & xStorageStream, + css::uno::Reference xStorageStream, StreamType_t nType, bool bRepairStorage); - OOXMLStreamImpl(OOXMLStreamImpl const & rStream, const OUString & rId); + OOXMLStreamImpl(OOXMLStreamImpl const & rStream, OUString aId); virtual ~OOXMLStreamImpl() override; diff --git a/writerperfect/inc/ImportFilter.hxx b/writerperfect/inc/ImportFilter.hxx index f2cfb614d1b4..9923b834625b 100644 --- a/writerperfect/inc/ImportFilter.hxx +++ b/writerperfect/inc/ImportFilter.hxx @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -43,8 +44,8 @@ class ImportFilterImpl css::lang::XInitialization> { public: - ImportFilterImpl(const css::uno::Reference& rxContext) - : mxContext(rxContext) + ImportFilterImpl(css::uno::Reference xContext) + : mxContext(std::move(xContext)) { } diff --git a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx index b0118eaad5b7..bc13f9fc74b5 100644 --- a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx +++ b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx @@ -32,6 +32,7 @@ #include #include +#include using namespace ::com::sun::star; @@ -71,8 +72,8 @@ class FolderStream : public librevenge::RVNGInputStream { public: //! constructor - explicit FolderStream(const css::uno::Reference& xContent) - : m_xContent(xContent) + explicit FolderStream(css::uno::Reference xContent) + : m_xContent(std::move(xContent)) { } diff --git a/writerperfect/source/common/DirectoryStream.cxx b/writerperfect/source/common/DirectoryStream.cxx index 28c38daa686b..9664fbee9750 100644 --- a/writerperfect/source/common/DirectoryStream.cxx +++ b/writerperfect/source/common/DirectoryStream.cxx @@ -39,6 +39,7 @@ #include #include +#include namespace io = com::sun::star::io; namespace sdbc = com::sun::star::sdbc; @@ -93,13 +94,13 @@ uno::Reference findStream(ucbhelper::Content& rContent, std::u struct DirectoryStream::Impl { - explicit Impl(const uno::Reference& rxContent); + explicit Impl(uno::Reference xContent); uno::Reference xContent; }; -DirectoryStream::Impl::Impl(const uno::Reference& rxContent) - : xContent(rxContent) +DirectoryStream::Impl::Impl(uno::Reference _xContent) + : xContent(std::move(_xContent)) { } diff --git a/writerperfect/source/common/WPXSvInputStream.cxx b/writerperfect/source/common/WPXSvInputStream.cxx index 3364b0509d7e..45625927e3a1 100644 --- a/writerperfect/source/common/WPXSvInputStream.cxx +++ b/writerperfect/source/common/WPXSvInputStream.cxx @@ -29,6 +29,7 @@ #include #include #include +#include #include namespace writerperfect @@ -96,7 +97,7 @@ OUString concatPath(std::u16string_view lhs, const OUString& rhs) struct OLEStreamData { - OLEStreamData(const OString& rName, const OString& rvngName); + OLEStreamData(OString aName, OString rvngName); tools::SvRef stream; @@ -155,9 +156,9 @@ public: bool mbInitialized; }; -OLEStreamData::OLEStreamData(const OString& rName, const OString& rvngName) - : name(rName) - , RVNGname(rvngName) +OLEStreamData::OLEStreamData(OString aName, OString rvngName) + : name(std::move(aName)) + , RVNGname(std::move(rvngName)) { } @@ -265,7 +266,7 @@ namespace { struct ZipStreamData { - explicit ZipStreamData(const OString& rName); + explicit ZipStreamData(OString aName); Reference xStream; @@ -309,8 +310,8 @@ public: bool mbInitialized; }; -ZipStreamData::ZipStreamData(const OString& rName) - : aName(rName) +ZipStreamData::ZipStreamData(OString _aName) + : aName(std::move(_aName)) { } diff --git a/writerperfect/source/writer/WordPerfectImportFilter.hxx b/writerperfect/source/writer/WordPerfectImportFilter.hxx index a9fc331ae3a9..92a90699d8db 100644 --- a/writerperfect/source/writer/WordPerfectImportFilter.hxx +++ b/writerperfect/source/writer/WordPerfectImportFilter.hxx @@ -16,6 +16,7 @@ #include #include #include +#include /* This component will be instantiated for both import or export. Whether it calls * setSourceDocument or setTargetDocument determines which Impl function the filter @@ -32,9 +33,8 @@ class WordPerfectImportFilter bool importImpl(const css::uno::Sequence& aDescriptor); public: - explicit WordPerfectImportFilter( - const css::uno::Reference& rxContext) - : mxContext(rxContext) + explicit WordPerfectImportFilter(css::uno::Reference xContext) + : mxContext(std::move(xContext)) { }