diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-08-11 11:04:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-08-12 08:04:16 +0200 |
commit | 24865e2d57a32aab7212b1a283f9b30215900dda (patch) | |
tree | 9fce0db252a9a8b9959b46ce7cad326be6255329 | |
parent | 7786bafdb8951aa3f0acda801ddb3704c81d00d8 (diff) |
clang-tidy modernize-pass-by-value in sw
Change-Id: I9a3b33595e34a264baeede33672a0c090ae85157
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138134
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
240 files changed, 658 insertions, 500 deletions
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index 4bb32730583e..632591ddfe93 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -19,6 +19,7 @@ #include <rtl/ref.hxx> #include <cppuhelper/weakref.hxx> +#include <utility> #include <vcl/window.hxx> #include <svx/svdmodel.hxx> #include <svx/unomod.hxx> @@ -379,17 +380,17 @@ public: public: SwAccessibleEvent_Impl( EventType eT, SwAccessibleContext *pA, - const SwAccessibleChild& rFrameOrObj ) + SwAccessibleChild aFrameOrObj ) : mxAcc( pA ), - maFrameOrObj( rFrameOrObj ), + maFrameOrObj(std::move( aFrameOrObj )), meType( eT ), mnStates( AccessibleStates::NONE ), mpParentFrame( nullptr ) {} SwAccessibleEvent_Impl( EventType eT, - const SwAccessibleChild& rFrameOrObj ) - : maFrameOrObj( rFrameOrObj ), + SwAccessibleChild aFrameOrObj ) + : maFrameOrObj(std::move( aFrameOrObj )), meType( eT ), mnStates( AccessibleStates::NONE ), mpParentFrame( nullptr ) @@ -409,11 +410,11 @@ public: SwAccessibleEvent_Impl( EventType eT, SwAccessibleContext *pA, - const SwAccessibleChild& rFrameOrObj, + SwAccessibleChild aFrameOrObj, const SwRect& rR ) : maOldBox( rR ), mxAcc( pA ), - maFrameOrObj( rFrameOrObj ), + maFrameOrObj(std::move( aFrameOrObj )), meType( eT ), mnStates( AccessibleStates::NONE ), mpParentFrame( nullptr ) @@ -425,10 +426,10 @@ public: SwAccessibleEvent_Impl( EventType eT, SwAccessibleContext *pA, - const SwAccessibleChild& rFrameOrObj, + SwAccessibleChild aFrameOrObj, const AccessibleStates _nStates ) : mxAcc( pA ), - maFrameOrObj( rFrameOrObj ), + maFrameOrObj(std::move( aFrameOrObj )), meType( eT ), mnStates( _nStates ), mpParentFrame( nullptr ) @@ -438,9 +439,9 @@ public: } SwAccessibleEvent_Impl( EventType eT, const SwFrame *pParentFrame, - const SwAccessibleChild& rFrameOrObj, const SwRect& rR ) : + SwAccessibleChild aFrameOrObj, const SwRect& rR ) : maOldBox( rR ), - maFrameOrObj( rFrameOrObj ), + maFrameOrObj(std::move( aFrameOrObj )), meType( eT ), mnStates( AccessibleStates::NONE ), mpParentFrame( pParentFrame ) diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx index b4eb205db4b2..3f9aa8f85f7f 100644 --- a/sw/source/core/attr/format.cxx +++ b/sw/source/core/attr/format.cxx @@ -32,6 +32,7 @@ #include <svx/sdr/attribute/sdrallfillattributeshelper.hxx> #include <svx/unobrushitemhelper.hxx> #include <svx/xdef.hxx> +#include <utility> using namespace com::sun::star; diff --git a/sw/source/core/attr/hints.cxx b/sw/source/core/attr/hints.cxx index 8016037bfdb8..abcdd54fe076 100644 --- a/sw/source/core/attr/hints.cxx +++ b/sw/source/core/attr/hints.cxx @@ -23,6 +23,7 @@ #include <ndtxt.hxx> #include <swtypes.hxx> #include <svl/languageoptions.hxx> +#include <utility> #include <vcl/outdev.hxx> #include <osl/diagnose.h> @@ -74,7 +75,7 @@ SwUpdateAttr::SwUpdateAttr( sal_Int32 nS, sal_Int32 nE, sal_uInt16 nW ) } SwUpdateAttr::SwUpdateAttr( sal_Int32 nS, sal_Int32 nE, sal_uInt16 nW, std::vector<sal_uInt16> aW ) - : SwMsgPoolItem( RES_UPDATE_ATTR ), m_nStart( nS ), m_nEnd( nE ), m_nWhichAttr( nW ), m_aWhichFmtAttrs( aW ) + : SwMsgPoolItem( RES_UPDATE_ATTR ), m_nStart( nS ), m_nEnd( nE ), m_nWhichAttr( nW ), m_aWhichFmtAttrs(std::move( aW )) { } diff --git a/sw/source/core/bastyp/breakit.cxx b/sw/source/core/bastyp/breakit.cxx index 2fd474d0df87..a8948ede9d97 100644 --- a/sw/source/core/bastyp/breakit.cxx +++ b/sw/source/core/bastyp/breakit.cxx @@ -27,6 +27,7 @@ #include <unicode/uchar.h> #include <unotools/localedatawrapper.hxx> #include <algorithm> +#include <utility> using namespace com::sun::star; diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx index baa98a3815db..a2dfd6c4aee2 100644 --- a/sw/source/core/bastyp/calc.cxx +++ b/sw/source/core/bastyp/calc.cxx @@ -48,6 +48,7 @@ #include <unotools/localedatawrapper.hxx> #include <unotools/useroptions.hxx> #include <usrfld.hxx> +#include <utility> #include <viewsh.hxx> #include <com/sun/star/i18n/KParseTokens.hpp> #include <com/sun/star/i18n/KParseType.hpp> diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx index ccf7522a2370..cf4e8e135454 100644 --- a/sw/source/core/bastyp/swcache.cxx +++ b/sw/source/core/bastyp/swcache.cxx @@ -22,6 +22,7 @@ #include <o3tl/safeint.hxx> #include <osl/diagnose.h> #include <sal/log.hxx> +#include <utility> #include <limits.h> @@ -76,7 +77,7 @@ void SwCache::Check() SwCache::SwCache( const sal_uInt16 nInitSize #ifdef DBG_UTIL - , const OString &rNm + , OString aNm #endif ) : m_pRealFirst( nullptr ), @@ -84,7 +85,7 @@ SwCache::SwCache( const sal_uInt16 nInitSize m_pLast( nullptr ), m_nCurMax( nInitSize ) #ifdef DBG_UTIL - , m_aName( rNm ) + , m_aName(std::move( aNm )) , m_nAppend( 0 ) , m_nInsertFree( 0 ) , m_nReplace( 0 ) diff --git a/sw/source/core/crsr/bookmark.cxx b/sw/source/core/crsr/bookmark.cxx index a6c22c804e6b..6796d672387f 100644 --- a/sw/source/core/crsr/bookmark.cxx +++ b/sw/source/core/crsr/bookmark.cxx @@ -30,6 +30,7 @@ #include <sfx2/viewsh.hxx> #include <UndoBookmark.hxx> #include <unobookmark.hxx> +#include <utility> #include <xmloff/odffields.hxx> #include <libxml/xmlwriter.h> #include <comphelper/random.hxx> @@ -267,9 +268,9 @@ namespace namespace sw::mark { MarkBase::MarkBase(const SwPaM& aPaM, - const OUString& rName) + OUString aName) : m_oPos1(*aPaM.GetPoint()) - , m_aName(rName) + , m_aName(std::move(aName)) { m_oPos1->SetMark(this); lcl_FixPosition(*m_oPos1); diff --git a/sw/source/core/crsr/contentcontrolbutton.cxx b/sw/source/core/crsr/contentcontrolbutton.cxx index 4a4721cf7662..cd3deb5459bb 100644 --- a/sw/source/core/crsr/contentcontrolbutton.cxx +++ b/sw/source/core/crsr/contentcontrolbutton.cxx @@ -9,6 +9,7 @@ #include <contentcontrolbutton.hxx> +#include <utility> #include <vcl/weldutils.hxx> #include <vcl/event.hxx> #include <vcl/decoview.hxx> @@ -16,10 +17,10 @@ #include <edtwin.hxx> #include <dview.hxx> -SwContentControlButton::SwContentControlButton( - SwEditWin* pEditWin, const std::shared_ptr<SwContentControl>& pContentControl) +SwContentControlButton::SwContentControlButton(SwEditWin* pEditWin, + std::shared_ptr<SwContentControl> pContentControl) : Control(pEditWin, WB_DIALOGCONTROL) - , m_pContentControl(pContentControl) + , m_pContentControl(std::move(pContentControl)) { assert(GetParent()); assert(dynamic_cast<SwEditWin*>(GetParent())); diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index 7015d5069917..b4db9c4275cd 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -45,6 +45,7 @@ #include <hints.hxx> #include <txatbase.hxx> #include <osl/diagnose.h> +#include <utility> #include <xmloff/odffields.hxx> #include <rtl/ustrbuf.hxx> diff --git a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx index eb52f7c22f45..4aa07130b804 100644 --- a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx +++ b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx @@ -45,6 +45,7 @@ #include <tools/urlobj.hxx> #include <unotools/charclass.hxx> #include <unotools/securityoptions.hxx> +#include <utility> using namespace ::com::sun::star; @@ -57,8 +58,8 @@ namespace SwTableNode* pTableNd; SwSectionNode* pSectNd; - explicit FindItem(const OUString& rS) - : m_Item(rS), pTableNd(nullptr), pSectNd(nullptr) + explicit FindItem(OUString aS) + : m_Item(std::move(aS)), pTableNd(nullptr), pSectNd(nullptr) {} }; diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx index bdc8b0c9f22d..8f50b72ced7b 100644 --- a/sw/source/core/doc/docfld.cxx +++ b/sw/source/core/doc/docfld.cxx @@ -58,6 +58,7 @@ #include <authfld.hxx> #include <txtinet.hxx> #include <fmtcntnt.hxx> +#include <utility> using namespace ::com::sun::star::uno; @@ -363,9 +364,9 @@ sal_Int32 SetGetExpField::GetCntPosFromContent() const return nRet; } -HashStr::HashStr( const OUString& rName, const OUString& rText, +HashStr::HashStr( const OUString& rName, OUString aText, HashStr* pNxt ) - : SwHash( rName ), aSetStr( rText ) + : SwHash( rName ), aSetStr(std::move( aText )) { pNext.reset( pNxt ); } diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index 0f76346217d9..4213ae9019a0 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -47,6 +47,7 @@ #include <hints.hxx> #include <pamtyp.hxx> #include <poolfmt.hxx> +#include <utility> #include <view.hxx> #include <viewopt.hxx> #include <usrpref.hxx> diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx index c21da4c8017a..3fdc83bfcdfb 100644 --- a/sw/source/core/doc/htmltbl.cxx +++ b/sw/source/core/doc/htmltbl.cxx @@ -33,6 +33,7 @@ #include <rootfrm.hxx> #include <flyfrm.hxx> #include <poolfmt.hxx> +#include <utility> #include <viewsh.hxx> #include <tabfrm.hxx> #include <viewopt.hxx> diff --git a/sw/source/core/doc/list.cxx b/sw/source/core/doc/list.cxx index 706ba19ce40f..aa4c06f473aa 100644 --- a/sw/source/core/doc/list.cxx +++ b/sw/source/core/doc/list.cxx @@ -22,6 +22,7 @@ #include <numrule.hxx> #include <ndarr.hxx> #include <node.hxx> +#include <utility> SwList::SwList( OUString sListId, SwNumRule& rDefaultListStyle, diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index 9a62e8603388..968734f907b2 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -20,6 +20,7 @@ #include <memory> #include <hintids.hxx> +#include <utility> #include <vcl/font.hxx> #include <editeng/brushitem.hxx> #include <editeng/numitem.hxx> diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx index 9a8cd8bff543..901b472fa74b 100644 --- a/sw/source/core/doc/tblafmt.cxx +++ b/sw/source/core/doc/tblafmt.cxx @@ -64,6 +64,7 @@ #include <legacyitem.hxx> #include <memory> +#include <utility> #include <vector> /* diff --git a/sw/source/core/docnode/cancellablejob.cxx b/sw/source/core/docnode/cancellablejob.cxx index eecd1d33683d..d636078e2c1d 100644 --- a/sw/source/core/docnode/cancellablejob.cxx +++ b/sw/source/core/docnode/cancellablejob.cxx @@ -18,9 +18,10 @@ */ #include "cancellablejob.hxx" #include <observablethread.hxx> +#include <utility> -CancellableJob::CancellableJob( const rtl::Reference< ObservableThread >& rThread ) : - mrThread( rThread ) +CancellableJob::CancellableJob( rtl::Reference< ObservableThread > xThread ) : + mrThread(std::move( xThread )) { } diff --git a/sw/source/core/docnode/cancellablejob.hxx b/sw/source/core/docnode/cancellablejob.hxx index 010e1f4dec6f..3cd2119299a4 100644 --- a/sw/source/core/docnode/cancellablejob.hxx +++ b/sw/source/core/docnode/cancellablejob.hxx @@ -31,7 +31,7 @@ class CancellableJob : public ::cppu::WeakImplHelper<css::util::XCancellable> { public: - explicit CancellableJob(const ::rtl::Reference<ObservableThread>& rThread); + explicit CancellableJob(::rtl::Reference<ObservableThread> xThread); // css::util::XCancellable: virtual void SAL_CALL cancel() override; diff --git a/sw/source/core/docnode/finalthreadmanager.cxx b/sw/source/core/docnode/finalthreadmanager.cxx index 4eb80a07168b..9d293b05492f 100644 --- a/sw/source/core/docnode/finalthreadmanager.cxx +++ b/sw/source/core/docnode/finalthreadmanager.cxx @@ -29,6 +29,7 @@ #include <rtl/ustring.hxx> #include <cppuhelper/supportsservice.hxx> #include <mutex> +#include <utility> /** thread to cancel a give list of cancellable jobs @@ -145,10 +146,10 @@ class TerminateOfficeThread : public osl::Thread { public: TerminateOfficeThread( CancelJobsThread const & rCancelJobsThread, - css::uno::Reference< css::uno::XComponentContext > const & xContext ) + css::uno::Reference< css::uno::XComponentContext > xContext ) : mrCancelJobsThread( rCancelJobsThread ), mbStopOfficeTermination( false ), - mxContext( xContext ) + mxContext(std::move( xContext )) { } diff --git a/sw/source/core/docnode/retrieveinputstream.cxx b/sw/source/core/docnode/retrieveinputstream.cxx index 8054e341b7bb..cc4e60758c3a 100644 --- a/sw/source/core/docnode/retrieveinputstream.cxx +++ b/sw/source/core/docnode/retrieveinputstream.cxx @@ -23,6 +23,7 @@ #include <unotools/mediadescriptor.hxx> #include <com/sun/star/io/XStream.hpp> #include <com/sun/star/beans/PropertyValue.hpp> +#include <utility> /* class for a thread to retrieve an input stream given by a URL @@ -39,11 +40,11 @@ SwAsyncRetrieveInputStreamThread::SwAsyncRetrieveInputStreamThread( const SwRetrievedInputStreamDataManager::tDataKey nDataKey, - const OUString& rLinkedURL, - const OUString& rReferer ) + OUString aLinkedURL, + OUString aReferer ) : mnDataKey( nDataKey ), - mrLinkedURL( rLinkedURL ), - mrReferer( rReferer ) + mrLinkedURL(std::move( aLinkedURL )), + mrReferer(std::move( aReferer )) { } diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index b112595a84c1..96f448b3d0f5 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -61,6 +61,7 @@ #include <calbck.hxx> #include <fmtclds.hxx> #include <algorithm> +#include <utility> #include "ndsect.hxx" using namespace ::com::sun::star; diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index fccdbcc25398..fc35471c63c8 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -64,6 +64,7 @@ #include <itabenum.hxx> #include <memory> +#include <utility> using namespace ::com::sun::star; @@ -218,7 +219,7 @@ class SwAutoFormat } public: - SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFormatFlags const & rFlags, + SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFormatFlags aFlags, SwNodeIndex const * pSttNd = nullptr, SwNodeIndex const * pEndNd = nullptr ); }; @@ -2227,9 +2228,9 @@ void SwAutoFormat::AutoCorrect(TextFrameIndex nPos) ClearRedlineText(); } -SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFormatFlags const & rFlags, +SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFormatFlags aFlags, SwNodeIndex const * pSttNd, SwNodeIndex const * pEndNd ) - : m_aFlags( rFlags ), + : m_aFlags(std::move( aFlags )), m_aDelPam( pEdShell->GetDoc()->GetNodes().GetEndOfExtras() ), m_aNdIdx( pEdShell->GetDoc()->GetNodes().GetEndOfExtras(), SwNodeOffset(+1) ), m_aEndNdIdx( pEdShell->GetDoc()->GetNodes().GetEndOfContent() ), diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx index 0b25bf75e90d..02ecda68477d 100644 --- a/sw/source/core/fields/cellfml.cxx +++ b/sw/source/core/fields/cellfml.cxx @@ -48,6 +48,7 @@ #include <o3tl/safeint.hxx> #include <osl/diagnose.h> #include <svl/numformat.hxx> +#include <utility> namespace { diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx index b6c622b087ae..867aac13c209 100644 --- a/sw/source/core/fields/dbfld.cxx +++ b/sw/source/core/fields/dbfld.cxx @@ -33,6 +33,7 @@ #include <dbmgr.hxx> #include <unofldmid.h> #include <o3tl/string_view.hxx> +#include <utility> using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star; diff --git a/sw/source/core/fields/ddefld.cxx b/sw/source/core/fields/ddefld.cxx index c80e514593ce..19efa6a207ea 100644 --- a/sw/source/core/fields/ddefld.cxx +++ b/sw/source/core/fields/ddefld.cxx @@ -36,6 +36,7 @@ #include <swbaslnk.hxx> #include <unofldmid.h> #include <hints.hxx> +#include <utility> using namespace ::com::sun::star; diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index ac638bfadd58..76e32a6aeb73 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -69,6 +69,7 @@ #include <pagefrm.hxx> #include <cntfrm.hxx> #include <pam.hxx> +#include <utility> #include <viewsh.hxx> #include <dbmgr.hxx> #include <shellres.hxx> diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index a7434fbc5234..6923eb6ae5f6 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -58,6 +58,7 @@ #include <SwStyleNameMapper.hxx> #include <unofldmid.h> #include <numrule.hxx> +#include <utility> using namespace ::com::sun::star; using namespace ::com::sun::star::text; diff --git a/sw/source/core/fields/macrofld.cxx b/sw/source/core/fields/macrofld.cxx index efab24d877cf..244edae398d1 100644 --- a/sw/source/core/fields/macrofld.cxx +++ b/sw/source/core/fields/macrofld.cxx @@ -23,6 +23,7 @@ #include <com/sun/star/uri/UriReferenceFactory.hpp> #include <com/sun/star/uri/XVndSunStarScriptUrl.hpp> #include <comphelper/processfactory.hxx> +#include <utility> #include <osl/diagnose.h> using namespace ::com::sun::star; diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index c304f311df7f..c5a2902cfa2b 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -47,6 +47,7 @@ #include <IMark.hxx> #include <crossrefbookmark.hxx> #include <ftnidx.hxx> +#include <utility> #include <viewsh.hxx> #include <unofldmid.h> #include <SwStyleNameMapper.hxx> @@ -1307,7 +1308,7 @@ private: static sal_uInt16 GetFirstUnusedId( std::set<sal_uInt16> &rIds ); public: - explicit RefIdsMap( const OUString& rName ) : aName( rName ), bInit( false ) {} + explicit RefIdsMap( OUString _aName ) : aName(std::move( _aName )), bInit( false ) {} void Check( SwDoc& rDoc, SwDoc& rDestDoc, SwGetRefField& rField, bool bField ); diff --git a/sw/source/core/fields/scrptfld.cxx b/sw/source/core/fields/scrptfld.cxx index eb2e8609ffd8..302845281d36 100644 --- a/sw/source/core/fields/scrptfld.cxx +++ b/sw/source/core/fields/scrptfld.cxx @@ -22,6 +22,7 @@ #include <strings.hrc> #include <o3tl/any.hxx> #include <swtypes.hxx> +#include <utility> using namespace ::com::sun::star; diff --git a/sw/source/core/inc/SearchResultLocator.hxx b/sw/source/core/inc/SearchResultLocator.hxx index f8c30b77df5f..ad48e075d27d 100644 --- a/sw/source/core/inc/SearchResultLocator.hxx +++ b/sw/source/core/inc/SearchResultLocator.hxx @@ -13,6 +13,7 @@ #include <swdllapi.h> #include <doc.hxx> #include <basegfx/range/b2drange.hxx> +#include <utility> namespace sw::search { @@ -31,11 +32,10 @@ struct SearchIndexData SearchIndexData() {} - SearchIndexData(NodeType eType, SwNodeOffset nNodeIndex, - OUString const& aObjectName = OUString()) + SearchIndexData(NodeType eType, SwNodeOffset nNodeIndex, OUString aObjectName = OUString()) : meType(eType) , mnNodeIndex(nNodeIndex) - , maObjectName(aObjectName) + , maObjectName(std::move(aObjectName)) { } }; diff --git a/sw/source/core/inc/SwUndoFmt.hxx b/sw/source/core/inc/SwUndoFmt.hxx index 499a6fcd65b3..c3f0a256f16c 100644 --- a/sw/source/core/inc/SwUndoFmt.hxx +++ b/sw/source/core/inc/SwUndoFmt.hxx @@ -87,8 +87,8 @@ protected: SwDoc& m_rDoc; public: - SwUndoRenameFormat(SwUndoId nUndoId, const OUString & sOldName, - const OUString & sNewName, + SwUndoRenameFormat(SwUndoId nUndoId, OUString sOldName, + OUString sNewName, SwDoc& rDoc); virtual ~SwUndoRenameFormat() override; @@ -243,7 +243,7 @@ class SwUndoNumruleRename final : public SwUndo SwDoc& m_rDoc; public: - SwUndoNumruleRename(const OUString & aOldName, const OUString & aNewName, + SwUndoNumruleRename(OUString aOldName, OUString aNewName, SwDoc& rDoc); virtual void UndoImpl( ::sw::UndoRedoContext & ) override; diff --git a/sw/source/core/inc/UndoAttribute.hxx b/sw/source/core/inc/UndoAttribute.hxx index ffe4c4f3206d..c3cf4925d95a 100644 --- a/sw/source/core/inc/UndoAttribute.hxx +++ b/sw/source/core/inc/UndoAttribute.hxx @@ -47,7 +47,7 @@ class SwUndoAttr final : public SwUndo, private SwUndRng void RemoveIdx( SwDoc& rDoc ); public: - SwUndoAttr( const SwPaM&, const SfxItemSet &, const SetAttrMode nFlags ); + SwUndoAttr( const SwPaM&, SfxItemSet, const SetAttrMode nFlags ); SwUndoAttr( const SwPaM&, const SfxPoolItem&, const SetAttrMode nFlags ); virtual ~SwUndoAttr() override; @@ -216,7 +216,7 @@ class SwUndoChangeFootNote final : public SwUndo, private SwUndRng const bool m_bEndNote; public: - SwUndoChangeFootNote( const SwPaM& rRange, const OUString& rText, + SwUndoChangeFootNote( const SwPaM& rRange, OUString aText, bool bIsEndNote ); virtual ~SwUndoChangeFootNote() override; diff --git a/sw/source/core/inc/UndoBookmark.hxx b/sw/source/core/inc/UndoBookmark.hxx index dc57ad300635..368a99757167 100644 --- a/sw/source/core/inc/UndoBookmark.hxx +++ b/sw/source/core/inc/UndoBookmark.hxx @@ -88,7 +88,7 @@ class SwUndoRenameBookmark final : public SwUndo const OUString m_sNewName; public: - SwUndoRenameBookmark(const OUString& rOldName, const OUString& rNewName, const SwDoc& rDoc); + SwUndoRenameBookmark(OUString aOldName, OUString aNewName, const SwDoc& rDoc); virtual ~SwUndoRenameBookmark() override; private: diff --git a/sw/source/core/inc/UndoInsert.hxx b/sw/source/core/inc/UndoInsert.hxx index 20bc4be7fdc5..82c89d710728 100644 --- a/sw/source/core/inc/UndoInsert.hxx +++ b/sw/source/core/inc/UndoInsert.hxx @@ -185,12 +185,12 @@ class SwUndoInsertLabel final : public SwUndo bool m_bCopyBorder :1; public: - SwUndoInsertLabel( const SwLabelType eTyp, const OUString &rText, + SwUndoInsertLabel( const SwLabelType eTyp, OUString rText, // #i39983# the separator is drawn with a character style - const OUString& rSeparator, - const OUString& rNumberSeparator, //#i61007# order of captions + OUString aSeparator, + OUString aNumberSeparator, //#i61007# order of captions const bool bBefore, const sal_uInt16 nId, - const OUString& rCharacterStyle, + OUString aCharacterStyle, const bool bCpyBrd, const SwDoc* pDoc ); virtual ~SwUndoInsertLabel() override; diff --git a/sw/source/core/inc/UndoManager.hxx b/sw/source/core/inc/UndoManager.hxx index aa66acf3ad2d..3376393573e6 100644 --- a/sw/source/core/inc/UndoManager.hxx +++ b/sw/source/core/inc/UndoManager.hxx @@ -43,7 +43,7 @@ class SW_DLLPUBLIC UndoManager final , public SdrUndoManager { public: - UndoManager(std::shared_ptr<SwNodes> const & pUndoNodes, + UndoManager(std::shared_ptr<SwNodes> pUndoNodes, IDocumentDrawModelAccess & rDrawModelAccess, IDocumentRedlineAccess & rRedlineAccess, IDocumentState & rState); diff --git a/sw/source/core/inc/UndoNumbering.hxx b/sw/source/core/inc/UndoNumbering.hxx index c5914fbd01ac..3c04ed9c91a6 100644 --- a/sw/source/core/inc/UndoNumbering.hxx +++ b/sw/source/core/inc/UndoNumbering.hxx @@ -39,7 +39,7 @@ public: SwUndoInsNum( const SwNumRule& rOldRule, const SwNumRule& rNewRule, const SwDoc& rDoc, SwUndoId nUndoId = SwUndoId::INSFMTATTR ); SwUndoInsNum( const SwPosition& rPos, const SwNumRule& rRule, - const OUString& rReplaceRule ); + OUString aReplaceRule ); virtual ~SwUndoInsNum() override; diff --git a/sw/source/core/inc/UndoTable.hxx b/sw/source/core/inc/UndoTable.hxx index dc6a8f4cd89a..0507f531ae12 100644 --- a/sw/source/core/inc/UndoTable.hxx +++ b/sw/source/core/inc/UndoTable.hxx @@ -385,7 +385,7 @@ class SwUndoTableStyleMake final : public SwUndo OUString m_sName; std::unique_ptr<SwTableAutoFormat> m_pAutoFormat; public: - SwUndoTableStyleMake(const OUString& rName, const SwDoc& rDoc); + SwUndoTableStyleMake(OUString aName, const SwDoc& rDoc); virtual ~SwUndoTableStyleMake() override; diff --git a/sw/source/core/inc/acorrect.hxx b/sw/source/core/inc/acorrect.hxx index 16df1c6a0b45..0b9fce178739 100644 --- a/sw/source/core/inc/acorrect.hxx +++ b/sw/source/core/inc/acorrect.hxx @@ -26,6 +26,7 @@ #include <editeng/svxacorr.hxx> #include <nodeoffset.hxx> #include <ndindex.hxx> +#include <utility> class SwEditShell; class SwPaM; @@ -104,9 +105,9 @@ class SwAutoCorrExceptWord public: SwAutoCorrExceptWord(ACFlags nAFlags, SwNodeOffset nNd, sal_Int32 nContent, - const OUString& rWord, sal_Unicode cChr, + OUString aWord, sal_Unicode cChr, LanguageType eLang) - : m_sWord(rWord), m_nNode(nNd), m_nFlags(nAFlags), m_nContent(nContent), + : m_sWord(std::move(aWord)), m_nNode(nNd), m_nFlags(nAFlags), m_nContent(nContent), m_cChar(cChr), m_eLanguage(eLang), m_bDeleted(false) {} diff --git a/sw/source/core/inc/bookmark.hxx b/sw/source/core/inc/bookmark.hxx index 4413137bcb37..bf2e98488f3e 100644 --- a/sw/source/core/inc/bookmark.hxx +++ b/sw/source/core/inc/bookmark.hxx @@ -110,7 +110,7 @@ namespace sw::mark { // SwClient virtual void SwClientNotify(const SwModify&, const SfxHint&) override; - MarkBase(const SwPaM& rPaM, const OUString& rName); + MarkBase(const SwPaM& rPaM, OUString aName); std::optional<SwPosition> m_oPos1; std::optional<SwPosition> m_oPos2; OUString m_aName; diff --git a/sw/source/core/inc/contentcontrolbutton.hxx b/sw/source/core/inc/contentcontrolbutton.hxx index cd63bddd4e69..37da5ece669e 100644 --- a/sw/source/core/inc/contentcontrolbutton.hxx +++ b/sw/source/core/inc/contentcontrolbutton.hxx @@ -20,8 +20,7 @@ class SwContentControl; class SwContentControlButton : public Control { public: - SwContentControlButton(SwEditWin* pEditWin, - const std::shared_ptr<SwContentControl>& pContentControl); + SwContentControlButton(SwEditWin* pEditWin, std::shared_ptr<SwContentControl> pContentControl); virtual ~SwContentControlButton() override; virtual void dispose() override; diff --git a/sw/source/core/inc/docfld.hxx b/sw/source/core/inc/docfld.hxx index badae79afc47..8cc339accb01 100644 --- a/sw/source/core/inc/docfld.hxx +++ b/sw/source/core/inc/docfld.hxx @@ -121,7 +121,7 @@ class SetGetExpFields : public o3tl::sorted_vector<std::unique_ptr<SetGetExpFiel struct HashStr final : public SwHash { OUString aSetStr; - HashStr( const OUString& rName, const OUString& rText, HashStr* ); + HashStr( const OUString& rName, OUString aText, HashStr* ); }; struct SwCalcFieldType final : public SwHash diff --git a/sw/source/core/inc/retrievedinputstreamdata.hxx b/sw/source/core/inc/retrievedinputstreamdata.hxx index 4a958b31bf19..ddb2c564a12a 100644 --- a/sw/source/core/inc/retrievedinputstreamdata.hxx +++ b/sw/source/core/inc/retrievedinputstreamdata.hxx @@ -26,6 +26,7 @@ #include <map> #include <memory> +#include <utility> namespace com::sun::star::io { class XInputStream; } @@ -58,7 +59,7 @@ class SwRetrievedInputStreamDataManager {}; tData( std::weak_ptr< SwAsyncRetrieveInputStreamThreadConsumer > pThreadConsumer ) - : mpThreadConsumer( pThreadConsumer ), + : mpThreadConsumer(std::move( pThreadConsumer )), mbIsStreamReadOnly( false ) {}; }; diff --git a/sw/source/core/inc/retrieveinputstream.hxx b/sw/source/core/inc/retrieveinputstream.hxx index 5f8f3df3b9b9..b030ed0fc54d 100644 --- a/sw/source/core/inc/retrieveinputstream.hxx +++ b/sw/source/core/inc/retrieveinputstream.hxx @@ -43,8 +43,8 @@ class SwAsyncRetrieveInputStreamThread final : public ObservableThread virtual void threadFunction() override; SwAsyncRetrieveInputStreamThread( const SwRetrievedInputStreamDataManager::tDataKey nDataKey, - const OUString& rLinkedURL, - const OUString& rReferer ); + OUString aLinkedURL, + OUString aReferer ); const SwRetrievedInputStreamDataManager::tDataKey mnDataKey; const OUString mrLinkedURL; diff --git a/sw/source/core/inc/rolbck.hxx b/sw/source/core/inc/rolbck.hxx index d92328344d3b..1497da7e7b89 100644 --- a/sw/source/core/inc/rolbck.hxx +++ b/sw/source/core/inc/rolbck.hxx @@ -343,7 +343,7 @@ class SwHistoryChangeCharFormat final : public SwHistoryHint const OUString m_Format; public: - SwHistoryChangeCharFormat( const SfxItemSet& rSet, const OUString & sFormat); + SwHistoryChangeCharFormat( SfxItemSet aSet, OUString sFormat); virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet ) override; }; diff --git a/sw/source/core/inc/swblocks.hxx b/sw/source/core/inc/swblocks.hxx index 31f70945718b..38cede12f5fa 100644 --- a/sw/source/core/inc/swblocks.hxx +++ b/sw/source/core/inc/swblocks.hxx @@ -43,7 +43,7 @@ public: bool m_bIsOnlyText : 1; /// Unformatted text SwBlockName( const OUString& rShort, const OUString& rLong ); - SwBlockName( const OUString& rShort, const OUString& rLong, const OUString& rPackageName ); + SwBlockName( const OUString& rShort, const OUString& rLong, OUString aPackageName ); /// For sorting in the array bool operator< ( const SwBlockName& r ) const { return m_aShort < r.m_aShort; } diff --git a/sw/source/core/inc/swcache.hxx b/sw/source/core/inc/swcache.hxx index fba72413c829..f5a01643771a 100644 --- a/sw/source/core/inc/swcache.hxx +++ b/sw/source/core/inc/swcache.hxx @@ -87,7 +87,7 @@ public: // Only add sal_uInt8!!! #ifdef DBG_UTIL - SwCache( const sal_uInt16 nInitSize, const OString &rNm ); + SwCache( const sal_uInt16 nInitSize, OString aNm ); #else SwCache( const sal_uInt16 nInitSize ); #endif diff --git a/sw/source/core/inc/txmsrt.hxx b/sw/source/core/inc/txmsrt.hxx index fe8125942f0f..ff592655f445 100644 --- a/sw/source/core/inc/txmsrt.hxx +++ b/sw/source/core/inc/txmsrt.hxx @@ -24,6 +24,7 @@ #include <tox.hxx> #include <com/sun/star/lang/Locale.hpp> +#include <utility> class CharClass; class SwContentNode; @@ -63,9 +64,9 @@ struct TextAndReading TextAndReading() {} - TextAndReading(const OUString& rText, const OUString& rReading) - : sText(rText) - , sReading(rReading) + TextAndReading(OUString aText, OUString aReading) + : sText(std::move(aText)) + , sReading(std::move(aReading)) {} }; @@ -81,7 +82,7 @@ class SwTOXInternational public: SwTOXInternational( LanguageType nLang, SwTOIOptions nOptions, - const OUString& rSortAlgorithm ); + OUString aSortAlgorithm ); SwTOXInternational( const SwTOXInternational& ); ~SwTOXInternational(); @@ -208,7 +209,7 @@ private: struct SwTOXCustom final : public SwTOXSortTabBase { - SwTOXCustom( const TextAndReading& rKey, sal_uInt16 nLevel, + SwTOXCustom( TextAndReading aKey, sal_uInt16 nLevel, const SwTOXInternational& rIntl, const css::lang::Locale& rLocale ); @@ -243,7 +244,7 @@ struct SwTOXPara final : public SwTOXSortTabBase { SwTOXPara(SwContentNode&, SwTOXElement, sal_uInt16 nLevel = FORM_ALPHA_DELIMITER, - const OUString& sSeqName = OUString()); + OUString sSeqName = OUString()); void SetStartIndex(sal_Int32 nSet) { nStartIndex = nSet; } void SetEndIndex(sal_Int32 nSet) { nEndIndex = nSet; } diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx index 9109e949bd80..b0c2771d1d2e 100644 --- a/sw/source/core/inc/txtfrm.hxx +++ b/sw/source/core/inc/txtfrm.hxx @@ -25,6 +25,7 @@ #include <nodeoffset.hxx> #include <set> +#include <utility> namespace com::sun::star::linguistic2 { class XHyphenatedWord; } @@ -972,10 +973,10 @@ struct MergedPara /// mainly for sanity checks SwTextNode const* pLastNode; MergedPara(SwTextFrame & rFrame, std::vector<Extent>&& rExtents, - OUString const& rText, + OUString aText, SwTextNode *const pProps, SwTextNode *const pFirst, SwTextNode const*const pLast) - : listener(rFrame), extents(std::move(rExtents)), mergedText(rText) + : listener(rFrame), extents(std::move(rExtents)), mergedText(std::move(aText)) , pParaPropsNode(pProps), pFirstNode(pFirst), pLastNode(pLast) { assert(pParaPropsNode); diff --git a/sw/source/core/inc/undoflystrattr.hxx b/sw/source/core/inc/undoflystrattr.hxx index 5032c26c14b6..069c0aca5f12 100644 --- a/sw/source/core/inc/undoflystrattr.hxx +++ b/sw/source/core/inc/undoflystrattr.hxx @@ -29,8 +29,8 @@ class SwUndoFlyStrAttr final : public SwUndo public: SwUndoFlyStrAttr( SwFlyFrameFormat& rFlyFrameFormat, const SwUndoId eUndoId, - const OUString& sOldStr, - const OUString& sNewStr ); + OUString sOldStr, + OUString sNewStr ); virtual ~SwUndoFlyStrAttr() override; virtual void UndoImpl( ::sw::UndoRedoContext & ) override; diff --git a/sw/source/core/inc/unoflatpara.hxx b/sw/source/core/inc/unoflatpara.hxx index 4c53f7fd63aa..6523609a6a5c 100644 --- a/sw/source/core/inc/unoflatpara.hxx +++ b/sw/source/core/inc/unoflatpara.hxx @@ -49,7 +49,7 @@ class SwXFlatParagraph final : public SwXFlatParagraph_Base { public: - SwXFlatParagraph( SwTextNode& rTextNode, const OUString& aExpandText, const ModelToViewHelper& rConversionMap ); + SwXFlatParagraph( SwTextNode& rTextNode, OUString aExpandText, const ModelToViewHelper& rConversionMap ); virtual ~SwXFlatParagraph() override; // XPropertySet diff --git a/sw/source/core/inc/unoport.hxx b/sw/source/core/inc/unoport.hxx index da718a05032b..d0d9b5b64176 100644 --- a/sw/source/core/inc/unoport.hxx +++ b/sw/source/core/inc/unoport.hxx @@ -152,13 +152,13 @@ protected: virtual void Notify(const SfxHint& rHint) override; public: - SwXTextPortion(const SwUnoCursor* pPortionCursor, css::uno::Reference< css::text::XText > const& rParent, SwTextPortionType eType ); - SwXTextPortion(const SwUnoCursor* pPortionCursor, css::uno::Reference< css::text::XText > const& rParent, SwFrameFormat& rFormat ); + SwXTextPortion(const SwUnoCursor* pPortionCursor, css::uno::Reference< css::text::XText > xParent, SwTextPortionType eType ); + SwXTextPortion(const SwUnoCursor* pPortionCursor, css::uno::Reference< css::text::XText > xParent, SwFrameFormat& rFormat ); // for Ruby SwXTextPortion(const SwUnoCursor* pPortionCursor, SwTextRuby const& rAttr, - css::uno::Reference< css::text::XText > const& xParent, + css::uno::Reference< css::text::XText > xParent, bool bIsEnd ); //XTextRange diff --git a/sw/source/core/inc/wrong.hxx b/sw/source/core/inc/wrong.hxx index b05fe074ce71..df658cbfa50e 100644 --- a/sw/source/core/inc/wrong.hxx +++ b/sw/source/core/inc/wrong.hxx @@ -74,13 +74,13 @@ public: Color mColor; WrongAreaLineType mLineType; - SwWrongArea( const OUString& rType, + SwWrongArea( OUString aType, WrongListType listType, css::uno::Reference< css::container::XStringKeyMap > const & xPropertyBag, sal_Int32 nPos, sal_Int32 nLen); - SwWrongArea( const OUString& rType, + SwWrongArea( OUString aType, css::uno::Reference< css::container::XStringKeyMap > const & xPropertyBag, sal_Int32 nPos, sal_Int32 nLen, diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 35e79908546a..1c9fde902730 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <utility> #include <vcl/lazydelete.hxx> #include <sfx2/docfile.hxx> #include <sfx2/printer.hxx> @@ -4689,7 +4690,7 @@ namespace drawinglayer::primitive2d public: /// constructor SwBorderRectanglePrimitive2D( - const basegfx::B2DHomMatrix& rB2DHomMatrix, + basegfx::B2DHomMatrix aB2DHomMatrix, const svx::frame::Style& rStyleTop, const svx::frame::Style& rStyleRight, const svx::frame::Style& rStyleBottom, @@ -4866,12 +4867,12 @@ namespace drawinglayer::primitive2d } SwBorderRectanglePrimitive2D::SwBorderRectanglePrimitive2D( - const basegfx::B2DHomMatrix& rB2DHomMatrix, + basegfx::B2DHomMatrix aB2DHomMatrix, const svx::frame::Style& rStyleTop, const svx::frame::Style& rStyleRight, const svx::frame::Style& rStyleBottom, const svx::frame::Style& rStyleLeft) - : maB2DHomMatrix(rB2DHomMatrix), + : maB2DHomMatrix(std::move(aB2DHomMatrix)), maStyleTop(rStyleTop), maStyleRight(rStyleRight), maStyleBottom(rStyleBottom), diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index 8e0187470146..4a86c6f425e2 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -31,6 +31,7 @@ #include <tools/globname.hxx> #include <sfx2/linkmgr.hxx> #include <unotools/configitem.hxx> +#include <utility> #include <vcl/outdev.hxx> #include <fmtanchr.hxx> #include <frmfmt.hxx> @@ -695,8 +696,8 @@ private: std::shared_ptr<comphelper::ThreadTaskTag> mpTag; public: - explicit DeflateData(const uno::Reference< frame::XModel >& rXModel) - : maXModel(rXModel), + explicit DeflateData(uno::Reference< frame::XModel > xXModel) + : maXModel(std::move(xXModel)), mbKilled(false), mpTag( comphelper::ThreadPool::createThreadTaskTag() ) { diff --git a/sw/source/core/swg/swblocks.cxx b/sw/source/core/swg/swblocks.cxx index e805cf096c0a..1707c43d02ea 100644 --- a/sw/source/core/swg/swblocks.cxx +++ b/sw/source/core/swg/swblocks.cxx @@ -29,6 +29,7 @@ #include <shellio.hxx> #include <swblocks.hxx> #include <SwXMLTextBlocks.hxx> +#include <utility> #include <swerror.h> @@ -55,8 +56,8 @@ SwBlockName::SwBlockName( const OUString& rShort, const OUString& rLong ) m_nHashL = SwImpBlocks::Hash( rLong ); } -SwBlockName::SwBlockName( const OUString& rShort, const OUString& rLong, const OUString& rPackageName) - : m_aShort( rShort ), m_aLong( rLong ), m_aPackageName (rPackageName), +SwBlockName::SwBlockName( const OUString& rShort, const OUString& rLong, OUString aPackageName) + : m_aShort( rShort ), m_aLong( rLong ), m_aPackageName (std::move(aPackageName)), m_bIsOnlyTextFlagInit( false ), m_bIsOnlyText( false ) { m_nHashS = SwImpBlocks::Hash( rShort ); diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx index e0e75780cdb7..accc179aa67d 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -21,6 +21,7 @@ #include <com/sun/star/i18n/ScriptType.hpp> #include <com/sun/star/i18n/XBreakIterator.hpp> +#include <utility> #include <vcl/graph.hxx> #include <editeng/brushitem.hxx> #include <vcl/metric.hxx> @@ -72,8 +73,8 @@ void SwFieldPortion::TakeNextOffset( const SwFieldPortion* pField ) m_bFollow = true; } -SwFieldPortion::SwFieldPortion(const OUString &rExpand, std::unique_ptr<SwFont> pFont, bool bPlaceHold, TextFrameIndex const nFieldLen) - : m_aExpand(rExpand), m_pFont(std::move(pFont)), m_nNextOffset(0) +SwFieldPortion::SwFieldPortion(OUString aExpand, std::unique_ptr<SwFont> pFont, bool bPlaceHold, TextFrameIndex const nFieldLen) + : m_aExpand(std::move(aExpand)), m_pFont(std::move(pFont)), m_nNextOffset(0) , m_nNextScriptChg(COMPLETE_STRING), m_nFieldLen(nFieldLen), m_nViewWidth(0) , m_bFollow( false ), m_bLeft( false), m_bHide( false) , m_bCenter (false), m_bHasFollow( false ) diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx index 45a2027b4e74..cbdee76b548c 100644 --- a/sw/source/core/text/porfld.hxx +++ b/sw/source/core/text/porfld.hxx @@ -60,7 +60,7 @@ protected: public: SwFieldPortion( const SwFieldPortion& rField ); - SwFieldPortion(const OUString &rExpand, std::unique_ptr<SwFont> pFnt = nullptr, bool bPlaceHolder = false, TextFrameIndex nLen = TextFrameIndex(1)); + SwFieldPortion(OUString aExpand, std::unique_ptr<SwFont> pFnt = nullptr, bool bPlaceHolder = false, TextFrameIndex nLen = TextFrameIndex(1)); virtual ~SwFieldPortion() override; sal_uInt16 m_nAttrFieldType; diff --git a/sw/source/core/text/porftn.hxx b/sw/source/core/text/porftn.hxx index a5ecda64d072..925a04f7793b 100644 --- a/sw/source/core/text/porftn.hxx +++ b/sw/source/core/text/porftn.hxx @@ -68,7 +68,7 @@ class SwQuoVadisPortion : public SwFieldPortion { OUString m_aErgo; public: - SwQuoVadisPortion( const OUString &rExp, const OUString& rStr ); + SwQuoVadisPortion( const OUString &rExp, OUString aStr ); virtual bool Format( SwTextFormatInfo &rInf ) override; virtual void Paint( const SwTextPaintInfo &rInf ) const override; virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const override; diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx index 64d0f0418286..c86c1bc4ab0d 100644 --- a/sw/source/core/text/txtftn.cxx +++ b/sw/source/core/text/txtftn.cxx @@ -21,6 +21,7 @@ #include <string_view> +#include <utility> #include <viewsh.hxx> #include <doc.hxx> #include <IDocumentLayoutAccess.hxx> @@ -1442,8 +1443,8 @@ SwFieldPortion *SwQuoVadisPortion::Clone( const OUString &rExpand ) const return new SwQuoVadisPortion( rExpand, m_aErgo ); } -SwQuoVadisPortion::SwQuoVadisPortion( const OUString &rExp, const OUString& rStr ) - : SwFieldPortion( rExp ), m_aErgo(rStr) +SwQuoVadisPortion::SwQuoVadisPortion( const OUString &rExp, OUString aStr ) + : SwFieldPortion( rExp ), m_aErgo(std::move(aStr)) { SetLen(TextFrameIndex(0)); SetWhichPor( PortionType::QuoVadis ); diff --git a/sw/source/core/text/wrong.cxx b/sw/source/core/text/wrong.cxx index 6240716c2968..00be8d5fac4f 100644 --- a/sw/source/core/text/wrong.cxx +++ b/sw/source/core/text/wrong.cxx @@ -22,25 +22,26 @@ #include <SwGrammarMarkUp.hxx> #include <ndtxt.hxx> #include <txtfrm.hxx> +#include <utility> #include <osl/diagnose.h> -SwWrongArea::SwWrongArea( const OUString& rType, WrongListType listType, +SwWrongArea::SwWrongArea( OUString aType, WrongListType listType, css::uno::Reference< css::container::XStringKeyMap > const & xPropertyBag, sal_Int32 nPos, sal_Int32 nLen) -: maType(rType), mxPropertyBag(xPropertyBag), mnPos(nPos), mnLen(nLen), mpSubList(nullptr) +: maType(std::move(aType)), mxPropertyBag(xPropertyBag), mnPos(nPos), mnLen(nLen), mpSubList(nullptr) { mColor = getWrongAreaColor(listType, xPropertyBag); mLineType = getWrongAreaLineType(listType, xPropertyBag); } -SwWrongArea::SwWrongArea( const OUString& rType, +SwWrongArea::SwWrongArea( OUString aType, css::uno::Reference< css::container::XStringKeyMap > const & xPropertyBag, sal_Int32 nPos, sal_Int32 nLen, SwWrongList* pSubList) -: maType(rType), mxPropertyBag(xPropertyBag), mnPos(nPos), mnLen(nLen), mpSubList(pSubList), mLineType(WRONGAREA_NONE) +: maType(std::move(aType)), mxPropertyBag(xPropertyBag), mnPos(nPos), mnLen(nLen), mpSubList(pSubList), mLineType(WRONGAREA_NONE) { if (pSubList != nullptr) { diff --git a/sw/source/core/tox/ToxTextGenerator.cxx b/sw/source/core/tox/ToxTextGenerator.cxx index 8a92bbf1762f..97ca39666391 100644 --- a/sw/source/core/tox/ToxTextGenerator.cxx +++ b/sw/source/core/tox/ToxTextGenerator.cxx @@ -46,6 +46,7 @@ #include <cassert> #include <memory> +#include <utility> namespace { diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx index df70997cab75..ee91b1ad6ae6 100644 --- a/sw/source/core/tox/tox.cxx +++ b/sw/source/core/tox/tox.cxx @@ -41,6 +41,7 @@ #include <algorithm> #include <string_view> +#include <utility> const sal_Unicode C_NUM_REPL = '@'; diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx index e197e18267f8..5205b580aaeb 100644 --- a/sw/source/core/tox/txmsrt.cxx +++ b/sw/source/core/tox/txmsrt.cxx @@ -47,6 +47,7 @@ #include <strings.hrc> #include <reffld.hxx> #include <docsh.hxx> +#include <utility> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -55,9 +56,9 @@ using namespace ::com::sun::star::uno; SwTOIOptions SwTOXSortTabBase::nOpt = SwTOIOptions::NONE; SwTOXInternational::SwTOXInternational( LanguageType nLang, SwTOIOptions nOpt, - const OUString& rSortAlgorithm ) : + OUString aSortAlgorithm ) : m_eLang( nLang ), - m_sSortAlgorithm(rSortAlgorithm), + m_sSortAlgorithm(std::move(aSortAlgorithm)), m_nOptions( nOpt ) { Init(); @@ -441,12 +442,12 @@ sal_uInt16 SwTOXIndex::GetLevel() const } // Key and separator -SwTOXCustom::SwTOXCustom(const TextAndReading& rKey, +SwTOXCustom::SwTOXCustom(TextAndReading aKey, sal_uInt16 nLevel, const SwTOXInternational& rIntl, const lang::Locale& rLocale ) : SwTOXSortTabBase( TOX_SORT_CUSTOM, nullptr, nullptr, &rIntl, &rLocale ), - m_aKey(rKey), nLev(nLevel) + m_aKey(std::move(aKey)), nLev(nLevel) { } @@ -530,13 +531,13 @@ sal_uInt16 SwTOXContent::GetLevel() const // TOX assembled from paragraphs // Watch out for OLE/graphics when sorting! // The position must not come from the document, but from the "anchor"! -SwTOXPara::SwTOXPara(SwContentNode& rNd, SwTOXElement eT, sal_uInt16 nLevel, const OUString& sSeqName) +SwTOXPara::SwTOXPara(SwContentNode& rNd, SwTOXElement eT, sal_uInt16 nLevel, OUString sSeqName) : SwTOXSortTabBase( TOX_SORT_PARA, &rNd, nullptr, nullptr ), eType( eT ), m_nLevel(nLevel), nStartIndex(0), nEndIndex(-1), - m_sSequenceName( sSeqName ) + m_sSequenceName(std::move( sSeqName )) { // tdf#123313 create any missing bookmarks *before* generating ToX nodes! switch (eType) diff --git a/sw/source/core/txtnode/atrref.cxx b/sw/source/core/txtnode/atrref.cxx index 2c82e1403503..51f913c49236 100644 --- a/sw/source/core/txtnode/atrref.cxx +++ b/sw/source/core/txtnode/atrref.cxx @@ -23,6 +23,7 @@ #include <hints.hxx> #include <txtrfmrk.hxx> #include <unorefmark.hxx> +#include <utility> SwFormatRefMark::~SwFormatRefMark( ) { diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx index 900a4ea3b036..a18231ef56bd 100644 --- a/sw/source/core/txtnode/fmtatr2.cxx +++ b/sw/source/core/txtnode/fmtatr2.cxx @@ -50,6 +50,7 @@ #include <osl/diagnose.h> #include <algorithm> +#include <utility> using namespace ::com::sun::star; diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index 2e524e116921..e03e517ff46f 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -20,6 +20,7 @@ #include <config_wasm_strip.h> #include <hintids.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <svl/itemiter.hxx> #include <svl/languageoptions.hxx> diff --git a/sw/source/core/undo/SwUndoField.cxx b/sw/source/core/undo/SwUndoField.cxx index ca9456057dbd..f7c23e3cbe30 100644 --- a/sw/source/core/undo/SwUndoField.cxx +++ b/sw/source/core/undo/SwUndoField.cxx @@ -28,6 +28,7 @@ #include <fmtfld.hxx> #include <docsh.hxx> #include <pam.hxx> +#include <utility> #include <osl/diagnose.h> using namespace ::com::sun::star::uno; diff --git a/sw/source/core/undo/SwUndoFmt.cxx b/sw/source/core/undo/SwUndoFmt.cxx index 110f138f5f3b..3493ad56f31e 100644 --- a/sw/source/core/undo/SwUndoFmt.cxx +++ b/sw/source/core/undo/SwUndoFmt.cxx @@ -27,6 +27,7 @@ #include <fmtcol.hxx> #include <doc.hxx> #include <strings.hrc> +#include <utility> SwUndoFormatCreate::SwUndoFormatCreate (SwUndoId nUndoId, SwFormat * _pNew, SwFormat const * _pDerivedFrom, SwDoc& rDoc) @@ -144,11 +145,11 @@ SwRewriter SwUndoFormatDelete::GetRewriter() const } SwUndoRenameFormat::SwUndoRenameFormat(SwUndoId nUndoId, - const OUString & _sOldName, - const OUString & _sNewName, + OUString _sOldName, + OUString _sNewName, SwDoc& rDoc) - : SwUndo(nUndoId, &rDoc), m_sOldName(_sOldName), - m_sNewName(_sNewName), m_rDoc(rDoc) + : SwUndo(nUndoId, &rDoc), m_sOldName(std::move(_sOldName)), + m_sNewName(std::move(_sNewName)), m_rDoc(rDoc) { } @@ -434,10 +435,10 @@ SwRewriter SwUndoNumruleDelete::GetRewriter() const return aResult; } -SwUndoNumruleRename::SwUndoNumruleRename(const OUString & _aOldName, - const OUString & _aNewName, +SwUndoNumruleRename::SwUndoNumruleRename(OUString _aOldName, + OUString _aNewName, SwDoc& rDoc) - : SwUndo(SwUndoId::NUMRULE_RENAME, &rDoc), m_aOldName(_aOldName), m_aNewName(_aNewName), + : SwUndo(SwUndoId::NUMRULE_RENAME, &rDoc), m_aOldName(std::move(_aOldName)), m_aNewName(std::move(_aNewName)), m_rDoc(rDoc) { } diff --git a/sw/source/core/undo/docundo.cxx b/sw/source/core/undo/docundo.cxx index 07998e9404ef..c474dd679214 100644 --- a/sw/source/core/undo/docundo.cxx +++ b/sw/source/core/undo/docundo.cxx @@ -23,6 +23,7 @@ #include <doc.hxx> #include <docsh.hxx> +#include <utility> #include <view.hxx> #include <drawdoc.hxx> #include <ndarr.hxx> @@ -51,14 +52,14 @@ using namespace ::com::sun::star; namespace sw { -UndoManager::UndoManager(std::shared_ptr<SwNodes> const & xUndoNodes, +UndoManager::UndoManager(std::shared_ptr<SwNodes> xUndoNodes, IDocumentDrawModelAccess & rDrawModelAccess, IDocumentRedlineAccess & rRedlineAccess, IDocumentState & rState) : m_rDrawModelAccess(rDrawModelAccess) , m_rRedlineAccess(rRedlineAccess) , m_rState(rState) - , m_xUndoNodes(xUndoNodes) + , m_xUndoNodes(std::move(xUndoNodes)) , m_bGroupUndo(true) , m_bDrawUndo(true) , m_bRepair(false) diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx index 69ac6d1571cd..ae537a16926f 100644 --- a/sw/source/core/undo/rolbck.cxx +++ b/sw/source/core/undo/rolbck.cxx @@ -58,6 +58,7 @@ #include <bookmark.hxx> #include <frameformats.hxx> #include <memory> +#include <utility> OUString SwHistoryHint::GetDescription() const { @@ -1003,10 +1004,10 @@ void SwHistoryChangeFlyChain::SetInDoc( SwDoc* pDoc, bool ) } // -> #i27615# -SwHistoryChangeCharFormat::SwHistoryChangeCharFormat(const SfxItemSet & rSet, - const OUString & sFormat) +SwHistoryChangeCharFormat::SwHistoryChangeCharFormat(SfxItemSet aSet, + OUString sFormat) : SwHistoryHint(HSTRY_CHGCHARFMT) - , m_OldSet(rSet), m_Format(sFormat) + , m_OldSet(std::move(aSet)), m_Format(std::move(sFormat)) { } diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx index 9d4660336745..ce05b7e1c341 100644 --- a/sw/source/core/undo/unattr.cxx +++ b/sw/source/core/undo/unattr.cxx @@ -672,10 +672,10 @@ SwUndoAttr::SwUndoAttr( const SwPaM& rRange, const SfxPoolItem& rAttr, } } -SwUndoAttr::SwUndoAttr( const SwPaM& rRange, const SfxItemSet& rSet, +SwUndoAttr::SwUndoAttr( const SwPaM& rRange, SfxItemSet aSet, const SetAttrMode nFlags ) : SwUndo( SwUndoId::INSATTR, &rRange.GetDoc() ), SwUndRng( rRange ) - , m_AttrSet( rSet ) + , m_AttrSet(std::move( aSet )) , m_pHistory( new SwHistory ) , m_nNodeIndex( NODE_OFFSET_MAX ) , m_nInsertFlags( nFlags ) @@ -935,11 +935,11 @@ void SwUndoMoveLeftMargin::RepeatImpl(::sw::RepeatContext & rContext) } SwUndoChangeFootNote::SwUndoChangeFootNote( - const SwPaM& rRange, const OUString& rText, + const SwPaM& rRange, OUString aText, bool const bIsEndNote) : SwUndo( SwUndoId::CHGFTN, &rRange.GetDoc() ), SwUndRng( rRange ) , m_pHistory( new SwHistory() ) - , m_Text( rText ) + , m_Text(std::move( aText )) , m_bEndNote( bIsEndNote ) { } diff --git a/sw/source/core/undo/unbkmk.cxx b/sw/source/core/undo/unbkmk.cxx index f7d55c2d2c88..8288453307a4 100644 --- a/sw/source/core/undo/unbkmk.cxx +++ b/sw/source/core/undo/unbkmk.cxx @@ -33,6 +33,7 @@ #include <rolbck.hxx> #include <SwRewriter.hxx> +#include <utility> SwUndoBookmark::SwUndoBookmark( SwUndoId nUndoId, const ::sw::mark::IMark& rBkmk ) @@ -104,10 +105,10 @@ void SwUndoDeleteBookmark::RedoImpl(::sw::UndoRedoContext & rContext) ResetInDoc( rContext.GetDoc() ); } -SwUndoRenameBookmark::SwUndoRenameBookmark( const OUString& rOldName, const OUString& rNewName, const SwDoc& rDoc ) +SwUndoRenameBookmark::SwUndoRenameBookmark( OUString aOldName, OUString aNewName, const SwDoc& rDoc ) : SwUndo( SwUndoId::BOOKMARK_RENAME, &rDoc ) - , m_sOldName( rOldName ) - , m_sNewName( rNewName ) + , m_sOldName(std::move( aOldName )) + , m_sNewName(std::move( aNewName )) { } diff --git a/sw/source/core/undo/undoflystrattr.cxx b/sw/source/core/undo/undoflystrattr.cxx index 1a811ad21716..89c9467958ae 100644 --- a/sw/source/core/undo/undoflystrattr.cxx +++ b/sw/source/core/undo/undoflystrattr.cxx @@ -19,16 +19,17 @@ #include <undoflystrattr.hxx> #include <frmfmt.hxx> +#include <utility> SwUndoFlyStrAttr::SwUndoFlyStrAttr( SwFlyFrameFormat& rFlyFrameFormat, const SwUndoId eUndoId, - const OUString& sOldStr, - const OUString& sNewStr ) + OUString sOldStr, + OUString sNewStr ) : SwUndo( eUndoId, rFlyFrameFormat.GetDoc() ), mrFlyFrameFormat( rFlyFrameFormat ), - msOldStr( sOldStr ), - msNewStr( sNewStr ) + msOldStr(std::move( sOldStr )), + msNewStr(std::move( sNewStr )) { assert(eUndoId == SwUndoId::FLYFRMFMT_TITLE || eUndoId == SwUndoId::FLYFRMFMT_DESCRIPTION); diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx index e923db1f2fe9..0247bfdab876 100644 --- a/sw/source/core/undo/unins.cxx +++ b/sw/source/core/undo/unins.cxx @@ -52,6 +52,7 @@ #include <acorrect.hxx> #include <strings.hrc> +#include <utility> using namespace ::com::sun::star; @@ -492,7 +493,7 @@ class SwUndoReplace::Impl std::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoEnd; public: - Impl(SwPaM const& rPam, OUString const& rIns, bool const bRegExp); + Impl(SwPaM const& rPam, OUString aIns, bool const bRegExp); void UndoImpl( ::sw::UndoRedoContext & ); void RedoImpl( ::sw::UndoRedoContext & ); @@ -578,8 +579,8 @@ void SwUndoReplace::SetEnd(SwPaM const& rPam) } SwUndoReplace::Impl::Impl( - SwPaM const& rPam, OUString const& rIns, bool const bRegExp) - : m_sIns( rIns ) + SwPaM const& rPam, OUString aIns, bool const bRegExp) + : m_sIns(std::move( aIns )) , m_nOffset( 0 ) , m_bRegExp(bRegExp) { @@ -837,19 +838,19 @@ void SwUndoReRead::SaveGraphicData( const SwGrfNode& rGrfNd ) } SwUndoInsertLabel::SwUndoInsertLabel( const SwLabelType eTyp, - const OUString &rText, - const OUString& rSeparator, - const OUString& rNumberSeparator, + OUString aText, + OUString aSeparator, + OUString aNumberSeparator, const bool bBef, const sal_uInt16 nInitId, - const OUString& rCharacterStyle, + OUString aCharacterStyle, const bool bCpyBorder, const SwDoc* pDoc ) : SwUndo( SwUndoId::INSERTLABEL, pDoc ), - m_sText( rText ), - m_sSeparator( rSeparator ), - m_sNumberSeparator( rNumberSeparator ),//#i61007# order of captions - m_sCharacterStyle( rCharacterStyle ), + m_sText(std::move( aText )), + m_sSeparator(std::move( aSeparator )), + m_sNumberSeparator(std::move( aNumberSeparator )),//#i61007# order of captions + m_sCharacterStyle(std::move( aCharacterStyle )), m_nFieldId( nInitId ), m_eType( eTyp ), m_nLayerId( 0 ), diff --git a/sw/source/core/undo/unnum.cxx b/sw/source/core/undo/unnum.cxx index 2cb0a306c8b2..dafd89fee788 100644 --- a/sw/source/core/undo/unnum.cxx +++ b/sw/source/core/undo/unnum.cxx @@ -24,6 +24,7 @@ #include <ndtxt.hxx> #include <UndoCore.hxx> #include <rolbck.hxx> +#include <utility> #include <osl/diagnose.h> SwUndoInsNum::SwUndoInsNum( const SwNumRule& rOldRule, @@ -44,10 +45,10 @@ SwUndoInsNum::SwUndoInsNum( const SwPaM& rPam, const SwNumRule& rRule ) } SwUndoInsNum::SwUndoInsNum( const SwPosition& rPos, const SwNumRule& rRule, - const OUString& rReplaceRule ) + OUString aReplaceRule ) : SwUndo( SwUndoId::INSNUM, &rPos.GetNode().GetDoc() ), m_aNumRule( rRule ), - m_sReplaceRule( rReplaceRule ), m_nLRSavePos( 0 ) + m_sReplaceRule(std::move( aReplaceRule )), m_nLRSavePos( 0 ) { // No selection! m_nEndNode = SwNodeOffset(0); diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx index 81fe4c70ac38..a4d959e1837e 100644 --- a/sw/source/core/undo/unovwr.cxx +++ b/sw/source/core/undo/unovwr.cxx @@ -34,6 +34,7 @@ #include <acorrect.hxx> #include <docary.hxx> #include <strings.hrc> +#include <utility> using namespace ::com::sun::star; using namespace ::com::sun::star::i18n; @@ -330,8 +331,8 @@ struct UndoTransliterate_Data SwNodeOffset nNdIdx; sal_Int32 nStart, nLen; - UndoTransliterate_Data( SwNodeOffset nNd, sal_Int32 nStt, sal_Int32 nStrLen, const OUString& rText ) - : sText( rText ), + UndoTransliterate_Data( SwNodeOffset nNd, sal_Int32 nStt, sal_Int32 nStrLen, OUString aText ) + : sText(std::move( aText )), nNdIdx( nNd ), nStart( nStt ), nLen( nStrLen ) {} diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index 477ed55200c5..7e96d8fe04bb 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -3103,9 +3103,9 @@ void CheckTable( const SwTable& rTable ) } #endif -SwUndoTableStyleMake::SwUndoTableStyleMake(const OUString& rName, const SwDoc& rDoc) +SwUndoTableStyleMake::SwUndoTableStyleMake(OUString aName, const SwDoc& rDoc) : SwUndo(SwUndoId::TBLSTYLE_CREATE, &rDoc), - m_sName(rName) + m_sName(std::move(aName)) { } SwUndoTableStyleMake::~SwUndoTableStyleMake() diff --git a/sw/source/core/unocore/unocontentcontrol.cxx b/sw/source/core/unocore/unocontentcontrol.cxx index 4bbc3e242e98..be9974617566 100644 --- a/sw/source/core/unocore/unocontentcontrol.cxx +++ b/sw/source/core/unocore/unocontentcontrol.cxx @@ -37,6 +37,7 @@ #include <unoport.hxx> #include <unomap.hxx> #include <unoprnms.hxx> +#include <utility> using namespace com::sun::star; @@ -174,12 +175,11 @@ public: OUString m_aColor; Impl(SwXContentControl& rThis, SwDoc& rDoc, SwContentControl* pContentControl, - const uno::Reference<text::XText>& xParentText, - std::unique_ptr<const TextRangeList_t> pPortions) + uno::Reference<text::XText> xParentText, std::unique_ptr<const TextRangeList_t> pPortions) : m_pTextPortions(std::move(pPortions)) , m_bIsDisposed(false) , m_bIsDescriptor(pContentControl == nullptr) - , m_xParentText(xParentText) + , m_xParentText(std::move(xParentText)) , m_xText(new SwXContentControlText(rDoc, rThis)) , m_pContentControl(pContentControl) , m_bShowingPlaceHolder(false) diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx index 5d628d680540..a417e4384182 100644 --- a/sw/source/core/unocore/unoflatpara.cxx +++ b/sw/source/core/unocore/unoflatpara.cxx @@ -22,6 +22,7 @@ #include <unoflatpara.hxx> #include <o3tl/safeint.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <com/sun/star/text/TextMarkupType.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> @@ -64,9 +65,9 @@ CreateFlatParagraphIterator(SwDoc & rDoc, sal_Int32 const nTextMarkupType, } -SwXFlatParagraph::SwXFlatParagraph( SwTextNode& rTextNode, const OUString& aExpandText, const ModelToViewHelper& rMap ) +SwXFlatParagraph::SwXFlatParagraph( SwTextNode& rTextNode, OUString aExpandText, const ModelToViewHelper& rMap ) : SwXFlatParagraph_Base(& rTextNode, rMap) - , maExpandText(aExpandText) + , maExpandText(std::move(aExpandText)) { } diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index 34b594a0d1d7..c8092e713abf 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -57,6 +57,7 @@ #include <unocontentcontrol.hxx> #include <unotext.hxx> #include <com/sun/star/text/TextMarkupType.hpp> +#include <utility> #include <vcl/svapp.hxx> #include <unotools/syslocale.hxx> #include <i18nlangtag/languagetag.hxx> diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 4980208bb1ca..ea529a09b1f1 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -24,6 +24,7 @@ #include <o3tl/safeint.hxx> #include <svl/listener.hxx> #include <svx/svdobj.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <anchoredobject.hxx> @@ -376,11 +377,11 @@ struct SwXParagraphEnumerationImpl final : public SwXParagraphEnumeration sw::UnoCursorPointer m_pCursor; SwXParagraphEnumerationImpl( - uno::Reference< text::XText > const& xParent, + uno::Reference< text::XText > xParent, const std::shared_ptr<SwUnoCursor>& pCursor, const CursorType eType, SwStartNode const*const pStartNode, SwTable const*const pTable) - : m_xParentText( xParent ) + : m_xParentText(std::move( xParent )) , m_eCursorType( eType ) // remember table and start node for later travelling // (used in export of tables in tables) @@ -674,11 +675,11 @@ public: Impl(SwDoc& rDoc, const enum RangePosition eRange, SwFrameFormat* const pTableOrSectionFormat, - const uno::Reference<text::XText>& xParent = nullptr) + uno::Reference<text::XText> xParent = nullptr) : m_rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_CURSOR)) , m_eRangePosition(eRange) , m_rDoc(rDoc) - , m_xParentText(xParent) + , m_xParentText(std::move(xParent)) , m_pTableOrSectionFormat(pTableOrSectionFormat) , m_pMark(nullptr) { diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index 45ef0e53165e..8e60a7cb394c 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -37,6 +37,7 @@ #include <unocrsrhelper.hxx> #include <doc.hxx> #include <ndtxt.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <docsh.hxx> #include <swunohelper.hxx> @@ -125,14 +126,14 @@ public: SwTextNode* m_pTextNode; Impl(SwXParagraph& rThis, - SwTextNode* const pTextNode = nullptr, uno::Reference<text::XText> const& xParent = nullptr, + SwTextNode* const pTextNode = nullptr, uno::Reference<text::XText> xParent = nullptr, const sal_Int32 nSelStart = -1, const sal_Int32 nSelEnd = -1) : m_rThis(rThis) , m_rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_PARAGRAPH)) , m_bIsDescriptor(nullptr == pTextNode) , m_nSelectionStartPos(nSelStart) , m_nSelectionEndPos(nSelEnd) - , m_xParentText(xParent) + , m_xParentText(std::move(xParent)) , m_pTextNode(pTextNode) { m_pTextNode && StartListening(m_pTextNode->GetNotifier()); diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx index dea28ee3a9a7..a10da8a9c35f 100644 --- a/sw/source/core/unocore/unoport.cxx +++ b/sw/source/core/unocore/unoport.cxx @@ -21,6 +21,7 @@ #include <cmdid.h> #include <cppuhelper/exc_hlp.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <svl/itemprop.hxx> #include <tools/diagnose_ex.h> @@ -61,14 +62,14 @@ void SwXTextPortion::init(const SwUnoCursor* pPortionCursor) SwXTextPortion::SwXTextPortion( const SwUnoCursor* pPortionCursor, - uno::Reference< text::XText > const& rParent, + uno::Reference< text::XText > xParent, SwTextPortionType eType) : m_pPropSet(aSwMapProvider.GetPropertySet( (PORTION_REDLINE_START == eType || PORTION_REDLINE_END == eType) ? PROPERTY_MAP_REDLINE_PORTION : PROPERTY_MAP_TEXTPORTION_EXTENSIONS)) - , m_xParentText(rParent) + , m_xParentText(std::move(xParent)) , m_pFrameFormat(nullptr) , m_ePortionType(eType) , m_bIsCollapsed(false) @@ -78,11 +79,11 @@ SwXTextPortion::SwXTextPortion( SwXTextPortion::SwXTextPortion( const SwUnoCursor* pPortionCursor, - uno::Reference< text::XText > const& rParent, + uno::Reference< text::XText > xParent, SwFrameFormat& rFormat ) : m_pPropSet(aSwMapProvider.GetPropertySet( PROPERTY_MAP_TEXTPORTION_EXTENSIONS)) - , m_xParentText(rParent) + , m_xParentText(std::move(xParent)) , m_pFrameFormat(&rFormat) , m_ePortionType(PORTION_FRAME) , m_bIsCollapsed(false) @@ -94,11 +95,11 @@ SwXTextPortion::SwXTextPortion( SwXTextPortion::SwXTextPortion( const SwUnoCursor* pPortionCursor, SwTextRuby const& rAttr, - uno::Reference< text::XText > const& xParent, + uno::Reference< text::XText > xParent, bool bIsEnd ) : m_pPropSet(aSwMapProvider.GetPropertySet( PROPERTY_MAP_TEXTPORTION_EXTENSIONS)) - , m_xParentText(xParent) + , m_xParentText(std::move(xParent)) , m_pRubyText ( bIsEnd ? nullptr : new uno::Any ) , m_pRubyStyle ( bIsEnd ? nullptr : new uno::Any ) , m_pRubyAdjust ( bIsEnd ? nullptr : new uno::Any ) diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index f8e2df566283..44b152d8c7fc 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -92,11 +92,11 @@ namespace BkmType nBkmType; const SwPosition aPosition; - SwXBookmarkPortion_Impl(uno::Reference<text::XTextContent> const& xMark, - const BkmType nType, SwPosition const& rPosition) - : xBookmark ( xMark ) + SwXBookmarkPortion_Impl(uno::Reference<text::XTextContent> xMark, + const BkmType nType, SwPosition _aPosition) + : xBookmark (std::move( xMark )) , nBkmType ( nType ) - , aPosition ( rPosition ) + , aPosition (std::move( _aPosition )) { } sal_Int32 getIndex () const @@ -207,10 +207,10 @@ namespace const SwPosition maPosition; SwAnnotationStartPortion_Impl( - uno::Reference< text::XTextField > const& xAnnotationField, - SwPosition const& rPosition) - : mxAnnotationField ( xAnnotationField ) - , maPosition ( rPosition ) + uno::Reference< text::XTextField > xAnnotationField, + SwPosition aPosition) + : mxAnnotationField (std::move( xAnnotationField )) + , maPosition (std::move( aPosition )) { } diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index 39c9b15162d6..8b2e570b1f37 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -618,12 +618,12 @@ public: Impl(SwXMeta& rThis, SwDoc& rDoc, ::sw::Meta* const pMeta, - uno::Reference<text::XText> const& xParentText, + uno::Reference<text::XText> xParentText, std::unique_ptr<TextRangeList_t const> pPortions) : m_pTextPortions(std::move(pPortions)) , m_bIsDisposed(false) , m_bIsDescriptor(nullptr == pMeta) - , m_xParentText(xParentText) + , m_xParentText(std::move(xParentText)) , m_xText(new SwXMetaText(rDoc, rThis)) , m_pMeta(pMeta) { diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index c2ca14ae1c84..5929d632ab3a 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -23,6 +23,7 @@ #include <o3tl/string_view.hxx> #include <comphelper/propertysequence.hxx> #include <hintids.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <svl/hint.hxx> #include <svtools/ctrltool.hxx> @@ -145,16 +146,16 @@ class SwStyleProperties_Impl; GetCountOrName_t m_fGetCountOrName; CreateStyle_t m_fCreateStyle; TranslateIndex_t m_fTranslateIndex; - StyleFamilyEntry(SfxStyleFamily eFamily, sal_uInt16 nPropMapType, SwGetPoolIdFromName aPoolId, OUString const& sName, TranslateId pResId, GetCountOrName_t const & fGetCountOrName, CreateStyle_t const & fCreateStyle, TranslateIndex_t const & fTranslateIndex) + StyleFamilyEntry(SfxStyleFamily eFamily, sal_uInt16 nPropMapType, SwGetPoolIdFromName aPoolId, OUString sName, TranslateId pResId, GetCountOrName_t fGetCountOrName, CreateStyle_t fCreateStyle, TranslateIndex_t fTranslateIndex) : m_eFamily(eFamily) , m_nPropMapType(nPropMapType) , m_xPSInfo(aSwMapProvider.GetPropertySet(nPropMapType)->getPropertySetInfo()) , m_aPoolId(aPoolId) - , m_sName(sName) + , m_sName(std::move(sName)) , m_pResId(pResId) - , m_fGetCountOrName(fGetCountOrName) - , m_fCreateStyle(fCreateStyle) - , m_fTranslateIndex(fTranslateIndex) + , m_fGetCountOrName(std::move(fGetCountOrName)) + , m_fCreateStyle(std::move(fCreateStyle)) + , m_fTranslateIndex(std::move(fTranslateIndex)) { } }; const std::vector<StyleFamilyEntry>* our_pStyleFamilyEntries; @@ -1485,11 +1486,11 @@ private: OUString m_rStyleName; const SwAttrSet* m_pParentStyle; public: - SwStyleBase_Impl(SwDoc& rSwDoc, const OUString& rName, const SwAttrSet* pParentStyle) + SwStyleBase_Impl(SwDoc& rSwDoc, OUString aName, const SwAttrSet* pParentStyle) : m_rDoc(rSwDoc) , m_pOldPageDesc(nullptr) , m_pItemSet(nullptr) - , m_rStyleName(rName) + , m_rStyleName(std::move(aName)) , m_pParentStyle(pParentStyle) { } diff --git a/sw/source/core/unocore/unotextmarkup.cxx b/sw/source/core/unocore/unotextmarkup.cxx index d77e9c0ff758..8160da91a8ae 100644 --- a/sw/source/core/unocore/unotextmarkup.cxx +++ b/sw/source/core/unocore/unotextmarkup.cxx @@ -23,6 +23,7 @@ #include <o3tl/safeint.hxx> #include <osl/diagnose.h> #include <svl/listener.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <SwSmartTagMgr.hxx> #include <com/sun/star/lang/IndexOutOfBoundsException.hpp> @@ -52,9 +53,9 @@ struct SwXTextMarkup::Impl SwTextNode* m_pTextNode; ModelToViewHelper const m_ConversionMap; - Impl(SwTextNode* const pTextNode, const ModelToViewHelper& rMap) + Impl(SwTextNode* const pTextNode, ModelToViewHelper aMap) : m_pTextNode(pTextNode) - , m_ConversionMap(rMap) + , m_ConversionMap(std::move(aMap)) { if(m_pTextNode) StartListening(pTextNode->GetNotifier()); diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx index b00ad5b1fdff..545eb4ed0779 100644 --- a/sw/source/filter/basflt/fltshell.cxx +++ b/sw/source/filter/basflt/fltshell.cxx @@ -47,6 +47,7 @@ #include <bookmark.hxx> #include <fltshell.hxx> #include <rdfhelper.hxx> +#include <utility> using namespace com::sun::star; @@ -924,12 +925,12 @@ SwFltRedline* SwFltRedline::Clone( SfxItemPool* ) const } // methods of SwFltBookmark follow -SwFltBookmark::SwFltBookmark( const OUString& rNa, const OUString& rVa, +SwFltBookmark::SwFltBookmark( const OUString& rNa, OUString aVa, tools::Long nHand, const bool bIsTOCBookmark ) : SfxPoolItem( RES_FLTR_BOOKMARK ) , mnHandle( nHand ) , maName( rNa ) - , maVal( rVa ) + , maVal(std::move( aVa )) , mbIsTOCBookmark( bIsTOCBookmark ) { // eSrc: CHARSET_DONTKNOW for no transform at operator << diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx index 87d71d4b0e4f..bf47344ae59e 100644 --- a/sw/source/filter/basflt/shellio.cxx +++ b/sw/source/filter/basflt/shellio.cxx @@ -63,6 +63,7 @@ #include <swerror.h> #include <pausethreadstarting.hxx> #include <frameformats.hxx> +#include <utility> using namespace ::com::sun::star; diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx index b7d5283fc4ed..a7b775c1dc86 100644 --- a/sw/source/filter/html/htmlctxt.cxx +++ b/sw/source/filter/html/htmlctxt.cxx @@ -40,6 +40,7 @@ #include "swhtml.hxx" #include <memory> +#include <utility> using namespace ::com::sun::star; @@ -116,9 +117,9 @@ HTMLAttrContext_SaveDoc *HTMLAttrContext::GetSaveDocContext( bool bCreate ) return m_pSaveDocContext.get(); } -HTMLAttrContext::HTMLAttrContext( HtmlTokenId nTokn, sal_uInt16 nPoolId, const OUString& rClass, +HTMLAttrContext::HTMLAttrContext( HtmlTokenId nTokn, sal_uInt16 nPoolId, OUString aClass, bool bDfltColl ) : - m_aClass( rClass ), + m_aClass(std::move( aClass )), m_nToken( nTokn ), m_nTextFormatColl( nPoolId ), m_nLeftMargin( 0 ), diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index e4ea32230b79..952c36289ed1 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -24,6 +24,7 @@ #include <hintids.hxx> #include <comphelper/documentinfo.hxx> #include <comphelper/string.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <tools/UnitConversion.hxx> @@ -382,7 +383,7 @@ class SwHTMLImageWatcher : void clear(); public: - SwHTMLImageWatcher( const uno::Reference< drawing::XShape > & rShape, + SwHTMLImageWatcher( uno::Reference< drawing::XShape > xShape, bool bWidth, bool bHeight ); // startProduction can not be called in the constructor because it can @@ -416,9 +417,9 @@ public: } SwHTMLImageWatcher::SwHTMLImageWatcher( - const uno::Reference< drawing::XShape >& rShape, + uno::Reference< drawing::XShape > xShape, bool bWidth, bool bHeight ) : - m_xShape( rShape ), + m_xShape(std::move( xShape )), m_bSetWidth( bWidth ), m_bSetHeight( bHeight ) { // Remember the source of the image diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx index 72c9e351a67e..51d2a62198a5 100644 --- a/sw/source/filter/html/htmlforw.cxx +++ b/sw/source/filter/html/htmlforw.cxx @@ -31,6 +31,7 @@ #include <hintids.hxx> #include <o3tl/any.hxx> #include <rtl/math.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <svl/macitem.hxx> #include <svtools/htmlout.hxx> @@ -1343,9 +1344,9 @@ void SwHTMLWriter::GetControls() } HTMLControl::HTMLControl( - const uno::Reference< container::XIndexContainer > & rFormComps, + uno::Reference< container::XIndexContainer > _xFormComps, SwNodeOffset nIdx ) : - xFormComps( rFormComps ), nNdIdx( nIdx ), nCount( 1 ) + xFormComps(std::move( _xFormComps )), nNdIdx( nIdx ), nCount( 1 ) {} HTMLControl::~HTMLControl() diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index 74f956cc3c79..000e0b8081cb 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -20,6 +20,7 @@ #include <memory> #include <hintids.hxx> #include <comphelper/flagguard.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <editeng/boxitem.hxx> #include <editeng/brushitem.hxx> @@ -191,7 +192,7 @@ class HTMLTableCnts public: explicit HTMLTableCnts(const SwStartNode* pStNd); - explicit HTMLTableCnts(const std::shared_ptr<HTMLTable>& rTab); + explicit HTMLTableCnts(std::shared_ptr<HTMLTable> xTab); ~HTMLTableCnts(); // only allowed in ~HTMLTableCell @@ -649,9 +650,9 @@ HTMLTableCnts::HTMLTableCnts(const SwStartNode* pStNd) InitCtor(); } -HTMLTableCnts::HTMLTableCnts(const std::shared_ptr<HTMLTable>& rTab) +HTMLTableCnts::HTMLTableCnts(std::shared_ptr<HTMLTable> xTab) : m_pStartNode(nullptr) - , m_xTable(rTab) + , m_xTable(std::move(xTab)) { InitCtor(); } @@ -4480,8 +4481,8 @@ public: std::shared_ptr<HTMLAttrTable> m_xAttrTab; // attributes - CaptionSaveStruct( SwHTMLParser& rParser, const SwPosition& rPos ) : - SectionSaveStruct( rParser ), m_aSavePos( rPos ), + CaptionSaveStruct( SwHTMLParser& rParser, SwPosition aPos ) : + SectionSaveStruct( rParser ), m_aSavePos(std::move( aPos )), m_xAttrTab(std::make_shared<HTMLAttrTable>()) { rParser.SaveAttrTab(m_xAttrTab); @@ -4693,8 +4694,8 @@ class TableSaveStruct : public SwPendingData public: std::shared_ptr<HTMLTable> m_xCurrentTable; - explicit TableSaveStruct(const std::shared_ptr<HTMLTable>& rCurTable) - : m_xCurrentTable(rCurTable) + explicit TableSaveStruct(std::shared_ptr<HTMLTable> xCurTable) + : m_xCurrentTable(std::move(xCurTable)) { } diff --git a/sw/source/filter/html/parcss1.hxx b/sw/source/filter/html/parcss1.hxx index 355ef2cf2097..3ab9638741e9 100644 --- a/sw/source/filter/html/parcss1.hxx +++ b/sw/source/filter/html/parcss1.hxx @@ -24,6 +24,7 @@ #include <tools/color.hxx> #include <memory> +#include <utility> // tokens of the CSS1 parser enum CSS1Token @@ -95,8 +96,8 @@ class CSS1Selector CSS1Selector *m_pNext; // the following component public: - CSS1Selector( CSS1SelectorType eTyp, const OUString &rSel ) - : m_eType(eTyp), m_aSelector( rSel ), m_pNext( nullptr ) + CSS1Selector( CSS1SelectorType eTyp, OUString aSel ) + : m_eType(eTyp), m_aSelector(std::move( aSel )), m_pNext( nullptr ) {} ~CSS1Selector(); @@ -124,9 +125,9 @@ struct CSS1Expression CSS1Expression *pNext; // the following component public: - CSS1Expression( CSS1Token eTyp, const OUString &rVal, + CSS1Expression( CSS1Token eTyp, OUString aVal, double nVal, sal_Unicode cO = 0 ) - : cOp(cO), eType(eTyp), aValue(rVal), nValue(nVal), pNext(nullptr) + : cOp(cO), eType(eTyp), aValue(std::move(aVal)), nValue(nVal), pNext(nullptr) {} ~CSS1Expression(); diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx index 7edbfbb7bf10..c241690761c9 100644 --- a/sw/source/filter/html/svxcss1.cxx +++ b/sw/source/filter/html/svxcss1.cxx @@ -52,6 +52,7 @@ #include <editeng/widwitem.hxx> #include <editeng/frmdiritem.hxx> #include <editeng/orphitem.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <sal/log.hxx> #include <osl/diagnose.h> @@ -661,9 +662,9 @@ void SvxCSS1PropertyInfo::SetBoxItem( SfxItemSet& rItemSet, DestroyBorderInfos(); } -SvxCSS1MapEntry::SvxCSS1MapEntry( const SfxItemSet& rItemSet, +SvxCSS1MapEntry::SvxCSS1MapEntry( SfxItemSet aItemSet, const SvxCSS1PropertyInfo& rProp ) : - m_aItemSet( rItemSet ), + m_aItemSet(std::move( aItemSet )), m_aPropInfo( rProp ) {} @@ -694,9 +695,9 @@ void SvxCSS1Parser::SelectorParsed( std::unique_ptr<CSS1Selector> pSelector, boo m_Selectors.push_back(std::move(pSelector)); } -SvxCSS1Parser::SvxCSS1Parser( SfxItemPool& rPool, const OUString& rBaseURL, +SvxCSS1Parser::SvxCSS1Parser( SfxItemPool& rPool, OUString aBaseURL, sal_uInt16 const *pWhichIds, sal_uInt16 nWhichIds ) : - m_sBaseURL( rBaseURL ), + m_sBaseURL(std::move( aBaseURL )), m_pItemSet(nullptr), m_pPropInfo( nullptr ), m_eDefaultEnc( RTL_TEXTENCODING_DONTKNOW ), diff --git a/sw/source/filter/html/svxcss1.hxx b/sw/source/filter/html/svxcss1.hxx index f4b7c38fffe1..0ca92f314ea9 100644 --- a/sw/source/filter/html/svxcss1.hxx +++ b/sw/source/filter/html/svxcss1.hxx @@ -167,7 +167,7 @@ class SvxCSS1MapEntry SvxCSS1PropertyInfo m_aPropInfo; public: - SvxCSS1MapEntry( const SfxItemSet& rItemSet, + SvxCSS1MapEntry( SfxItemSet aItemSet, const SvxCSS1PropertyInfo& rProp ); const SfxItemSet& GetItemSet() const { return m_aItemSet; } @@ -239,7 +239,7 @@ protected: public: SvxCSS1Parser( SfxItemPool& rPool, - const OUString& rBaseURL, + OUString aBaseURL, sal_uInt16 const *pWhichIds, sal_uInt16 nWhichIds ); virtual ~SvxCSS1Parser() override; diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index a15d23317dab..126013a65415 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -36,6 +36,7 @@ #endif #include <hintids.hxx> +#include <utility> #include <vcl/errinf.hxx> #include <svl/stritem.hxx> #include <vcl/imap.hxx> @@ -252,15 +253,15 @@ ErrCode HTMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPam, co } SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn, - const OUString& rPath, - const OUString& rBaseURL, + OUString aPath, + OUString aBaseURL, bool bReadNewDoc, SfxMedium* pMed, bool bReadUTF8, bool bNoHTMLComments, const OUString& rNamespace ) : SfxHTMLParser( rIn, bReadNewDoc, pMed ), - m_aPathToFile( rPath ), - m_sBaseURL( rBaseURL ), + m_aPathToFile(std::move( aPath )), + m_sBaseURL(std::move( aBaseURL )), m_xAttrTab(std::make_shared<HTMLAttrTable>()), m_pNumRuleInfo( new SwHTMLNumRuleInfo ), m_xDoc( pD ), @@ -5441,7 +5442,7 @@ void SwHTMLParser::ParseMoreMetaOptions() } HTMLAttr::HTMLAttr( const SwPosition& rPos, const SfxPoolItem& rItem, - HTMLAttr **ppHd, const std::shared_ptr<HTMLAttrTable>& rAttrTab ) : + HTMLAttr **ppHd, std::shared_ptr<HTMLAttrTable> xAttrTab ) : m_nStartPara( rPos.nNode ), m_nEndPara( rPos.nNode ), m_nStartContent( rPos.GetContentIndex() ), @@ -5450,7 +5451,7 @@ HTMLAttr::HTMLAttr( const SwPosition& rPos, const SfxPoolItem& rItem, m_bLikePara( false ), m_bValid( true ), m_pItem( rItem.Clone() ), - m_xAttrTab( rAttrTab ), + m_xAttrTab(std::move( xAttrTab )), m_pNext( nullptr ), m_pPrev( nullptr ), m_ppHead( ppHd ) @@ -5458,7 +5459,7 @@ HTMLAttr::HTMLAttr( const SwPosition& rPos, const SfxPoolItem& rItem, } HTMLAttr::HTMLAttr( const HTMLAttr &rAttr, const SwNodeIndex &rEndPara, - sal_Int32 nEndCnt, HTMLAttr **ppHd, const std::shared_ptr<HTMLAttrTable>& rAttrTab ) : + sal_Int32 nEndCnt, HTMLAttr **ppHd, std::shared_ptr<HTMLAttrTable> xAttrTab ) : m_nStartPara( rAttr.m_nStartPara ), m_nEndPara( rEndPara ), m_nStartContent( rAttr.m_nStartContent ), @@ -5467,7 +5468,7 @@ HTMLAttr::HTMLAttr( const HTMLAttr &rAttr, const SwNodeIndex &rEndPara, m_bLikePara( rAttr.m_bLikePara ), m_bValid( rAttr.m_bValid ), m_pItem( rAttr.m_pItem->Clone() ), - m_xAttrTab( rAttrTab ), + m_xAttrTab(std::move( xAttrTab )), m_pNext( nullptr ), m_pPrev( nullptr ), m_ppHead( ppHd ) diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx index 7e25f4f0ef0a..da215233e2af 100644 --- a/sw/source/filter/html/swhtml.hxx +++ b/sw/source/filter/html/swhtml.hxx @@ -35,6 +35,7 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <memory> +#include <utility> #include <vector> #include <deque> #include <stack> @@ -143,10 +144,10 @@ class HTMLAttr HTMLAttr **m_ppHead; // list head HTMLAttr( const SwPosition& rPos, const SfxPoolItem& rItem, - HTMLAttr **pHd, const std::shared_ptr<HTMLAttrTable>& rAttrTab ); + HTMLAttr **pHd, std::shared_ptr<HTMLAttrTable> xAttrTab ); HTMLAttr( const HTMLAttr &rAttr, const SwNodeIndex &rEndPara, - sal_Int32 nEndCnt, HTMLAttr **pHd, const std::shared_ptr<HTMLAttrTable>& rAttrTab ); + sal_Int32 nEndCnt, HTMLAttr **pHd, std::shared_ptr<HTMLAttrTable> xAttrTab ); public: @@ -240,7 +241,7 @@ class HTMLAttrContext public: void ClearSaveDocContext(); - HTMLAttrContext( HtmlTokenId nTokn, sal_uInt16 nPoolId, const OUString& rClass, + HTMLAttrContext( HtmlTokenId nTokn, sal_uInt16 nPoolId, OUString aClass, bool bDfltColl=false ); explicit HTMLAttrContext( HtmlTokenId nTokn ); ~HTMLAttrContext(); @@ -916,8 +917,8 @@ protected: public: SwHTMLParser( SwDoc* pD, SwPaM & rCursor, SvStream& rIn, - const OUString& rFileName, - const OUString& rBaseURL, + OUString aFileName, + OUString aBaseURL, bool bReadNewDoc, SfxMedium* pMed, bool bReadUTF8, bool bIgnoreHTMLComments, @@ -1030,8 +1031,8 @@ struct SwHTMLTextFootnote { OUString sName; SwTextFootnote* pTextFootnote; - SwHTMLTextFootnote(const OUString &rName, SwTextFootnote* pInTextFootnote) - : sName(rName) + SwHTMLTextFootnote(OUString rName, SwTextFootnote* pInTextFootnote) + : sName(std::move(rName)) , pTextFootnote(pInTextFootnote) { } diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx index 5db3c3c2849a..44fc97572342 100644 --- a/sw/source/filter/html/wrthtml.hxx +++ b/sw/source/filter/html/wrthtml.hxx @@ -194,7 +194,7 @@ struct HTMLControl SwNodeOffset nNdIdx; // the node in which it's anchored sal_Int32 nCount; // how many controls are on the node - HTMLControl( const css::uno::Reference<css::container::XIndexContainer>& rForm, SwNodeOffset nIdx ); + HTMLControl( css::uno::Reference<css::container::XIndexContainer> xForm, SwNodeOffset nIdx ); ~HTMLControl(); // operators for the sort array diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx index e4041d2da09a..2d3661e84b64 100644 --- a/sw/source/filter/inc/fltshell.hxx +++ b/sw/source/filter/inc/fltshell.hxx @@ -222,7 +222,7 @@ private: public: SwFltBookmark( const OUString& rNa, - const OUString& rVa, + OUString aVa, tools::Long nHand, const bool bIsTOCBookmark = false ); diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx index 35ac50057786..a7740970347d 100644 --- a/sw/source/filter/ww8/attributeoutputbase.hxx +++ b/sw/source/filter/ww8/attributeoutputbase.hxx @@ -31,6 +31,7 @@ #include <com/sun/star/drawing/TextVerticalAdjust.hpp> #include <swtypes.hxx> #include <fldbas.hxx> +#include <utility> class Point; class SvxCaseMapItem; @@ -652,8 +653,8 @@ protected: virtual void SectionRtlGutter(const SfxBoolItem& rRtlGutter) = 0; public: - AttributeOutputBase(const OUString& sBaseURL) - : m_sBaseURL(sBaseURL) + AttributeOutputBase(OUString sBaseURL) + : m_sBaseURL(std::move(sBaseURL)) { } virtual ~AttributeOutputBase() {} diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx index c3abd77a18b3..3b5f44ae1a7e 100644 --- a/sw/source/filter/ww8/writerhelper.cxx +++ b/sw/source/filter/ww8/writerhelper.cxx @@ -50,6 +50,7 @@ #include "types.hxx" #include <svtools/embedhlp.hxx> #include <numrule.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <IDocumentDrawModelAccess.hxx> #include <IDocumentLayoutAccess.hxx> @@ -146,9 +147,9 @@ namespace namespace ww8 { //For i120928,size conversion before exporting graphic of bullet - Frame::Frame(const Graphic &rGrf, const SwPosition &rPos) + Frame::Frame(const Graphic &rGrf, SwPosition aPos) : mpFlyFrame(nullptr) - , maPos(rPos) + , maPos(std::move(aPos)) , meWriterType(eBulletGrf) , mpStartFrameContent(nullptr) , mbIsInline(true) @@ -169,9 +170,9 @@ namespace ww8 maLayoutSize = maSize; } - Frame::Frame(const SwFrameFormat &rFormat, const SwPosition &rPos) + Frame::Frame(const SwFrameFormat &rFormat, SwPosition aPos) : mpFlyFrame(&rFormat) - , maPos(rPos) + , maPos(std::move(aPos)) , meWriterType(eTextBox) , mpStartFrameContent(nullptr) // #i43447# - move to initialization list diff --git a/sw/source/filter/ww8/writerhelper.hxx b/sw/source/filter/ww8/writerhelper.hxx index 12b949184baa..632d1cb3a639 100644 --- a/sw/source/filter/ww8/writerhelper.hxx +++ b/sw/source/filter/ww8/writerhelper.hxx @@ -100,8 +100,8 @@ namespace ww8 bool mbForBullet:1; Graphic maGrf; public: - Frame(const SwFrameFormat &rFlyFrame, const SwPosition &rPos); - Frame(const Graphic&, const SwPosition &); + Frame(const SwFrameFormat &rFlyFrame, SwPosition aPos); + Frame(const Graphic&, SwPosition ); /** Get the writer SwFrameFormat that this object describes diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index 0a4e8d93925c..52b864d57728 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -39,6 +39,7 @@ #include <calbck.hxx> #include <IDocumentRedlineAccess.hxx> +#include <utility> #include <vcl/graph.hxx> #include <optional> @@ -350,9 +351,9 @@ public: unsigned int mnHdFtIndex; // 0 for main text, +1 for each subsequent // msword hd/ft - DrawObj(const ww8::Frame &rContent, WW8_CP nCp, Point aParentPos, SvxFrameDirection nDir, + DrawObj(ww8::Frame rContent, WW8_CP nCp, Point aParentPos, SvxFrameDirection nDir, unsigned int nHdFtIndex) - : mnCp(nCp), mnShapeId(0), maContent(rContent), maParentPos(aParentPos), + : mnCp(nCp), mnShapeId(0), maContent(std::move(rContent)), maParentPos(aParentPos), mnThick(0), mnDirection(nDir), mnHdFtIndex(nHdFtIndex) {} void SetShapeDetails(sal_uInt32 nId, sal_Int32 nThick); }; @@ -1392,8 +1393,8 @@ public: sal_uInt16 mnWid; // Width of the graphics sal_uInt16 mnHei; // Height of the graphics - GraphicDetails(const ww8::Frame &rFly, sal_uInt16 nWid, sal_uInt16 nHei) - : maFly(rFly), mnPos(0), mnWid(nWid), mnHei(nHei) + GraphicDetails(ww8::Frame aFly, sal_uInt16 nWid, sal_uInt16 nHei) + : maFly(std::move(aFly)), mnPos(0), mnWid(nWid), mnHei(nHei) {} bool operator==(const GraphicDetails& rIn) const diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 141c5c3260a9..730c3171ae46 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -101,6 +101,7 @@ #include <memory> #include <optional> #include <filter/msfilter/escherex.hxx> +#include <utility> #include "sprmids.hxx" using ::editeng::SvxBorderLine; @@ -566,8 +567,8 @@ private: tools::Long mnStartPos; // 0x13 tools::Long mnEndPos; // 0x15 public: - explicit Chunk(tools::Long nStart, const OUString &rURL) - : msURL(rURL), mnStartPos(nStart), mnEndPos(0) {} + explicit Chunk(tools::Long nStart, OUString aURL) + : msURL(std::move(aURL)), mnStartPos(nStart), mnEndPos(0) {} void SetEndPos(tools::Long nEnd) { mnEndPos = nEnd; } tools::Long GetStartPos() const {return mnStartPos;} diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 1da871b4c9d1..d40ff1948480 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -96,6 +96,7 @@ #include <../../core/inc/DocumentRedlineManager.hxx> #include <docufld.hxx> #include <swfltopt.hxx> +#include <utility> #include <viewsh.hxx> #include <shellres.hxx> #include <swerror.h> @@ -4231,7 +4232,7 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType) } SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SotStorage* pStorage, - SvStream* pSt, SwDoc& rD, const OUString& rBaseURL, bool bNewDoc, bool bSkipImages, SwPosition const &rPos) + SvStream* pSt, SwDoc& rD, OUString aBaseURL, bool bNewDoc, bool bSkipImages, SwPosition const &rPos) : m_pDocShell(rD.GetDocShell()) , m_pStg(pStorage) , m_pStrm(pSt) @@ -4255,7 +4256,7 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SotStorage* pStorage, , m_pDrawModel(nullptr) , m_pDrawPg(nullptr) , m_pNumFieldType(nullptr) - , m_sBaseURL(rBaseURL) + , m_sBaseURL(std::move(aBaseURL)) , m_nIniFlags(0) , m_nIniFlags1(0) , m_nFieldFlags(0) diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index f6c6e2fd9548..68bd5861d38a 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -29,6 +29,7 @@ #include <svx/svdobj.hxx> +#include <utility> #include <vector> #include <stack> #include <string_view> @@ -648,11 +649,11 @@ protected: WW8FormulaControl& operator=(WW8FormulaControl const&) = delete; public: - WW8FormulaControl(const OUString& rN, SwWW8ImplReader &rRdr) + WW8FormulaControl(OUString aN, SwWW8ImplReader &rRdr) : mrRdr(rRdr), mfUnknown(0), mfDropdownIndex(0), mfToolTip(0), mfNoMark(0), mfType(0), mfUnused(0), mhpsCheckBox(20), mnChecked(0), mnMaxLen(0), - mbHelp(false), msName( rN ) + mbHelp(false), msName(std::move( aN )) { } sal_uInt8 mfUnknown:2; @@ -971,8 +972,8 @@ private: public: void SetUniqueGraphName(SwFrameFormat *pFrameFormat, std::u16string_view rFixedPart); - wwFrameNamer(bool bIsDisabled, const OUString &rSeed) - : msSeed(rSeed), mnImportedGraphicsCount(0), mbIsDisabled(bIsDisabled) + wwFrameNamer(bool bIsDisabled, OUString aSeed) + : msSeed(std::move(aSeed)), mnImportedGraphicsCount(0), mbIsDisabled(bIsDisabled) { } }; @@ -987,8 +988,8 @@ private: wwSectionNamer& operator=(const wwSectionNamer&) = delete; public: OUString UniqueName(); - wwSectionNamer(const SwDoc &rDoc, const OUString &rSeed) - : mrDoc(rDoc), msFileLinkSeed(rSeed), mnFileSectionNo(0) + wwSectionNamer(const SwDoc &rDoc, OUString aSeed) + : mrDoc(rDoc), msFileLinkSeed(std::move(aSeed)), mnFileSectionNo(0) { } }; @@ -1930,7 +1931,7 @@ public: // really private, but can only be done public static Color GetCol(sal_uInt8 nIco); SwWW8ImplReader( sal_uInt8 nVersionPara, SotStorage* pStorage, SvStream* pSt, - SwDoc& rD, const OUString& rBaseURL, bool bNewDoc, bool bSkipImages, SwPosition const &rPos ); + SwDoc& rD, OUString aBaseURL, bool bNewDoc, bool bSkipImages, SwPosition const &rPos ); const OUString& GetBaseURL() const { return m_sBaseURL; } // load a complete doc file diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx index f60d78f83810..067ebc41fb90 100644 --- a/sw/source/filter/xml/xmlimpit.cxx +++ b/sw/source/filter/xml/xmlimpit.cxx @@ -62,8 +62,8 @@ using uno::Any; constexpr sal_uInt16 nUnknownWhich = RES_UNKNOWNATR_CONTAINER; SvXMLImportItemMapper::SvXMLImportItemMapper( - SvXMLItemMapEntriesRef const & rMapEntries ) : - mrMapEntries( rMapEntries ) + SvXMLItemMapEntriesRef aMapEntries ) : + mrMapEntries(std::move( aMapEntries )) { } diff --git a/sw/source/filter/xml/xmlimpit.hxx b/sw/source/filter/xml/xmlimpit.hxx index 3973623515d7..c54b7b470591 100644 --- a/sw/source/filter/xml/xmlimpit.hxx +++ b/sw/source/filter/xml/xmlimpit.hxx @@ -35,7 +35,7 @@ protected: SvXMLItemMapEntriesRef mrMapEntries; public: - explicit SvXMLImportItemMapper( SvXMLItemMapEntriesRef const & rMapEntries ); + explicit SvXMLImportItemMapper( SvXMLItemMapEntriesRef aMapEntries ); virtual ~SvXMLImportItemMapper(); /** fills the given itemset with the attributes in the given list */ diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index beb61656223e..625d491785fd 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -33,6 +33,7 @@ #include <svl/zformat.hxx> #include <sax/tools/converter.hxx> #include <unotools/configmgr.hxx> +#include <utility> #include <xmloff/xmlnamespace.hxx> #include <xmloff/namespacemap.hxx> @@ -207,7 +208,7 @@ class SwXMLTableRow_Impl public: - SwXMLTableRow_Impl( const OUString& rStyleName, sal_uInt32 nCells, + SwXMLTableRow_Impl( OUString aStyleName, sal_uInt32 nCells, const OUString *pDfltCellStyleName = nullptr ); inline SwXMLTableCell_Impl *GetCell( sal_uInt32 nCol ); @@ -226,10 +227,10 @@ public: void Dispose(); }; -SwXMLTableRow_Impl::SwXMLTableRow_Impl( const OUString& rStyleName, +SwXMLTableRow_Impl::SwXMLTableRow_Impl( OUString aStyleName, sal_uInt32 nCells, const OUString *pDfltCellStyleName ) : - m_aStyleName( rStyleName ), + m_aStyleName(std::move( aStyleName )), m_bSplitable( false ) { if( pDfltCellStyleName ) @@ -1078,9 +1079,9 @@ public: sal_Int32 mnWidth; bool mbProtected; - TableBoxIndex( const OUString& rName, sal_Int32 nWidth, + TableBoxIndex( OUString aName, sal_Int32 nWidth, bool bProtected ) : - msName( rName ), + msName(std::move( aName )), mnWidth( nWidth ), mbProtected( bProtected ) { } diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx index c436e533e101..e6de5544ce8e 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.cxx +++ b/sw/source/ui/dbui/createaddresslistdialog.cxx @@ -26,6 +26,7 @@ #include "createaddresslistdialog.hxx" #include "customizeaddresslistdialog.hxx" #include <mmconfigitem.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <sfx2/filedlghelper.hxx> #include <sfx2/docfile.hxx> @@ -211,10 +212,10 @@ void SwAddressControl_Impl::SetCursorTo(std::size_t nElement) } SwCreateAddressListDialog::SwCreateAddressListDialog( - weld::Window* pParent, const OUString& rURL, SwMailMergeConfigItem const & rConfig) + weld::Window* pParent, OUString aURL, SwMailMergeConfigItem const & rConfig) : SfxDialogController(pParent, "modules/swriter/ui/createaddresslist.ui", "CreateAddressList") , m_sAddressListFilterName(SwResId(ST_FILTERNAME)) - , m_sURL(rURL) + , m_sURL(std::move(aURL)) , m_pCSVData(new SwCSVData) , m_xAddressControl(new SwAddressControl_Impl(*m_xBuilder)) , m_xNewPB(m_xBuilder->weld_button("NEW")) diff --git a/sw/source/ui/dbui/createaddresslistdialog.hxx b/sw/source/ui/dbui/createaddresslistdialog.hxx index d4f3e030bf74..693dffed393c 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.hxx +++ b/sw/source/ui/dbui/createaddresslistdialog.hxx @@ -68,7 +68,7 @@ class SwCreateAddressListDialog : public SfxDialogController void UpdateButtons(); public: - SwCreateAddressListDialog(weld::Window* pParent, const OUString& rURL, SwMailMergeConfigItem const & rConfig); + SwCreateAddressListDialog(weld::Window* pParent, OUString aURL, SwMailMergeConfigItem const & rConfig); virtual ~SwCreateAddressListDialog() override; const OUString& GetURL() const { return m_sURL; } diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index 74fbcb1a6172..151f74b949c8 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -40,6 +40,7 @@ #include <svl/numformat.hxx> #include <svl/stritem.hxx> #include <tools/diagnose_ex.h> +#include <utility> #include <vcl/mnemonic.hxx> #include <svl/style.hxx> #include <svl/zformat.hxx> @@ -172,10 +173,10 @@ bool SwInsDBColumn::operator<( const SwInsDBColumn& rCmp ) const SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView, Reference<XDataSource> const & xDataSource, Reference<sdbcx::XColumnsSupplier> const & xColSupp, - const SwDBData& rData ) + SwDBData aData ) : SfxDialogController(rView.GetWindow()->GetFrameWeld(), "modules/swriter/ui/insertdbcolumnsdialog.ui", "InsertDbColumnsDialog") , ConfigItem("Office.Writer/InsertData/DataSet", ConfigItemMode::NONE) - , aDBData(rData) + , aDBData(std::move(aData)) , sNoTmpl(SwResId(SW_STR_NONE)) , pView(&rView) , m_xRbAsTable(m_xBuilder->weld_radio_button("astable")) diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.cxx b/sw/source/ui/dbui/dbtablepreviewdialog.cxx index cd1556776da1..ec530f9e3ce6 100644 --- a/sw/source/ui/dbui/dbtablepreviewdialog.cxx +++ b/sw/source/ui/dbui/dbtablepreviewdialog.cxx @@ -23,6 +23,7 @@ #include <com/sun/star/lang/XEventListener.hpp> #include <com/sun/star/frame/Frame.hpp> #include <com/sun/star/frame/FrameSearchFlag.hpp> +#include <utility> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -43,8 +44,8 @@ private: } public: - DBTablePreviewFrame(const css::uno::Reference<css::frame::XFrame2>& rFrame) - : m_xFrame(rFrame) + DBTablePreviewFrame(css::uno::Reference<css::frame::XFrame2> xFrame) + : m_xFrame(std::move(xFrame)) { } diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx index 87116262facf..c98462dac378 100644 --- a/sw/source/ui/dbui/mailmergewizard.cxx +++ b/sw/source/ui/dbui/mailmergewizard.cxx @@ -26,6 +26,7 @@ #include <mmconfigitem.hxx> #include <swabstdlg.hxx> #include <strings.hrc> +#include <utility> #include <view.hxx> #include <helpids.h> @@ -33,11 +34,11 @@ using namespace svt; using namespace ::com::sun::star; -SwMailMergeWizard::SwMailMergeWizard(SwView& rView, std::shared_ptr<SwMailMergeConfigItem> const & rItem) +SwMailMergeWizard::SwMailMergeWizard(SwView& rView, std::shared_ptr<SwMailMergeConfigItem> xItem) : RoadmapWizardMachine(rView.GetFrameWeld()) , m_pSwView(&rView) , m_bDocumentLoad(false) - , m_xConfigItem(rItem) + , m_xConfigItem(std::move(xItem)) , m_sStarting(SwResId(ST_STARTING)) , m_sDocumentType(SwResId(ST_DOCUMENTTYPE)) , m_sAddressBlock(SwResId(ST_ADDRESSBLOCK)) diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index 04cc0a84d0e9..0b7bf9a30664 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -25,6 +25,7 @@ #include <o3tl/safeint.hxx> #include <svl/grabbagitem.hxx> #include <svl/itemset.hxx> +#include <utility> #include <vcl/event.hxx> #include <vcl/svapp.hxx> #include <vcl/weld.hxx> @@ -966,11 +967,11 @@ IMPL_LINK(SwAssignFieldsControl, GotFocusHdl_Impl, weld::Widget&, rBox, void) SwAssignFieldsDialog::SwAssignFieldsDialog( weld::Window* pParent, SwMailMergeConfigItem& rConfigItem, - const OUString& rPreview, + OUString aPreview, bool bIsAddressBlock) : SfxDialogController(pParent, "modules/swriter/ui/assignfieldsdialog.ui", "AssignFieldsDialog") , m_sNone(SwResId(SW_STR_NONE)) - , m_rPreviewString(rPreview) + , m_rPreviewString(std::move(aPreview)) , m_rConfigItem(rConfigItem) , m_xPreview(new SwAddressPreview(m_xBuilder->weld_scrolled_window("previewwin", true))) , m_xMatchingFI(m_xBuilder->weld_label("MATCHING_LABEL")) @@ -1536,7 +1537,7 @@ namespace public: DropTargetListener(css::uno::Reference<css::datatransfer::dnd::XDropTarget> xRealDropTarget, SwCustomizeAddressBlockDialog* pParentDialog) - : m_xRealDropTarget(xRealDropTarget) + : m_xRealDropTarget(std::move(xRealDropTarget)) , m_pParentDialog(pParentDialog) { } diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx index 65071c11d7a6..48bdbbb680f6 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.hxx +++ b/sw/source/ui/dbui/mmaddressblockpage.hxx @@ -271,7 +271,7 @@ class SwAssignFieldsDialog : public SfxDialogController public: SwAssignFieldsDialog(weld::Window* pParent, SwMailMergeConfigItem& rConfigItem, - const OUString& rPreview, + OUString aPreview, bool bIsAddressBlock); void ConnectSizeGroups(int nLabelWidth, int nComboBoxWidth, int nPreviewWidth); diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx index 62f8da5cfe86..be5faf3adada 100644 --- a/sw/source/ui/dbui/selectdbtabledialog.cxx +++ b/sw/source/ui/dbui/selectdbtabledialog.cxx @@ -31,6 +31,7 @@ #include <com/sun/star/sdbc/XDataSource.hpp> #include <strings.hrc> +#include <utility> using namespace ::com::sun::star; using namespace ::com::sun::star::sdbcx; @@ -41,9 +42,9 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::beans; SwSelectDBTableDialog::SwSelectDBTableDialog(weld::Window* pParent, - const uno::Reference<sdbc::XConnection>& rConnection) + uno::Reference<sdbc::XConnection> xConnection) : SfxDialogController(pParent, "modules/swriter/ui/selecttabledialog.ui", "SelectTableDialog") - , m_xConnection(rConnection) + , m_xConnection(std::move(xConnection)) , m_xTable(m_xBuilder->weld_tree_view("table")) , m_xPreviewPB(m_xBuilder->weld_button("preview")) { diff --git a/sw/source/ui/dbui/selectdbtabledialog.hxx b/sw/source/ui/dbui/selectdbtabledialog.hxx index 01c1edcc49fe..aa0bbddea8db 100644 --- a/sw/source/ui/dbui/selectdbtabledialog.hxx +++ b/sw/source/ui/dbui/selectdbtabledialog.hxx @@ -33,7 +33,7 @@ class SwSelectDBTableDialog : public SfxDialogController DECL_LINK(PreviewHdl, weld::Button&, void); public: SwSelectDBTableDialog(weld::Window* pParent, - const css::uno::Reference<css::sdbc::XConnection>& xConnection); + css::uno::Reference<css::sdbc::XConnection> xConnection); virtual ~SwSelectDBTableDialog() override; OUString GetSelectedTable(bool& bIsTable); diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index 5412539472dc..24b2017967ca 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -51,6 +51,7 @@ #include <swuicnttab.hxx> #include <swuiidxmrk.hxx> #include <tautofmt.hxx> +#include <utility> #include <wordcountdialog.hxx> #include <itabenum.hxx> #include <optional> @@ -493,7 +494,7 @@ protected: std::shared_ptr<weld::DialogController> m_xDlg; public: explicit AbstractInsTableDlg_Impl(std::shared_ptr<weld::DialogController> p) - : m_xDlg(p) + : m_xDlg(std::move(p)) { } virtual void GetValues( OUString& rName, sal_uInt16& rRow, sal_uInt16& rCol, diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx index a14b4ab99278..f5bc92104021 100644 --- a/sw/source/ui/frmdlg/cption.cxx +++ b/sw/source/ui/frmdlg/cption.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <utility> #include <view.hxx> #include <wrtsh.hxx> #include <cption.hxx> @@ -59,7 +60,7 @@ class SwSequenceOptionDialog : public weld::GenericDialogController std::unique_ptr<weld::ComboBox> m_xLbCaptionOrder; public: - SwSequenceOptionDialog(weld::Window *pParent, SwView &rV, const OUString& rSeqFieldType); + SwSequenceOptionDialog(weld::Window *pParent, SwView &rV, OUString aSeqFieldType); void Apply(); bool IsApplyBorderAndShadow() const { return m_xApplyBorderAndShadowCB->get_active(); } @@ -440,10 +441,10 @@ SwCaptionDialog::~SwCaptionDialog() { } -SwSequenceOptionDialog::SwSequenceOptionDialog(weld::Window *pParent, SwView &rV, const OUString& rSeqFieldType ) +SwSequenceOptionDialog::SwSequenceOptionDialog(weld::Window *pParent, SwView &rV, OUString aSeqFieldType ) : GenericDialogController(pParent, "modules/swriter/ui/captionoptions.ui", "CaptionOptionsDialog") , m_rView(rV) - , m_aFieldTypeName(rSeqFieldType) + , m_aFieldTypeName(std::move(aSeqFieldType)) , m_xLbLevel(m_xBuilder->weld_combo_box("level")) , m_xEdDelim(m_xBuilder->weld_entry("separator")) , m_xLbCharStyle(m_xBuilder->weld_combo_box("style")) diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index f4baaa48a463..37c5438d83b7 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -23,6 +23,7 @@ #include <o3tl/safeint.hxx> #include <sal/log.hxx> #include <svl/style.hxx> +#include <utility> #include <vcl/weld.hxx> #include <svl/stritem.hxx> #include <unotools/pathoptions.hxx> @@ -183,7 +184,7 @@ class SwAutoMarkDlg_Impl : public weld::GenericDialogController DECL_LINK(OkHdl, weld::Button&, void); public: - SwAutoMarkDlg_Impl(weld::Window* pParent, const OUString& rAutoMarkURL, + SwAutoMarkDlg_Impl(weld::Window* pParent, OUString aAutoMarkURL, bool bCreate); virtual ~SwAutoMarkDlg_Impl() override; }; @@ -3979,10 +3980,10 @@ bool SwEntryBrowseBox::IsModified()const return pController->IsValueChangedFromSaved(); } -SwAutoMarkDlg_Impl::SwAutoMarkDlg_Impl(weld::Window* pParent, const OUString& rAutoMarkURL, +SwAutoMarkDlg_Impl::SwAutoMarkDlg_Impl(weld::Window* pParent, OUString aAutoMarkURL, bool bCreate) : GenericDialogController(pParent, "modules/swriter/ui/createautomarkdialog.ui", "CreateAutomarkDialog") - , sAutoMarkURL(rAutoMarkURL) + , sAutoMarkURL(std::move(aAutoMarkURL)) , bCreateMode(bCreate) , m_xOKPB(m_xBuilder->weld_button("ok")) , m_xTable(m_xBuilder->weld_container("area")) diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index 442dbed88f8b..32a455a33a4c 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -31,6 +31,7 @@ #include <com/sun/star/uri/UriReferenceFactory.hpp> #include <rtl/ustrbuf.hxx> #include <i18nutil/searchopt.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <vcl/weld.hxx> #include <sfx2/dispatch.hxx> @@ -127,9 +128,9 @@ OUString MergeUrlAndPage(const OUString& rUrl, const std::unique_ptr<weld::SpinB } // dialog to insert a directory selection -SwIndexMarkPane::SwIndexMarkPane(const std::shared_ptr<weld::Dialog>& rDialog, weld::Builder& rBuilder, bool bNewDlg, +SwIndexMarkPane::SwIndexMarkPane(std::shared_ptr<weld::Dialog> xDialog, weld::Builder& rBuilder, bool bNewDlg, SwWrtShell* pWrtShell) - : m_xDialog(rDialog) + : m_xDialog(std::move(xDialog)) , m_bDel(false) , m_bNewMark(bNewDlg) , m_bSelected(false) diff --git a/sw/source/ui/vba/vbaaddin.cxx b/sw/source/ui/vba/vbaaddin.cxx index 226ecfe2f149..8fdfb0048008 100644 --- a/sw/source/ui/vba/vbaaddin.cxx +++ b/sw/source/ui/vba/vbaaddin.cxx @@ -19,12 +19,13 @@ #include "vbaaddin.hxx" #include <tools/urlobj.hxx> #include <osl/file.hxx> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; -SwVbaAddin::SwVbaAddin( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const OUString& rFileURL ) : - SwVbaAddin_BASE( rParent, rContext ), msFileURL( rFileURL ), mbInstalled( true ) +SwVbaAddin::SwVbaAddin( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, OUString aFileURL ) : + SwVbaAddin_BASE( rParent, rContext ), msFileURL(std::move( aFileURL )), mbInstalled( true ) { } diff --git a/sw/source/ui/vba/vbaaddin.hxx b/sw/source/ui/vba/vbaaddin.hxx index 6678dcdbddc3..f177e7935d35 100644 --- a/sw/source/ui/vba/vbaaddin.hxx +++ b/sw/source/ui/vba/vbaaddin.hxx @@ -33,8 +33,7 @@ private: public: /// @throws css::uno::RuntimeException SwVbaAddin(const css::uno::Reference<ooo::vba::XHelperInterface>& rParent, - const css::uno::Reference<css::uno::XComponentContext>& rContext, - const OUString& rFileURL); + const css::uno::Reference<css::uno::XComponentContext>& rContext, OUString aFileURL); virtual ~SwVbaAddin() override; // Attributes diff --git a/sw/source/ui/vba/vbaautotextentry.cxx b/sw/source/ui/vba/vbaautotextentry.cxx index 018c7dbf8930..dd1f17f16ff4 100644 --- a/sw/source/ui/vba/vbaautotextentry.cxx +++ b/sw/source/ui/vba/vbaautotextentry.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include "vbaautotextentry.hxx" +#include <utility> #include <vbahelper/vbahelper.hxx> #include <com/sun/star/text/XParagraphCursor.hpp> #include "wordvbahelper.hxx" @@ -25,8 +26,8 @@ using namespace ::ooo::vba; using namespace ::com::sun::star; -SwVbaAutoTextEntry::SwVbaAutoTextEntry( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XAutoTextEntry >& xEntry ) : - SwVbaAutoTextEntry_BASE( rParent, rContext ), mxEntry( xEntry ) +SwVbaAutoTextEntry::SwVbaAutoTextEntry( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, uno::Reference< text::XAutoTextEntry > xEntry ) : + SwVbaAutoTextEntry_BASE( rParent, rContext ), mxEntry(std::move( xEntry )) { } diff --git a/sw/source/ui/vba/vbaautotextentry.hxx b/sw/source/ui/vba/vbaautotextentry.hxx index 08d82b5d9220..9a8ab4ad1ddc 100644 --- a/sw/source/ui/vba/vbaautotextentry.hxx +++ b/sw/source/ui/vba/vbaautotextentry.hxx @@ -35,7 +35,7 @@ private: public: /// @throws css::uno::RuntimeException - SwVbaAutoTextEntry( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XAutoTextEntry >& xEntry ); + SwVbaAutoTextEntry( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, css::uno::Reference< css::text::XAutoTextEntry > xEntry ); virtual ~SwVbaAutoTextEntry() override; // XAutoTextEntry diff --git a/sw/source/ui/vba/vbabookmark.cxx b/sw/source/ui/vba/vbabookmark.cxx index e2a9c7b71116..aecc0760bc1f 100644 --- a/sw/source/ui/vba/vbabookmark.cxx +++ b/sw/source/ui/vba/vbabookmark.cxx @@ -22,14 +22,15 @@ #include <com/sun/star/text/XTextContent.hpp> #include <com/sun/star/text/XTextRange.hpp> #include <com/sun/star/view/XSelectionSupplier.hpp> +#include <utility> #include "vbarange.hxx" using namespace ::ooo::vba; using namespace ::com::sun::star; SwVbaBookmark::SwVbaBookmark( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, - const css::uno::Reference< frame::XModel >& rModel, const OUString& rBookmarkName ) : - SwVbaBookmark_BASE( rParent, rContext ), mxModel( rModel ), maBookmarkName( rBookmarkName ), mbValid( true ) + css::uno::Reference< frame::XModel > xModel, OUString aBookmarkName ) : + SwVbaBookmark_BASE( rParent, rContext ), mxModel(std::move( xModel )), maBookmarkName(std::move( aBookmarkName )), mbValid( true ) { uno::Reference< text::XBookmarksSupplier > xBookmarksSupplier( mxModel, uno::UNO_QUERY_THROW ); mxBookmark.set( xBookmarksSupplier->getBookmarks()->getByName( maBookmarkName ), uno::UNO_QUERY_THROW ); diff --git a/sw/source/ui/vba/vbabookmark.hxx b/sw/source/ui/vba/vbabookmark.hxx index 6bc123bb34f1..24524df618a9 100644 --- a/sw/source/ui/vba/vbabookmark.hxx +++ b/sw/source/ui/vba/vbabookmark.hxx @@ -41,7 +41,7 @@ public: /// @throws css::uno::RuntimeException SwVbaBookmark(const css::uno::Reference<ooo::vba::XHelperInterface>& rParent, const css::uno::Reference<css::uno::XComponentContext>& rContext, - const css::uno::Reference<css::frame::XModel>& rModel, const OUString& rName); + css::uno::Reference<css::frame::XModel> xModel, OUString aName); virtual ~SwVbaBookmark() override; // Methods diff --git a/sw/source/ui/vba/vbabookmarks.cxx b/sw/source/ui/vba/vbabookmarks.cxx index 018121291a06..997579521a8e 100644 --- a/sw/source/ui/vba/vbabookmarks.cxx +++ b/sw/source/ui/vba/vbabookmarks.cxx @@ -26,6 +26,7 @@ #include "vbarange.hxx" #include "wordvbahelper.hxx" #include <cppuhelper/implbase.hxx> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -37,7 +38,7 @@ class BookmarksEnumeration : public EnumerationHelperImpl uno::Reference< frame::XModel > mxModel; public: /// @throws uno::RuntimeException - BookmarksEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), mxModel( xModel ) {} + BookmarksEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, uno::Reference< frame::XModel > xModel ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), mxModel(std::move( xModel )) {} virtual uno::Any SAL_CALL nextElement( ) override { @@ -58,7 +59,7 @@ private: uno::Any cachePos; public: /// @throws uno::RuntimeException - explicit BookmarkCollectionHelper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) : mxIndexAccess( xIndexAccess ) + explicit BookmarkCollectionHelper( uno::Reference< container::XIndexAccess > xIndexAccess ) : mxIndexAccess(std::move( xIndexAccess )) { mxNameAccess.set( mxIndexAccess, uno::UNO_QUERY_THROW ); } @@ -111,7 +112,7 @@ public: } -SwVbaBookmarks::SwVbaBookmarks( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xBookmarks, const uno::Reference< frame::XModel >& xModel ): SwVbaBookmarks_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( new BookmarkCollectionHelper( xBookmarks ) ) ), mxModel( xModel ) +SwVbaBookmarks::SwVbaBookmarks( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xBookmarks, uno::Reference< frame::XModel > xModel ): SwVbaBookmarks_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( new BookmarkCollectionHelper( xBookmarks ) ) ), mxModel(std::move( xModel )) { mxBookmarksSupplier.set( mxModel, uno::UNO_QUERY_THROW ); uno::Reference< text::XTextDocument > xDocument( mxModel, uno::UNO_QUERY_THROW ); diff --git a/sw/source/ui/vba/vbabookmarks.hxx b/sw/source/ui/vba/vbabookmarks.hxx index 546679bbf3c0..1b264fb6b746 100644 --- a/sw/source/ui/vba/vbabookmarks.hxx +++ b/sw/source/ui/vba/vbabookmarks.hxx @@ -38,7 +38,7 @@ private: void removeBookmarkByName( const OUString& rName ); public: - SwVbaBookmarks( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xBookmarks, const css::uno::Reference< css::frame::XModel >& xModel ); + SwVbaBookmarks( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xBookmarks, css::uno::Reference< css::frame::XModel > xModel ); /// @throws css::uno::RuntimeException static void addBookmarkByName( const css::uno::Reference< css::frame::XModel >& xModel, const OUString& rName, const css::uno::Reference< css::text::XTextRange >& rTextRange ); diff --git a/sw/source/ui/vba/vbaborders.cxx b/sw/source/ui/vba/vbaborders.cxx index 4c88228d5876..8ad2f36798e2 100644 --- a/sw/source/ui/vba/vbaborders.cxx +++ b/sw/source/ui/vba/vbaborders.cxx @@ -24,6 +24,7 @@ #include <cppuhelper/implbase.hxx> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/table/TableBorder.hpp> +#include <utility> #include "vbapalette.hxx" using namespace ::com::sun::star; @@ -244,7 +245,7 @@ private: return getCount(); // error condition } public: - RangeBorders( const uno::Reference< table::XCellRange >& xRange, const uno::Reference< uno::XComponentContext > & xContext, VbaPalette const & rPalette ) : m_xRange( xRange ), m_xContext( xContext ), m_Palette( rPalette ) + RangeBorders( uno::Reference< table::XCellRange > xRange, uno::Reference< uno::XComponentContext > xContext, VbaPalette aPalette ) : m_xRange(std::move( xRange )), m_xContext(std::move( xContext )), m_Palette(std::move( aPalette )) { } // XIndexAccess @@ -288,7 +289,7 @@ class RangeBorderEnumWrapper : public EnumerationHelper_BASE uno::Reference<container::XIndexAccess > m_xIndexAccess; sal_Int32 nIndex; public: - explicit RangeBorderEnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) : m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {} + explicit RangeBorderEnumWrapper( uno::Reference< container::XIndexAccess > xIndexAccess ) : m_xIndexAccess(std::move( xIndexAccess )), nIndex( 0 ) {} virtual sal_Bool SAL_CALL hasMoreElements( ) override { return ( nIndex < m_xIndexAccess->getCount() ); diff --git a/sw/source/ui/vba/vbacell.cxx b/sw/source/ui/vba/vbacell.cxx index 673e38d1497a..a24dd3dd1c3c 100644 --- a/sw/source/ui/vba/vbacell.cxx +++ b/sw/source/ui/vba/vbacell.cxx @@ -16,6 +16,8 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <utility> + #include "vbacell.hxx" #include "vbatablehelper.hxx" #include "vbarow.hxx" @@ -23,8 +25,8 @@ using namespace ::ooo::vba; using namespace ::com::sun::star; -SwVbaCell::SwVbaCell( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextTable >& xTextTable, sal_Int32 nColumn, sal_Int32 nRow ) : - SwVbaCell_BASE( rParent, rContext ), mxTextTable( xTextTable ), mnColumn( nColumn ), mnRow( nRow ) +SwVbaCell::SwVbaCell( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, uno::Reference< text::XTextTable > xTextTable, sal_Int32 nColumn, sal_Int32 nRow ) : + SwVbaCell_BASE( rParent, rContext ), mxTextTable(std::move( xTextTable )), mnColumn( nColumn ), mnRow( nRow ) { } diff --git a/sw/source/ui/vba/vbacell.hxx b/sw/source/ui/vba/vbacell.hxx index 9c9e7524e43f..8ca9f0adad1b 100644 --- a/sw/source/ui/vba/vbacell.hxx +++ b/sw/source/ui/vba/vbacell.hxx @@ -34,7 +34,7 @@ private: public: /// @throws css::uno::RuntimeException - SwVbaCell( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextTable >& xTextTable, sal_Int32 nColumn, sal_Int32 nRow ); + SwVbaCell( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, css::uno::Reference< css::text::XTextTable > xTextTable, sal_Int32 nColumn, sal_Int32 nRow ); virtual ~SwVbaCell() override; // Attributes diff --git a/sw/source/ui/vba/vbacells.cxx b/sw/source/ui/vba/vbacells.cxx index 69cb6e8fd7af..f1c98bfb5b06 100644 --- a/sw/source/ui/vba/vbacells.cxx +++ b/sw/source/ui/vba/vbacells.cxx @@ -20,6 +20,7 @@ #include "vbacell.hxx" #include "vbarow.hxx" #include <cppuhelper/implbase.hxx> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -32,7 +33,7 @@ class CellsEnumWrapper : public EnumerationHelper_BASE sal_Int32 nIndex; public: - explicit CellsEnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) : mxIndexAccess( xIndexAccess ), nIndex( 0 ) + explicit CellsEnumWrapper( uno::Reference< container::XIndexAccess > xIndexAccess ) : mxIndexAccess(std::move( xIndexAccess )), nIndex( 0 ) { } virtual sal_Bool SAL_CALL hasMoreElements( ) override @@ -64,7 +65,7 @@ private: public: /// @throws css::uno::RuntimeException - CellCollectionHelper( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::text::XTextTable >& xTextTable, sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom ): mxParent( xParent ), mxContext( xContext ), mxTextTable( xTextTable ), mnLeft( nLeft ), mnTop( nTop ), mnRight( nRight ), mnBottom( nBottom ) + CellCollectionHelper( css::uno::Reference< ov::XHelperInterface > xParent, css::uno::Reference< css::uno::XComponentContext > xContext, css::uno::Reference< css::text::XTextTable > xTextTable, sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom ): mxParent(std::move( xParent )), mxContext(std::move( xContext )), mxTextTable(std::move( xTextTable )), mnLeft( nLeft ), mnTop( nTop ), mnRight( nRight ), mnBottom( nBottom ) { } diff --git a/sw/source/ui/vba/vbacolumn.cxx b/sw/source/ui/vba/vbacolumn.cxx index a0c544588ea2..c4411bfab493 100644 --- a/sw/source/ui/vba/vbacolumn.cxx +++ b/sw/source/ui/vba/vbacolumn.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include "vbacolumn.hxx" +#include <utility> #include <vbahelper/vbahelper.hxx> #include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/table/XCellRange.hpp> @@ -26,8 +27,8 @@ using namespace ::ooo::vba; using namespace ::com::sun::star; -SwVbaColumn::SwVbaColumn( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextTable >& xTextTable, sal_Int32 nIndex ) : - SwVbaColumn_BASE( rParent, rContext ), mxTextTable( xTextTable ), mnIndex( nIndex ) +SwVbaColumn::SwVbaColumn( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, uno::Reference< text::XTextTable > xTextTable, sal_Int32 nIndex ) : + SwVbaColumn_BASE( rParent, rContext ), mxTextTable(std::move( xTextTable )), mnIndex( nIndex ) { } diff --git a/sw/source/ui/vba/vbacolumn.hxx b/sw/source/ui/vba/vbacolumn.hxx index 2c05f3b0e97d..4fe34de54a1c 100644 --- a/sw/source/ui/vba/vbacolumn.hxx +++ b/sw/source/ui/vba/vbacolumn.hxx @@ -33,7 +33,7 @@ private: public: /// @throws css::uno::RuntimeException - SwVbaColumn( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextTable >& xTextTable, sal_Int32 nIndex ); + SwVbaColumn( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, css::uno::Reference< css::text::XTextTable > xTextTable, sal_Int32 nIndex ); virtual ~SwVbaColumn() override; // Methods diff --git a/sw/source/ui/vba/vbacolumns.cxx b/sw/source/ui/vba/vbacolumns.cxx index 45647aa8af4e..9b061b42653d 100644 --- a/sw/source/ui/vba/vbacolumns.cxx +++ b/sw/source/ui/vba/vbacolumns.cxx @@ -16,6 +16,8 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <utility> + #include "vbacolumns.hxx" #include "vbacolumn.hxx" #include "vbatablehelper.hxx" @@ -34,7 +36,7 @@ class ColumnsEnumWrapper : public EnumerationHelper_BASE sal_Int32 nIndex; public: - ColumnsEnumWrapper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< text::XTextTable >& xTextTable ) : mxParent( xParent ), mxContext( xContext ), mxTextTable( xTextTable ), nIndex( 0 ) + ColumnsEnumWrapper( const uno::Reference< XHelperInterface >& xParent, uno::Reference< uno::XComponentContext > xContext, uno::Reference< text::XTextTable > xTextTable ) : mxParent( xParent ), mxContext(std::move( xContext )), mxTextTable(std::move( xTextTable )), nIndex( 0 ) { mxIndexAccess = mxTextTable->getColumns(); } @@ -55,14 +57,14 @@ public: } -SwVbaColumns::SwVbaColumns( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< text::XTextTable >& xTextTable, const uno::Reference< table::XTableColumns >& xTableColumns ) : SwVbaColumns_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( xTableColumns, uno::UNO_QUERY_THROW ) ), mxTextTable( xTextTable ) +SwVbaColumns::SwVbaColumns( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, uno::Reference< text::XTextTable > xTextTable, const uno::Reference< table::XTableColumns >& xTableColumns ) : SwVbaColumns_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( xTableColumns, uno::UNO_QUERY_THROW ) ), mxTextTable(std::move( xTextTable )) { mnStartColumnIndex = 0; SwVbaTableHelper aTableHelper( mxTextTable ); mnEndColumnIndex = aTableHelper.getTabColumnsMaxCount( ) - 1; } -SwVbaColumns::SwVbaColumns( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< text::XTextTable >& xTextTable, const uno::Reference< table::XTableColumns >& xTableColumns, sal_Int32 nStartCol, sal_Int32 nEndCol ) : SwVbaColumns_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( xTableColumns, uno::UNO_QUERY_THROW ) ), mxTextTable( xTextTable ), mnStartColumnIndex( nStartCol ), mnEndColumnIndex( nEndCol ) +SwVbaColumns::SwVbaColumns( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, uno::Reference< text::XTextTable > xTextTable, const uno::Reference< table::XTableColumns >& xTableColumns, sal_Int32 nStartCol, sal_Int32 nEndCol ) : SwVbaColumns_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( xTableColumns, uno::UNO_QUERY_THROW ) ), mxTextTable(std::move( xTextTable )), mnStartColumnIndex( nStartCol ), mnEndColumnIndex( nEndCol ) { if( mnEndColumnIndex < mnStartColumnIndex ) throw uno::RuntimeException(); diff --git a/sw/source/ui/vba/vbacolumns.hxx b/sw/source/ui/vba/vbacolumns.hxx index 8cacef23ff43..712dc03f0b2b 100644 --- a/sw/source/ui/vba/vbacolumns.hxx +++ b/sw/source/ui/vba/vbacolumns.hxx @@ -40,9 +40,9 @@ private: public: /// @throws css::uno::RuntimeException - SwVbaColumns( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::text::XTextTable >& xTextTable, const css::uno::Reference< css::table::XTableColumns >& xTableColumns ); + SwVbaColumns( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, css::uno::Reference< css::text::XTextTable > xTextTable, const css::uno::Reference< css::table::XTableColumns >& xTableColumns ); /// @throws css::uno::RuntimeException - SwVbaColumns( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::text::XTextTable >& xTextTable, const css::uno::Reference< css::table::XTableColumns >& xTableColumns, sal_Int32 nStartCol, sal_Int32 nEndCol ); + SwVbaColumns( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, css::uno::Reference< css::text::XTextTable > xTextTable, const css::uno::Reference< css::table::XTableColumns >& xTableColumns, sal_Int32 nStartCol, sal_Int32 nEndCol ); virtual sal_Int32 SAL_CALL getWidth( ) override; virtual void SAL_CALL setWidth( sal_Int32 _width ) override; diff --git a/sw/source/ui/vba/vbadocumentproperties.cxx b/sw/source/ui/vba/vbadocumentproperties.cxx index 10ae56ab2d88..9f644f5366da 100644 --- a/sw/source/ui/vba/vbadocumentproperties.cxx +++ b/sw/source/ui/vba/vbadocumentproperties.cxx @@ -30,6 +30,7 @@ #include "wordvbahelper.hxx" #include <fesh.hxx> #include <docsh.hxx> +#include <utility> using namespace ::ooo::vba; using namespace css; @@ -69,7 +70,7 @@ protected: uno::Reference< frame::XModel > m_xModel; uno::Reference<document::XDocumentProperties> m_xDocProps; public: - explicit PropertGetSetHelper( const uno::Reference< frame::XModel >& xModel ):m_xModel( xModel ) + explicit PropertGetSetHelper( uno::Reference< frame::XModel > xModel ):m_xModel(std::move( xModel )) { uno::Reference<document::XDocumentPropertiesSupplier> const xDocPropSupp(m_xModel, uno::UNO_QUERY_THROW); @@ -451,7 +452,7 @@ class SwVbaBuiltInDocumentProperty : public SwVbaDocumentProperty_BASE protected: DocPropInfo mPropInfo; public: - SwVbaBuiltInDocumentProperty( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const DocPropInfo& rInfo ); + SwVbaBuiltInDocumentProperty( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, DocPropInfo rInfo ); // XDocumentProperty virtual void SAL_CALL Delete( ) override; virtual OUString SAL_CALL getName( ) override; @@ -542,7 +543,7 @@ SwVbaCustomDocumentProperty::Delete( ) xContainer->removeProperty( getName() ); } -SwVbaBuiltInDocumentProperty::SwVbaBuiltInDocumentProperty( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const DocPropInfo& rInfo ) : SwVbaDocumentProperty_BASE( xParent, xContext ), mPropInfo( rInfo ) +SwVbaBuiltInDocumentProperty::SwVbaBuiltInDocumentProperty( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, DocPropInfo rInfo ) : SwVbaDocumentProperty_BASE( xParent, xContext ), mPropInfo(std::move( rInfo )) { } @@ -680,7 +681,7 @@ protected: DocPropsByName mNamedDocProps; public: - BuiltInPropertiesImpl( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) : m_xModel( xModel ) + BuiltInPropertiesImpl( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< frame::XModel > xModel ) : m_xModel(std::move( xModel )) { BuiltInIndexHelper builtIns( m_xModel ); for ( sal_Int32 index = word::WdBuiltInProperty::wdPropertyTitle; index <= word::WdBuiltInProperty::wdPropertyCharsWSpaces; ++index ) @@ -805,7 +806,7 @@ class CustomPropertiesImpl : public PropertiesImpl_BASE uno::Reference< beans::XPropertySet > mxUserDefinedProp; std::shared_ptr< PropertGetSetHelper > mpPropGetSetHelper; public: - CustomPropertiesImpl( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) : m_xParent( xParent ), m_xContext( xContext ), m_xModel( xModel ) + CustomPropertiesImpl( uno::Reference< XHelperInterface > xParent, uno::Reference< uno::XComponentContext > xContext, uno::Reference< frame::XModel > xModel ) : m_xParent(std::move( xParent )), m_xContext(std::move( xContext )), m_xModel(std::move( xModel )) { // suck in the document( custom ) properties mpPropGetSetHelper = std::make_shared<CustomPropertyGetSetHelper>( m_xModel ); diff --git a/sw/source/ui/vba/vbadocuments.cxx b/sw/source/ui/vba/vbadocuments.cxx index 363d4f57ad10..ca5f2985553f 100644 --- a/sw/source/ui/vba/vbadocuments.cxx +++ b/sw/source/ui/vba/vbadocuments.cxx @@ -27,6 +27,7 @@ #include "vbadocuments.hxx" #include <osl/file.hxx> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -48,7 +49,7 @@ class DocumentEnumImpl : public EnumerationHelperImpl uno::Any m_aApplication; public: /// @throws uno::RuntimeException - DocumentEnumImpl( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Any& aApplication ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), m_aApplication( aApplication ) {} + DocumentEnumImpl( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, uno::Any aApplication ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), m_aApplication(std::move( aApplication )) {} virtual uno::Any SAL_CALL nextElement( ) override { diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx index a61ca5a4f070..701326f956d9 100644 --- a/sw/source/ui/vba/vbafield.cxx +++ b/sw/source/ui/vba/vbafield.cxx @@ -29,6 +29,7 @@ #include <cppuhelper/implbase.hxx> #include <sal/log.hxx> #include <tools/long.hxx> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -233,7 +234,7 @@ class FieldEnumeration : public ::cppu::WeakImplHelper< css::container::XEnumera uno::Reference< frame::XModel > mxModel; uno::Reference< container::XEnumeration > mxEnumeration; public: - FieldEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< container::XEnumeration >& xEnumeration ) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel ), mxEnumeration( xEnumeration ) + FieldEnumeration( uno::Reference< XHelperInterface > xParent, uno::Reference< uno::XComponentContext > xContext, uno::Reference< frame::XModel > xModel, uno::Reference< container::XEnumeration > xEnumeration ) : mxParent(std::move( xParent )), mxContext(std::move( xContext )), mxModel(std::move( xModel )), mxEnumeration(std::move( xEnumeration )) { } virtual sal_Bool SAL_CALL hasMoreElements( ) override @@ -257,7 +258,7 @@ class FieldCollectionHelper : public ::cppu::WeakImplHelper< container::XIndexAc uno::Reference< container::XEnumerationAccess > mxEnumerationAccess; public: /// @throws css::uno::RuntimeException - FieldCollectionHelper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel ) + FieldCollectionHelper( uno::Reference< XHelperInterface > xParent, uno::Reference< uno::XComponentContext > xContext, const uno::Reference< frame::XModel >& xModel ) : mxParent(std::move( xParent )), mxContext(std::move( xContext )), mxModel( xModel ) { uno::Reference< text::XTextFieldsSupplier > xSupp( xModel, uno::UNO_QUERY_THROW ); mxEnumerationAccess.set( xSupp->getTextFields(), uno::UNO_SET_THROW ); diff --git a/sw/source/ui/vba/vbafind.cxx b/sw/source/ui/vba/vbafind.cxx index 3c9940cc0e1f..892e062f3cdf 100644 --- a/sw/source/ui/vba/vbafind.cxx +++ b/sw/source/ui/vba/vbafind.cxx @@ -31,9 +31,8 @@ using namespace ::ooo::vba; using namespace ::com::sun::star; - -SwVbaFind::SwVbaFind( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< frame::XModel >& xModel ) : - SwVbaFind_BASE( rParent, rContext ), mxModel( xModel ), mbReplace( false ), mnReplaceType( word::WdReplace::wdReplaceOne ), mnWrap( word::WdFindWrap::wdFindStop ) +SwVbaFind::SwVbaFind( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, uno::Reference< frame::XModel > xModel ) : + SwVbaFind_BASE( rParent, rContext ), mxModel( std::move(xModel) ), mbReplace( false ), mnReplaceType( word::WdReplace::wdReplaceOne ), mnWrap( word::WdFindWrap::wdFindStop ) { mxReplaceable.set( mxModel, uno::UNO_QUERY_THROW ); mxPropertyReplace.set( mxReplaceable->createReplaceDescriptor(), uno::UNO_QUERY_THROW ); diff --git a/sw/source/ui/vba/vbafind.hxx b/sw/source/ui/vba/vbafind.hxx index ed2df832f00e..110a084bd276 100644 --- a/sw/source/ui/vba/vbafind.hxx +++ b/sw/source/ui/vba/vbafind.hxx @@ -58,7 +58,7 @@ private: bool SearchReplace(); /// @throws css::uno::RuntimeException - SwVbaFind( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& xModel ); + SwVbaFind( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, css::uno::Reference< css::frame::XModel > xModel ); public: static css::uno::Reference< ooo::vba::word::XFind > GetOrCreateFind(const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< com::sun::star::uno::XComponentContext >& rContext, const css::uno::Reference< com::sun::star::frame::XModel >& xModel, const css::uno::Reference< css::text::XTextRange >& xTextRange); virtual ~SwVbaFind() override; diff --git a/sw/source/ui/vba/vbaframe.cxx b/sw/source/ui/vba/vbaframe.cxx index 2ed29fabc653..b3a0180fb1d5 100644 --- a/sw/source/ui/vba/vbaframe.cxx +++ b/sw/source/ui/vba/vbaframe.cxx @@ -19,12 +19,13 @@ #include "vbaframe.hxx" #include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/view/XSelectionSupplier.hpp> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; -SwVbaFrame::SwVbaFrame( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const css::uno::Reference< frame::XModel >& rModel, const css::uno::Reference< text::XTextFrame >& xTextFrame ) : - SwVbaFrame_BASE( rParent, rContext ), mxModel( rModel ), mxTextFrame( xTextFrame ) +SwVbaFrame::SwVbaFrame( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, css::uno::Reference< frame::XModel > xModel, css::uno::Reference< text::XTextFrame > xTextFrame ) : + SwVbaFrame_BASE( rParent, rContext ), mxModel(std::move( xModel )), mxTextFrame(std::move( xTextFrame )) { } diff --git a/sw/source/ui/vba/vbaframe.hxx b/sw/source/ui/vba/vbaframe.hxx index 2097e9ac1a24..c24ba4617cd7 100644 --- a/sw/source/ui/vba/vbaframe.hxx +++ b/sw/source/ui/vba/vbaframe.hxx @@ -33,7 +33,7 @@ private: public: /// @throws css::uno::RuntimeException - SwVbaFrame( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& rModel, const css::uno::Reference< css::text::XTextFrame >& xTextFrame ); + SwVbaFrame( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, css::uno::Reference< css::frame::XModel > xModel, css::uno::Reference< css::text::XTextFrame > xTextFrame ); virtual ~SwVbaFrame() override; // Methods diff --git a/sw/source/ui/vba/vbaframes.cxx b/sw/source/ui/vba/vbaframes.cxx index 66042950c944..a6495da08d71 100644 --- a/sw/source/ui/vba/vbaframes.cxx +++ b/sw/source/ui/vba/vbaframes.cxx @@ -20,6 +20,7 @@ #include "vbaframe.hxx" #include <com/sun/star/frame/XModel.hpp> #include <cppuhelper/implbase.hxx> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -36,7 +37,7 @@ private: sal_Int32 nCurrentPos; public: /// @throws uno::RuntimeException - FramesEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess, const uno::Reference< frame::XModel >& xModel ) : mxParent( xParent ), mxContext( xContext), mxIndexAccess( xIndexAccess ), mxModel( xModel ), nCurrentPos(0) + FramesEnumeration( uno::Reference< XHelperInterface > xParent, uno::Reference< uno::XComponentContext > xContext, uno::Reference< container::XIndexAccess > xIndexAccess, uno::Reference< frame::XModel > xModel ) : mxParent(std::move( xParent )), mxContext(std::move( xContext)), mxIndexAccess(std::move( xIndexAccess )), mxModel(std::move( xModel )), nCurrentPos(0) { } virtual sal_Bool SAL_CALL hasMoreElements( ) override @@ -56,7 +57,7 @@ public: } -SwVbaFrames::SwVbaFrames( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xFrames, const uno::Reference< frame::XModel >& xModel ): SwVbaFrames_BASE( xParent, xContext, xFrames ), mxModel( xModel ) +SwVbaFrames::SwVbaFrames( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xFrames, uno::Reference< frame::XModel > xModel ): SwVbaFrames_BASE( xParent, xContext, xFrames ), mxModel(std::move( xModel )) { mxFramesSupplier.set( mxModel, uno::UNO_QUERY_THROW ); } diff --git a/sw/source/ui/vba/vbaframes.hxx b/sw/source/ui/vba/vbaframes.hxx index e83f411b1da5..6a0c20c3db53 100644 --- a/sw/source/ui/vba/vbaframes.hxx +++ b/sw/source/ui/vba/vbaframes.hxx @@ -32,7 +32,7 @@ private: css::uno::Reference< css::text::XTextFramesSupplier > mxFramesSupplier; public: - SwVbaFrames( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xFrames, const css::uno::Reference< css::frame::XModel >& xModel ); + SwVbaFrames( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xFrames, css::uno::Reference< css::frame::XModel > xModel ); // XEnumerationAccess virtual css::uno::Type SAL_CALL getElementType() override; diff --git a/sw/source/ui/vba/vbaheaderfooter.cxx b/sw/source/ui/vba/vbaheaderfooter.cxx index 7245d1d143ea..a031b0ecdaab 100644 --- a/sw/source/ui/vba/vbaheaderfooter.cxx +++ b/sw/source/ui/vba/vbaheaderfooter.cxx @@ -23,12 +23,13 @@ #include <com/sun/star/text/XTextDocument.hpp> #include <com/sun/star/drawing/XDrawPageSupplier.hpp> #include "vbarange.hxx" +#include <utility> #include <vbahelper/vbashapes.hxx> using namespace ::ooo::vba; using namespace ::com::sun::star; -SwVbaHeaderFooter::SwVbaHeaderFooter( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< beans::XPropertySet >& rProps, bool isHeader, sal_Int32 index ) : SwVbaHeaderFooter_BASE( rParent, rContext ), mxModel( xModel ), mxPageStyleProps( rProps ), mbHeader( isHeader ), mnIndex( index ) +SwVbaHeaderFooter::SwVbaHeaderFooter( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, uno::Reference< frame::XModel > xModel, uno::Reference< beans::XPropertySet > xProps, bool isHeader, sal_Int32 index ) : SwVbaHeaderFooter_BASE( rParent, rContext ), mxModel(std::move( xModel )), mxPageStyleProps(std::move( xProps )), mbHeader( isHeader ), mnIndex( index ) { } diff --git a/sw/source/ui/vba/vbaheaderfooter.hxx b/sw/source/ui/vba/vbaheaderfooter.hxx index fd3a3dea462b..7425057b262a 100644 --- a/sw/source/ui/vba/vbaheaderfooter.hxx +++ b/sw/source/ui/vba/vbaheaderfooter.hxx @@ -35,7 +35,7 @@ private: public: /// @throws css::uno::RuntimeException - SwVbaHeaderFooter( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::beans::XPropertySet >& xProps, bool isHeader, sal_Int32 index ); + SwVbaHeaderFooter( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, css::uno::Reference< css::frame::XModel > xModel, css::uno::Reference< css::beans::XPropertySet > xProps, bool isHeader, sal_Int32 index ); // Attributes virtual sal_Bool SAL_CALL getIsHeader() override; diff --git a/sw/source/ui/vba/vbaheadersfooters.cxx b/sw/source/ui/vba/vbaheadersfooters.cxx index dd84f6206f0a..34c3ea00b364 100644 --- a/sw/source/ui/vba/vbaheadersfooters.cxx +++ b/sw/source/ui/vba/vbaheadersfooters.cxx @@ -19,6 +19,7 @@ #include "vbaheadersfooters.hxx" #include "vbaheaderfooter.hxx" #include <cppuhelper/implbase.hxx> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -36,7 +37,7 @@ private: bool mbHeader; public: - HeadersFootersIndexAccess( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< beans::XPropertySet >& xPageStyleProps, bool bHeader ) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel ), mxPageStyleProps( xPageStyleProps ), mbHeader( bHeader ) {} + HeadersFootersIndexAccess( uno::Reference< XHelperInterface > xParent, uno::Reference< uno::XComponentContext > xContext, uno::Reference< frame::XModel > xModel, uno::Reference< beans::XPropertySet > xPageStyleProps, bool bHeader ) : mxParent(std::move( xParent )), mxContext(std::move( xContext )), mxModel(std::move( xModel )), mxPageStyleProps(std::move( xPageStyleProps )), mbHeader( bHeader ) {} // XIndexAccess virtual sal_Int32 SAL_CALL getCount( ) override diff --git a/sw/source/ui/vba/vbalistformat.cxx b/sw/source/ui/vba/vbalistformat.cxx index 615eee10ad6e..5778776d2c30 100644 --- a/sw/source/ui/vba/vbalistformat.cxx +++ b/sw/source/ui/vba/vbalistformat.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include "vbalistformat.hxx" +#include <utility> #include <vbahelper/vbahelper.hxx> #include <ooo/vba/word/WdListApplyTo.hpp> #include <ooo/vba/word/WdDefaultListBehavior.hpp> @@ -41,7 +42,7 @@ using namespace ::ooo::vba; using namespace ::com::sun::star; -SwVbaListFormat::SwVbaListFormat( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextRange >& xTextRange ) : SwVbaListFormat_BASE( rParent, rContext ), mxTextRange( xTextRange ) +SwVbaListFormat::SwVbaListFormat( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, uno::Reference< text::XTextRange > xTextRange ) : SwVbaListFormat_BASE( rParent, rContext ), mxTextRange(std::move( xTextRange )) { } diff --git a/sw/source/ui/vba/vbalistformat.hxx b/sw/source/ui/vba/vbalistformat.hxx index 273c67fe5218..378a42fd625f 100644 --- a/sw/source/ui/vba/vbalistformat.hxx +++ b/sw/source/ui/vba/vbalistformat.hxx @@ -33,7 +33,7 @@ private: public: /// @throws css::uno::RuntimeException - SwVbaListFormat( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextRange >& xTextRange ); + SwVbaListFormat( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, css::uno::Reference< css::text::XTextRange > xTextRange ); virtual ~SwVbaListFormat() override; // Methods diff --git a/sw/source/ui/vba/vbalistgalleries.cxx b/sw/source/ui/vba/vbalistgalleries.cxx index 5ac8e2f3ab1f..56c2116c328c 100644 --- a/sw/source/ui/vba/vbalistgalleries.cxx +++ b/sw/source/ui/vba/vbalistgalleries.cxx @@ -19,6 +19,7 @@ #include "vbalistgalleries.hxx" #include "vbalistgallery.hxx" #include <ooo/vba/word/WdListGalleryType.hpp> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -46,7 +47,7 @@ public: } -SwVbaListGalleries::SwVbaListGalleries( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< text::XTextDocument >& xTextDoc ) : SwVbaListGalleries_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >() ), mxTextDocument( xTextDoc ) +SwVbaListGalleries::SwVbaListGalleries( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, uno::Reference< text::XTextDocument > xTextDoc ) : SwVbaListGalleries_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >() ), mxTextDocument(std::move( xTextDoc )) { } diff --git a/sw/source/ui/vba/vbalistgalleries.hxx b/sw/source/ui/vba/vbalistgalleries.hxx index 57cfc9d9809c..9eb8f58d935c 100644 --- a/sw/source/ui/vba/vbalistgalleries.hxx +++ b/sw/source/ui/vba/vbalistgalleries.hxx @@ -32,7 +32,7 @@ private: public: /// @throws css::uno::RuntimeException - SwVbaListGalleries( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::text::XTextDocument >& xTextDoc ); + SwVbaListGalleries( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, css::uno::Reference< css::text::XTextDocument > xTextDoc ); virtual ::sal_Int32 SAL_CALL getCount() override; virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index1, const css::uno::Any& /*not processed in this base class*/ ) override; diff --git a/sw/source/ui/vba/vbalistgallery.cxx b/sw/source/ui/vba/vbalistgallery.cxx index d224f09fd15c..8eae71df8ec2 100644 --- a/sw/source/ui/vba/vbalistgallery.cxx +++ b/sw/source/ui/vba/vbalistgallery.cxx @@ -16,13 +16,15 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <utility> + #include "vbalistgallery.hxx" #include "vbalisttemplates.hxx" using namespace ::ooo::vba; using namespace ::com::sun::star; -SwVbaListGallery::SwVbaListGallery( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& xTextDoc, sal_Int32 nType ) : SwVbaListGallery_BASE( rParent, rContext ), mxTextDocument( xTextDoc ), mnType( nType ) +SwVbaListGallery::SwVbaListGallery( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, uno::Reference< text::XTextDocument > xTextDoc, sal_Int32 nType ) : SwVbaListGallery_BASE( rParent, rContext ), mxTextDocument(std::move( xTextDoc )), mnType( nType ) { } diff --git a/sw/source/ui/vba/vbalistgallery.hxx b/sw/source/ui/vba/vbalistgallery.hxx index 187cdd418dde..2b288aa2666a 100644 --- a/sw/source/ui/vba/vbalistgallery.hxx +++ b/sw/source/ui/vba/vbalistgallery.hxx @@ -33,7 +33,7 @@ private: public: /// @throws css::uno::RuntimeException - SwVbaListGallery( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& xTextDoc, sal_Int32 nType ); + SwVbaListGallery( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, css::uno::Reference< css::text::XTextDocument > xTextDoc, sal_Int32 nType ); virtual ~SwVbaListGallery() override; // Methods diff --git a/sw/source/ui/vba/vbalisthelper.cxx b/sw/source/ui/vba/vbalisthelper.cxx index 89e0fd2feef7..2de570af0f0c 100644 --- a/sw/source/ui/vba/vbalisthelper.cxx +++ b/sw/source/ui/vba/vbalisthelper.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include "vbalisthelper.hxx" +#include <utility> #include <vbahelper/vbahelper.hxx> #include <sal/log.hxx> #include <ooo/vba/word/WdListGalleryType.hpp> @@ -47,7 +48,7 @@ constexpr OUStringLiteral CHAR_DIAMOND = u"\u2726"; constexpr OUStringLiteral CHAR_ARROW = u"\u27A2"; constexpr OUStringLiteral CHAR_CHECK_MARK = u"\u2713"; -SwVbaListHelper::SwVbaListHelper( const css::uno::Reference< css::text::XTextDocument >& xTextDoc, sal_Int32 nGalleryType, sal_Int32 nTemplateType ) : mxTextDocument( xTextDoc ), mnGalleryType( nGalleryType ), mnTemplateType( nTemplateType ) +SwVbaListHelper::SwVbaListHelper( css::uno::Reference< css::text::XTextDocument > xTextDoc, sal_Int32 nGalleryType, sal_Int32 nTemplateType ) : mxTextDocument(std::move( xTextDoc )), mnGalleryType( nGalleryType ), mnTemplateType( nTemplateType ) { Init(); } diff --git a/sw/source/ui/vba/vbalisthelper.hxx b/sw/source/ui/vba/vbalisthelper.hxx index 16c6f9d426c3..599e4f686484 100644 --- a/sw/source/ui/vba/vbalisthelper.hxx +++ b/sw/source/ui/vba/vbalisthelper.hxx @@ -57,7 +57,7 @@ private: public: /// @throws css::uno::RuntimeException - SwVbaListHelper( const css::uno::Reference< css::text::XTextDocument >& xTextDoc, sal_Int32 nGalleryType, sal_Int32 nTemplateType ); + SwVbaListHelper( css::uno::Reference< css::text::XTextDocument > xTextDoc, sal_Int32 nGalleryType, sal_Int32 nTemplateType ); sal_Int32 getGalleryType() const { return mnGalleryType; } const css::uno::Reference< css::container::XIndexReplace >& getNumberingRules() const { return mxNumberingRules; } diff --git a/sw/source/ui/vba/vbalistlevel.cxx b/sw/source/ui/vba/vbalistlevel.cxx index b69cef41ef8e..dcd06a2e998a 100644 --- a/sw/source/ui/vba/vbalistlevel.cxx +++ b/sw/source/ui/vba/vbalistlevel.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include "vbalistlevel.hxx" +#include <utility> #include <vbahelper/vbahelper.hxx> #include <com/sun/star/style/NumberingType.hpp> #include <ooo/vba/word/WdListNumberStyle.hpp> @@ -26,7 +27,7 @@ using namespace ::ooo::vba; using namespace ::com::sun::star; -SwVbaListLevel::SwVbaListLevel( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, SwVbaListHelperRef const & pHelper, sal_Int32 nLevel ) : SwVbaListLevel_BASE( rParent, rContext ), pListHelper( pHelper ), mnLevel( nLevel ) +SwVbaListLevel::SwVbaListLevel( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, SwVbaListHelperRef pHelper, sal_Int32 nLevel ) : SwVbaListLevel_BASE( rParent, rContext ), pListHelper(std::move( pHelper )), mnLevel( nLevel ) { } diff --git a/sw/source/ui/vba/vbalistlevel.hxx b/sw/source/ui/vba/vbalistlevel.hxx index f149a7109104..edb1d44675f0 100644 --- a/sw/source/ui/vba/vbalistlevel.hxx +++ b/sw/source/ui/vba/vbalistlevel.hxx @@ -33,7 +33,7 @@ private: public: /// @throws css::uno::RuntimeException - SwVbaListLevel( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, SwVbaListHelperRef const & pHelper, sal_Int32 nLevel ); + SwVbaListLevel( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, SwVbaListHelperRef pHelper, sal_Int32 nLevel ); virtual ~SwVbaListLevel() override; // Attributes diff --git a/sw/source/ui/vba/vbalistlevels.cxx b/sw/source/ui/vba/vbalistlevels.cxx index 1ffd244d066a..433a9bf8e8a8 100644 --- a/sw/source/ui/vba/vbalistlevels.cxx +++ b/sw/source/ui/vba/vbalistlevels.cxx @@ -19,6 +19,7 @@ #include "vbalistlevels.hxx" #include "vbalistlevel.hxx" #include <ooo/vba/word/WdListGalleryType.hpp> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -46,7 +47,7 @@ public: } -SwVbaListLevels::SwVbaListLevels( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, SwVbaListHelperRef const & pHelper ) : SwVbaListLevels_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >() ), pListHelper( pHelper ) +SwVbaListLevels::SwVbaListLevels( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, SwVbaListHelperRef pHelper ) : SwVbaListLevels_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >() ), pListHelper(std::move( pHelper )) { } diff --git a/sw/source/ui/vba/vbalistlevels.hxx b/sw/source/ui/vba/vbalistlevels.hxx index ce5674fc7e97..364a48127de6 100644 --- a/sw/source/ui/vba/vbalistlevels.hxx +++ b/sw/source/ui/vba/vbalistlevels.hxx @@ -32,7 +32,7 @@ private: public: /// @throws css::uno::RuntimeException - SwVbaListLevels( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, SwVbaListHelperRef const & pHelper ); + SwVbaListLevels( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, SwVbaListHelperRef pHelper ); virtual ::sal_Int32 SAL_CALL getCount() override; virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index1, const css::uno::Any& /*not processed in this base class*/ ) override; diff --git a/sw/source/ui/vba/vbalisttemplates.cxx b/sw/source/ui/vba/vbalisttemplates.cxx index 9902dd4f2390..7da831c30bfb 100644 --- a/sw/source/ui/vba/vbalisttemplates.cxx +++ b/sw/source/ui/vba/vbalisttemplates.cxx @@ -16,6 +16,8 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <utility> + #include "vbalisttemplates.hxx" #include "vbalisttemplate.hxx" @@ -45,7 +47,7 @@ public: } -SwVbaListTemplates::SwVbaListTemplates( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< text::XTextDocument >& xTextDoc, sal_Int32 nType ) : SwVbaListTemplates_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >() ), mxTextDocument( xTextDoc ), mnGalleryType( nType ) +SwVbaListTemplates::SwVbaListTemplates( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, uno::Reference< text::XTextDocument > xTextDoc, sal_Int32 nType ) : SwVbaListTemplates_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >() ), mxTextDocument(std::move( xTextDoc )), mnGalleryType( nType ) { } diff --git a/sw/source/ui/vba/vbalisttemplates.hxx b/sw/source/ui/vba/vbalisttemplates.hxx index d9d4e9d7fba2..bf5c34f6eec6 100644 --- a/sw/source/ui/vba/vbalisttemplates.hxx +++ b/sw/source/ui/vba/vbalisttemplates.hxx @@ -33,7 +33,7 @@ private: public: /// @throws css::uno::RuntimeException - SwVbaListTemplates( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::text::XTextDocument >& xTextDoc, sal_Int32 nType ); + SwVbaListTemplates( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, css::uno::Reference< css::text::XTextDocument > xTextDoc, sal_Int32 nType ); virtual ::sal_Int32 SAL_CALL getCount() override; virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index1, const css::uno::Any& /*not processed in this base class*/ ) override; diff --git a/sw/source/ui/vba/vbapane.cxx b/sw/source/ui/vba/vbapane.cxx index 7f14b69bfefc..64a7c411c77c 100644 --- a/sw/source/ui/vba/vbapane.cxx +++ b/sw/source/ui/vba/vbapane.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include "vbapane.hxx" +#include <utility> #include <vbahelper/vbahelper.hxx> #include "vbaview.hxx" @@ -24,8 +25,8 @@ using namespace ::ooo::vba; using namespace ::com::sun::star; SwVbaPane::SwVbaPane( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, - const uno::Reference< frame::XModel >& xModel ) : - SwVbaPane_BASE( rParent, rContext ), mxModel( xModel ) + uno::Reference< frame::XModel > xModel ) : + SwVbaPane_BASE( rParent, rContext ), mxModel(std::move( xModel )) { } diff --git a/sw/source/ui/vba/vbapane.hxx b/sw/source/ui/vba/vbapane.hxx index 63edfa390725..e0a81b9e0f04 100644 --- a/sw/source/ui/vba/vbapane.hxx +++ b/sw/source/ui/vba/vbapane.hxx @@ -33,7 +33,7 @@ public: /// @throws css::uno::RuntimeException SwVbaPane(const css::uno::Reference<ooo::vba::XHelperInterface>& rParent, const css::uno::Reference<css::uno::XComponentContext>& rContext, - const css::uno::Reference<css::frame::XModel>& xModel); + css::uno::Reference<css::frame::XModel> xModel); virtual ~SwVbaPane() override; // Methods diff --git a/sw/source/ui/vba/vbapanes.cxx b/sw/source/ui/vba/vbapanes.cxx index cc507a6f840f..a5e884da24b2 100644 --- a/sw/source/ui/vba/vbapanes.cxx +++ b/sw/source/ui/vba/vbapanes.cxx @@ -19,6 +19,7 @@ #include "vbapanes.hxx" #include "vbapane.hxx" #include <cppuhelper/implbase.hxx> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -34,7 +35,7 @@ private: uno::Reference< frame::XModel > mxModel; public: - PanesIndexAccess( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel ) {} + PanesIndexAccess( uno::Reference< XHelperInterface > xParent, uno::Reference< uno::XComponentContext > xContext, uno::Reference< frame::XModel > xModel ) : mxParent(std::move( xParent )), mxContext(std::move( xContext )), mxModel(std::move( xModel )) {} // XIndexAccess virtual sal_Int32 SAL_CALL getCount( ) override @@ -62,7 +63,7 @@ class PanesEnumWrapper : public EnumerationHelper_BASE uno::Reference<container::XIndexAccess > m_xIndexAccess; sal_Int32 nIndex; public: - explicit PanesEnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) : m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {} + explicit PanesEnumWrapper( uno::Reference< container::XIndexAccess > xIndexAccess ) : m_xIndexAccess(std::move( xIndexAccess )), nIndex( 0 ) {} virtual sal_Bool SAL_CALL hasMoreElements( ) override { return ( nIndex < m_xIndexAccess->getCount() ); diff --git a/sw/source/ui/vba/vbaparagraph.cxx b/sw/source/ui/vba/vbaparagraph.cxx index 28cd264c1bc4..19a312795910 100644 --- a/sw/source/ui/vba/vbaparagraph.cxx +++ b/sw/source/ui/vba/vbaparagraph.cxx @@ -20,12 +20,13 @@ #include "vbarange.hxx" #include <com/sun/star/lang/XServiceInfo.hpp> #include <cppuhelper/implbase.hxx> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; -SwVbaParagraph::SwVbaParagraph( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& xDocument, const uno::Reference< text::XTextRange >& xTextRange ) : - SwVbaParagraph_BASE( rParent, rContext ), mxTextDocument( xDocument ), mxTextRange( xTextRange ) +SwVbaParagraph::SwVbaParagraph( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, uno::Reference< text::XTextDocument > xDocument, uno::Reference< text::XTextRange > xTextRange ) : + SwVbaParagraph_BASE( rParent, rContext ), mxTextDocument(std::move( xDocument )), mxTextRange(std::move( xTextRange )) { } @@ -86,7 +87,7 @@ private: public: /// @throws uno::RuntimeException - explicit ParagraphCollectionHelper( const uno::Reference< text::XTextDocument >& xDocument ): mxTextDocument( xDocument ) + explicit ParagraphCollectionHelper( uno::Reference< text::XTextDocument > xDocument ): mxTextDocument(std::move( xDocument )) { } // XElementAccess diff --git a/sw/source/ui/vba/vbaparagraph.hxx b/sw/source/ui/vba/vbaparagraph.hxx index 7ce0b0555630..6c35455614d1 100644 --- a/sw/source/ui/vba/vbaparagraph.hxx +++ b/sw/source/ui/vba/vbaparagraph.hxx @@ -36,7 +36,7 @@ private: public: /// @throws css::uno::RuntimeException - SwVbaParagraph( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& xDocument, const css::uno::Reference< css::text::XTextRange >& xTextRange ); + SwVbaParagraph( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, css::uno::Reference< css::text::XTextDocument > xDocument, css::uno::Reference< css::text::XTextRange > xTextRange ); virtual ~SwVbaParagraph() override; // XParagraph diff --git a/sw/source/ui/vba/vbaparagraphformat.cxx b/sw/source/ui/vba/vbaparagraphformat.cxx index 7838a6f76bc1..c70478171cb2 100644 --- a/sw/source/ui/vba/vbaparagraphformat.cxx +++ b/sw/source/ui/vba/vbaparagraphformat.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include "vbaparagraphformat.hxx" +#include <utility> #include <vbahelper/vbahelper.hxx> #include <basic/sberrors.hxx> #include <com/sun/star/style/LineSpacingMode.hpp> @@ -37,7 +38,7 @@ const sal_Int16 PERCENT100 = 100; const sal_Int16 PERCENT150 = 150; const sal_Int16 PERCENT200 = 200; -SwVbaParagraphFormat::SwVbaParagraphFormat( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< beans::XPropertySet >& rParaProps ) : SwVbaParagraphFormat_BASE( rParent, rContext ), mxParaProps( rParaProps ) +SwVbaParagraphFormat::SwVbaParagraphFormat( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, uno::Reference< beans::XPropertySet > xParaProps ) : SwVbaParagraphFormat_BASE( rParent, rContext ), mxParaProps(std::move( xParaProps )) { } diff --git a/sw/source/ui/vba/vbaparagraphformat.hxx b/sw/source/ui/vba/vbaparagraphformat.hxx index 0b9b02b54ec6..a80c21e1b160 100644 --- a/sw/source/ui/vba/vbaparagraphformat.hxx +++ b/sw/source/ui/vba/vbaparagraphformat.hxx @@ -42,7 +42,7 @@ private: static sal_Int32 getMSWordAlignment( css::style::ParagraphAdjust _alignment ); public: - SwVbaParagraphFormat( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::beans::XPropertySet >& rParaProps ); + SwVbaParagraphFormat( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, css::uno::Reference< css::beans::XPropertySet > xParaProps ); virtual ~SwVbaParagraphFormat() override; // Attributes diff --git a/sw/source/ui/vba/vbarange.cxx b/sw/source/ui/vba/vbarange.cxx index 8803b067316b..c48dd6193c2f 100644 --- a/sw/source/ui/vba/vbarange.cxx +++ b/sw/source/ui/vba/vbarange.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include "vbarange.hxx" +#include <utility> #include <vbahelper/vbahelper.hxx> #include <basic/sberrors.hxx> #include "vbarangehelper.hxx" @@ -42,18 +43,18 @@ using namespace ::ooo::vba; using namespace ::com::sun::star; -SwVbaRange::SwVbaRange( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& rTextDocument, const uno::Reference< text::XTextRange >& rStart ) : SwVbaRange_BASE( rParent, rContext ), mxTextDocument( rTextDocument ) +SwVbaRange::SwVbaRange( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, uno::Reference< text::XTextDocument > xTextDocument, const uno::Reference< text::XTextRange >& rStart ) : SwVbaRange_BASE( rParent, rContext ), mxTextDocument(std::move( xTextDocument )) { uno::Reference< text::XTextRange > xEnd; initialize( rStart, xEnd ); } -SwVbaRange::SwVbaRange( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& rTextDocument, const uno::Reference< text::XTextRange >& rStart, const uno::Reference< text::XTextRange >& rEnd ) : SwVbaRange_BASE( rParent, rContext ), mxTextDocument( rTextDocument ) +SwVbaRange::SwVbaRange( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, uno::Reference< text::XTextDocument > xTextDocument, const uno::Reference< text::XTextRange >& rStart, const uno::Reference< text::XTextRange >& rEnd ) : SwVbaRange_BASE( rParent, rContext ), mxTextDocument(std::move( xTextDocument )) { initialize( rStart, rEnd ); } -SwVbaRange::SwVbaRange( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& rTextDocument, const uno::Reference< text::XTextRange >& rStart, const uno::Reference< text::XTextRange >& rEnd, const uno::Reference< text::XText >& rText ) : SwVbaRange_BASE( rParent, rContext ),mxTextDocument( rTextDocument ), mxText( rText ) +SwVbaRange::SwVbaRange( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, uno::Reference< text::XTextDocument > xTextDocument, const uno::Reference< text::XTextRange >& rStart, const uno::Reference< text::XTextRange >& rEnd, uno::Reference< text::XText > xText ) : SwVbaRange_BASE( rParent, rContext ),mxTextDocument(std::move( xTextDocument )), mxText(std::move( xText )) { initialize( rStart, rEnd ); } diff --git a/sw/source/ui/vba/vbarange.hxx b/sw/source/ui/vba/vbarange.hxx index ee8ed621bb8c..f0dd1563503b 100644 --- a/sw/source/ui/vba/vbarange.hxx +++ b/sw/source/ui/vba/vbarange.hxx @@ -46,13 +46,13 @@ private: public: /// @throws css::script::BasicErrorException /// @throws css::uno::RuntimeException - SwVbaRange( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rTextDocument, const css::uno::Reference< css::text::XTextRange >& rStart); + SwVbaRange( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, css::uno::Reference< css::text::XTextDocument > xTextDocument, const css::uno::Reference< css::text::XTextRange >& rStart); /// @throws css::script::BasicErrorException /// @throws css::uno::RuntimeException - SwVbaRange( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rTextDocument, const css::uno::Reference< css::text::XTextRange >& rStart, const css::uno::Reference< css::text::XTextRange >& rEnd ); + SwVbaRange( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, css::uno::Reference< css::text::XTextDocument > xTextDocument, const css::uno::Reference< css::text::XTextRange >& rStart, const css::uno::Reference< css::text::XTextRange >& rEnd ); /// @throws css::script::BasicErrorException /// @throws css::uno::RuntimeException - SwVbaRange( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rTextDocument, const css::uno::Reference< css::text::XTextRange >& rStart, const css::uno::Reference< css::text::XTextRange >& rEnd, const css::uno::Reference< css::text::XText >& rText); + SwVbaRange( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, css::uno::Reference< css::text::XTextDocument > xTextDocument, const css::uno::Reference< css::text::XTextRange >& rStart, const css::uno::Reference< css::text::XTextRange >& rEnd, css::uno::Reference< css::text::XText > xText); virtual ~SwVbaRange() override; const css::uno::Reference< css::text::XTextDocument >& getDocument() const { return mxTextDocument; } diff --git a/sw/source/ui/vba/vbareplacement.cxx b/sw/source/ui/vba/vbareplacement.cxx index 693a20c6ad91..bed7aee8d7f3 100644 --- a/sw/source/ui/vba/vbareplacement.cxx +++ b/sw/source/ui/vba/vbareplacement.cxx @@ -16,13 +16,15 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <utility> + #include "vbareplacement.hxx" using namespace ::ooo::vba; using namespace ::com::sun::star; -SwVbaReplacement::SwVbaReplacement( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< util::XPropertyReplace >& xPropertyReplace ) : - SwVbaReplacement_BASE( rParent, rContext ), mxPropertyReplace( xPropertyReplace ) +SwVbaReplacement::SwVbaReplacement( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, uno::Reference< util::XPropertyReplace > xPropertyReplace ) : + SwVbaReplacement_BASE( rParent, rContext ), mxPropertyReplace(std::move( xPropertyReplace )) { } diff --git a/sw/source/ui/vba/vbareplacement.hxx b/sw/source/ui/vba/vbareplacement.hxx index 22f37910ed13..6c6ee894221b 100644 --- a/sw/source/ui/vba/vbareplacement.hxx +++ b/sw/source/ui/vba/vbareplacement.hxx @@ -32,7 +32,7 @@ private: public: /// @throws css::uno::RuntimeException - SwVbaReplacement( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::util::XPropertyReplace >& xPropertyReplace ); + SwVbaReplacement( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, css::uno::Reference< css::util::XPropertyReplace > xPropertyReplace ); virtual ~SwVbaReplacement() override; // Attributes diff --git a/sw/source/ui/vba/vbarevision.cxx b/sw/source/ui/vba/vbarevision.cxx index ee1f4412dc97..f8b1c5978d5f 100644 --- a/sw/source/ui/vba/vbarevision.cxx +++ b/sw/source/ui/vba/vbarevision.cxx @@ -25,11 +25,12 @@ #include <docsh.hxx> #include <doc.hxx> #include <IDocumentRedlineAccess.hxx> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; -SwVbaRevision::SwVbaRevision( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< beans::XPropertySet >& xRedlineProps ) : SwVbaRevision_BASE( rParent, rContext ), mxModel( xModel ), mxRedlineProps( xRedlineProps ) +SwVbaRevision::SwVbaRevision( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, uno::Reference< frame::XModel > xModel, uno::Reference< beans::XPropertySet > xRedlineProps ) : SwVbaRevision_BASE( rParent, rContext ), mxModel(std::move( xModel )), mxRedlineProps(std::move( xRedlineProps )) { } diff --git a/sw/source/ui/vba/vbarevision.hxx b/sw/source/ui/vba/vbarevision.hxx index 77561a42ddc0..c483f6578fe5 100644 --- a/sw/source/ui/vba/vbarevision.hxx +++ b/sw/source/ui/vba/vbarevision.hxx @@ -36,7 +36,7 @@ private: public: /// @throws css::uno::RuntimeException - SwVbaRevision( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::beans::XPropertySet >& xRedlineProps ); + SwVbaRevision( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, css::uno::Reference< css::frame::XModel > xModel, css::uno::Reference< css::beans::XPropertySet > xRedlineProps ); virtual ~SwVbaRevision() override; // Methods diff --git a/sw/source/ui/vba/vbarevisions.cxx b/sw/source/ui/vba/vbarevisions.cxx index b394fa1170c6..bfd8c68eaecc 100644 --- a/sw/source/ui/vba/vbarevisions.cxx +++ b/sw/source/ui/vba/vbarevisions.cxx @@ -23,6 +23,7 @@ #include <com/sun/star/document/XRedlinesSupplier.hpp> #include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/text/XTextRangeCompare.hpp> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -104,7 +105,7 @@ class RevisionsEnumeration : public EnumerationHelperImpl uno::Reference< frame::XModel > m_xModel; public: /// @throws uno::RuntimeException - RevisionsEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), m_xModel( xModel ) {} + RevisionsEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, uno::Reference< frame::XModel > xModel ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), m_xModel(std::move( xModel )) {} virtual uno::Any SAL_CALL nextElement( ) override { @@ -120,7 +121,7 @@ SwVbaRevisions::SwVbaRevisions( const uno::Reference< XHelperInterface >& xParen { } -SwVbaRevisions::SwVbaRevisions( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< container::XIndexAccess >& xIndexAccess ): SwVbaRevisions_BASE( xParent, xContext, xIndexAccess ), mxModel( xModel ) +SwVbaRevisions::SwVbaRevisions( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, uno::Reference< frame::XModel > xModel, const uno::Reference< container::XIndexAccess >& xIndexAccess ): SwVbaRevisions_BASE( xParent, xContext, xIndexAccess ), mxModel(std::move( xModel )) { } diff --git a/sw/source/ui/vba/vbarevisions.hxx b/sw/source/ui/vba/vbarevisions.hxx index 7cf2f54a5860..a3fe79108ad5 100644 --- a/sw/source/ui/vba/vbarevisions.hxx +++ b/sw/source/ui/vba/vbarevisions.hxx @@ -33,7 +33,7 @@ private: public: SwVbaRevisions( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XTextRange >& xTextRange ); - SwVbaRevisions( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess ); + SwVbaRevisions( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, css::uno::Reference< css::frame::XModel > xModel, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess ); // Methods virtual void SAL_CALL AcceptAll( ) override; diff --git a/sw/source/ui/vba/vbarow.cxx b/sw/source/ui/vba/vbarow.cxx index 6b9aa84b8d29..aa4f7701fd0c 100644 --- a/sw/source/ui/vba/vbarow.cxx +++ b/sw/source/ui/vba/vbarow.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include "vbarow.hxx" +#include <utility> #include <vbahelper/vbahelper.hxx> #include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/beans/XPropertySet.hpp> @@ -29,8 +30,8 @@ using namespace ::ooo::vba; using namespace ::com::sun::star; -SwVbaRow::SwVbaRow( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext,const uno::Reference< text::XTextTable >& xTextTable, sal_Int32 nIndex ) : - SwVbaRow_BASE( rParent, rContext ), mxTextTable( xTextTable ), mnIndex( nIndex ) +SwVbaRow::SwVbaRow( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext,uno::Reference< text::XTextTable > xTextTable, sal_Int32 nIndex ) : + SwVbaRow_BASE( rParent, rContext ), mxTextTable(std::move( xTextTable )), mnIndex( nIndex ) { mxTableRows = mxTextTable->getRows(); mxRowProps.set( mxTableRows->getByIndex( mnIndex ), uno::UNO_QUERY_THROW ); diff --git a/sw/source/ui/vba/vbarow.hxx b/sw/source/ui/vba/vbarow.hxx index 7c6e6f3ccf8b..40abaee2eee5 100644 --- a/sw/source/ui/vba/vbarow.hxx +++ b/sw/source/ui/vba/vbarow.hxx @@ -36,7 +36,7 @@ private: public: /// @throws css::uno::RuntimeException - SwVbaRow( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextTable >& xTextTable, sal_Int32 nIndex ); + SwVbaRow( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, css::uno::Reference< css::text::XTextTable > xTextTable, sal_Int32 nIndex ); virtual ~SwVbaRow() override; // Attributes diff --git a/sw/source/ui/vba/vbarows.cxx b/sw/source/ui/vba/vbarows.cxx index 5ebca8eef3b4..f5df5283b873 100644 --- a/sw/source/ui/vba/vbarows.cxx +++ b/sw/source/ui/vba/vbarows.cxx @@ -25,6 +25,7 @@ #include <ooo/vba/word/WdConstants.hpp> #include <ooo/vba/word/WdRulerStyle.hpp> #include <basic/sberrors.hxx> +#include <utility> #include "vbacolumns.hxx" #include "vbatablehelper.hxx" @@ -42,7 +43,7 @@ class RowsEnumWrapper : public EnumerationHelper_BASE sal_Int32 nIndex; public: - RowsEnumWrapper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< text::XTextTable >& xTextTable ) : mxParent( xParent ), mxContext( xContext ), mxTextTable( xTextTable ), nIndex( 0 ) + RowsEnumWrapper( const uno::Reference< XHelperInterface >& xParent, uno::Reference< uno::XComponentContext > xContext, uno::Reference< text::XTextTable > xTextTable ) : mxParent( xParent ), mxContext(std::move( xContext )), mxTextTable(std::move( xTextTable )), nIndex( 0 ) { mxIndexAccess = mxTextTable->getRows(); } @@ -63,13 +64,13 @@ public: } -SwVbaRows::SwVbaRows( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< text::XTextTable >& xTextTable, const uno::Reference< table::XTableRows >& xTableRows ) : SwVbaRows_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( xTableRows, uno::UNO_QUERY_THROW ) ), mxTextTable( xTextTable ), mxTableRows( xTableRows ) +SwVbaRows::SwVbaRows( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, uno::Reference< text::XTextTable > xTextTable, const uno::Reference< table::XTableRows >& xTableRows ) : SwVbaRows_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( xTableRows, uno::UNO_QUERY_THROW ) ), mxTextTable(std::move( xTextTable )), mxTableRows( xTableRows ) { mnStartRowIndex = 0; mnEndRowIndex = m_xIndexAccess->getCount() - 1; } -SwVbaRows::SwVbaRows( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< text::XTextTable >& xTextTable, const uno::Reference< table::XTableRows >& xTableRows, sal_Int32 nStarIndex, sal_Int32 nEndIndex ) : SwVbaRows_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( xTableRows, uno::UNO_QUERY_THROW ) ), mxTextTable( xTextTable ), mxTableRows( xTableRows ), mnStartRowIndex( nStarIndex ), mnEndRowIndex( nEndIndex ) +SwVbaRows::SwVbaRows( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, uno::Reference< text::XTextTable > xTextTable, const uno::Reference< table::XTableRows >& xTableRows, sal_Int32 nStarIndex, sal_Int32 nEndIndex ) : SwVbaRows_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( xTableRows, uno::UNO_QUERY_THROW ) ), mxTextTable(std::move( xTextTable )), mxTableRows( xTableRows ), mnStartRowIndex( nStarIndex ), mnEndRowIndex( nEndIndex ) { if( mnEndRowIndex < mnStartRowIndex ) throw uno::RuntimeException(); diff --git a/sw/source/ui/vba/vbarows.hxx b/sw/source/ui/vba/vbarows.hxx index 54e76ec920f3..98a1069fa8a4 100644 --- a/sw/source/ui/vba/vbarows.hxx +++ b/sw/source/ui/vba/vbarows.hxx @@ -47,9 +47,9 @@ private: public: /// @throws css::uno::RuntimeException - SwVbaRows( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::text::XTextTable >& xTextTable, const css::uno::Reference< css::table::XTableRows >& xTableRows ); + SwVbaRows( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, css::uno::Reference< css::text::XTextTable > xTextTable, const css::uno::Reference< css::table::XTableRows >& xTableRows ); /// @throws css::uno::RuntimeException - SwVbaRows( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::text::XTextTable >& xTextTable, const css::uno::Reference< css::table::XTableRows >& xTableRows, sal_Int32 nStarIndex, sal_Int32 nEndIndex ); + SwVbaRows( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, css::uno::Reference< css::text::XTextTable > xTextTable, const css::uno::Reference< css::table::XTableRows >& xTableRows, sal_Int32 nStarIndex, sal_Int32 nEndIndex ); // Attributes virtual ::sal_Int32 SAL_CALL getAlignment() override; diff --git a/sw/source/ui/vba/vbasection.cxx b/sw/source/ui/vba/vbasection.cxx index 4ef15bf94be0..40ecdaabd5cb 100644 --- a/sw/source/ui/vba/vbasection.cxx +++ b/sw/source/ui/vba/vbasection.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include "vbasection.hxx" +#include <utility> #include <vbahelper/vbahelper.hxx> #include "vbapagesetup.hxx" #include "vbaheadersfooters.hxx" @@ -24,8 +25,8 @@ using namespace ::ooo::vba; using namespace ::com::sun::star; -SwVbaSection::SwVbaSection( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< beans::XPropertySet >& xProps ) : - SwVbaSection_BASE( rParent, rContext ), mxModel( xModel ), mxPageProps( xProps ) +SwVbaSection::SwVbaSection( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, uno::Reference< frame::XModel > xModel, uno::Reference< beans::XPropertySet > xProps ) : + SwVbaSection_BASE( rParent, rContext ), mxModel(std::move( xModel )), mxPageProps(std::move( xProps )) { } diff --git a/sw/source/ui/vba/vbasection.hxx b/sw/source/ui/vba/vbasection.hxx index e06043ff0507..9a1b92742413 100644 --- a/sw/source/ui/vba/vbasection.hxx +++ b/sw/source/ui/vba/vbasection.hxx @@ -32,7 +32,7 @@ private: public: /// @throws css::uno::RuntimeException - SwVbaSection( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::beans::XPropertySet >& xProps ); + SwVbaSection( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, css::uno::Reference< css::frame::XModel > xModel, css::uno::Reference< css::beans::XPropertySet > xProps ); virtual ~SwVbaSection() override; // Attributes diff --git a/sw/source/ui/vba/vbasections.cxx b/sw/source/ui/vba/vbasections.cxx index 9d940416c756..fe9315ebf66d 100644 --- a/sw/source/ui/vba/vbasections.cxx +++ b/sw/source/ui/vba/vbasections.cxx @@ -23,6 +23,7 @@ #include <com/sun/star/style/XStyle.hpp> #include "wordvbahelper.hxx" #include <cppuhelper/implbase.hxx> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -63,7 +64,7 @@ private: public: /// @throws uno::RuntimeException - SectionCollectionHelper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel ) + SectionCollectionHelper( uno::Reference< XHelperInterface > xParent, uno::Reference< uno::XComponentContext > xContext, uno::Reference< frame::XModel > xModel ) : mxParent(std::move( xParent )), mxContext(std::move( xContext )), mxModel(std::move( xModel )) { uno::Reference< style::XStyleFamiliesSupplier > xSytleFamSupp( mxModel, uno::UNO_QUERY_THROW ); uno::Reference< container::XNameAccess > xSytleFamNames( xSytleFamSupp->getStyleFamilies(), uno::UNO_SET_THROW ); @@ -82,7 +83,7 @@ public: } /// @throws uno::RuntimeException - SectionCollectionHelper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XTextRange >& xTextRange ) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel ) + SectionCollectionHelper( uno::Reference< XHelperInterface > xParent, uno::Reference< uno::XComponentContext > xContext, uno::Reference< frame::XModel > xModel, const uno::Reference< text::XTextRange >& xTextRange ) : mxParent(std::move( xParent )), mxContext(std::move( xContext )), mxModel(std::move( xModel )) { // Hacky implementation of Range.Sections, only support 1 section uno::Reference< beans::XPropertySet > xRangeProps( xTextRange, uno::UNO_QUERY_THROW ); @@ -124,7 +125,7 @@ class SectionsEnumWrapper : public EnumerationHelperImpl uno::Reference< frame::XModel > mxModel; public: /// @throws uno::RuntimeException - SectionsEnumWrapper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), mxModel( xModel ){} + SectionsEnumWrapper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, uno::Reference< frame::XModel > xModel ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), mxModel(std::move( xModel )){} virtual uno::Any SAL_CALL nextElement( ) override { diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx index 18554fad1b5c..4a1e783dec34 100644 --- a/sw/source/ui/vba/vbaselection.cxx +++ b/sw/source/ui/vba/vbaselection.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include "vbaselection.hxx" +#include <utility> #include <vbahelper/vbahelper.hxx> #include "vbarange.hxx" #include "vbafind.hxx" @@ -66,7 +67,7 @@ using namespace ::ooo::vba; using namespace ::com::sun::star; -SwVbaSelection::SwVbaSelection( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< frame::XModel >& rModel ) : SwVbaSelection_BASE( rParent, rContext ), mxModel( rModel ) +SwVbaSelection::SwVbaSelection( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, uno::Reference< frame::XModel > xModel ) : SwVbaSelection_BASE( rParent, rContext ), mxModel(std::move( xModel )) { mxTextViewCursor = word::getXTextViewCursor( mxModel ); } diff --git a/sw/source/ui/vba/vbaselection.hxx b/sw/source/ui/vba/vbaselection.hxx index 322804fe0fd5..0dba75b72995 100644 --- a/sw/source/ui/vba/vbaselection.hxx +++ b/sw/source/ui/vba/vbaselection.hxx @@ -58,7 +58,7 @@ private: public: /// @throws css::uno::RuntimeException - SwVbaSelection( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& rModel ); + SwVbaSelection( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, css::uno::Reference< css::frame::XModel > xModel ); virtual ~SwVbaSelection() override; // Attribute diff --git a/sw/source/ui/vba/vbastyle.cxx b/sw/source/ui/vba/vbastyle.cxx index 830e749b681e..771e03ae3335 100644 --- a/sw/source/ui/vba/vbastyle.cxx +++ b/sw/source/ui/vba/vbastyle.cxx @@ -22,6 +22,7 @@ #include <com/sun/star/lang/Locale.hpp> #include <com/sun/star/text/XTextDocument.hpp> #include <i18nlangtag/languagetag.hxx> +#include <utility> #include "vbafont.hxx" #include "vbapalette.hxx" #include "vbaparagraphformat.hxx" @@ -30,7 +31,7 @@ using namespace ::ooo::vba; using namespace ::com::sun::star; -SwVbaStyle::SwVbaStyle( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel>& xModel, const uno::Reference< beans::XPropertySet >& _xPropertySet ) : SwVbaStyle_BASE( xParent, xContext ) , mxModel( xModel ), mxStyleProps( _xPropertySet ) +SwVbaStyle::SwVbaStyle( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, uno::Reference< frame::XModel> xModel, const uno::Reference< beans::XPropertySet >& _xPropertySet ) : SwVbaStyle_BASE( xParent, xContext ) , mxModel(std::move( xModel )), mxStyleProps( _xPropertySet ) { mxStyle.set( _xPropertySet, uno::UNO_QUERY_THROW ); } diff --git a/sw/source/ui/vba/vbastyle.hxx b/sw/source/ui/vba/vbastyle.hxx index 159b9ebf6220..dc7ae051f1a2 100644 --- a/sw/source/ui/vba/vbastyle.hxx +++ b/sw/source/ui/vba/vbastyle.hxx @@ -38,7 +38,7 @@ private: public: /// @throws css::script::BasicErrorException /// @throws css::uno::RuntimeException - SwVbaStyle( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet ); + SwVbaStyle( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, css::uno::Reference< css::frame::XModel > xModel, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet ); /// @throws css::uno::RuntimeException static void setStyle( const css::uno::Reference< css::beans::XPropertySet >& xParaProps, const css::uno::Any& xStyle ); diff --git a/sw/source/ui/vba/vbatable.cxx b/sw/source/ui/vba/vbatable.cxx index 2f219c2c669a..25e370a1c505 100644 --- a/sw/source/ui/vba/vbatable.cxx +++ b/sw/source/ui/vba/vbatable.cxx @@ -27,6 +27,7 @@ #include <com/sun/star/container/XNamed.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/table/TableBorderDistances.hpp> +#include <utility> #include "vbaborders.hxx" #include "vbapalette.hxx" #include "vbarows.hxx" @@ -40,7 +41,7 @@ using namespace ::ooo::vba; using namespace ::com::sun::star; -SwVbaTable::SwVbaTable( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& rDocument, const uno::Reference< text::XTextTable >& xTextTable) : SwVbaTable_BASE( rParent, rContext ), mxTextDocument( rDocument ) +SwVbaTable::SwVbaTable( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, uno::Reference< text::XTextDocument > xDocument, const uno::Reference< text::XTextTable >& xTextTable) : SwVbaTable_BASE( rParent, rContext ), mxTextDocument(std::move( xDocument )) { mxTextTable.set( xTextTable, uno::UNO_SET_THROW ); } diff --git a/sw/source/ui/vba/vbatable.hxx b/sw/source/ui/vba/vbatable.hxx index 0d48cd2b3b50..2bb802b5c605 100644 --- a/sw/source/ui/vba/vbatable.hxx +++ b/sw/source/ui/vba/vbatable.hxx @@ -33,7 +33,7 @@ class SwVbaTable : public SwVbaTable_BASE css::uno::Reference< css::text::XTextTable > mxTextTable; public: /// @throws css::uno::RuntimeException - SwVbaTable( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rDocument, const css::uno::Reference< css::text::XTextTable >& xTextTable); + SwVbaTable( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, css::uno::Reference< css::text::XTextDocument > xDocument, const css::uno::Reference< css::text::XTextTable >& xTextTable); virtual css::uno::Reference< ::ooo::vba::word::XRange > SAL_CALL Range( ) override; virtual void SAL_CALL Select( ) override; virtual void SAL_CALL Delete( ) override; diff --git a/sw/source/ui/vba/vbatablehelper.cxx b/sw/source/ui/vba/vbatablehelper.cxx index 2e0321a9d36c..f6892f7493e5 100644 --- a/sw/source/ui/vba/vbatablehelper.cxx +++ b/sw/source/ui/vba/vbatablehelper.cxx @@ -18,6 +18,7 @@ */ #include <comphelper/servicehelper.hxx> +#include <utility> #include <vbahelper/vbahelper.hxx> #include "vbatablehelper.hxx" #include <swtable.hxx> @@ -28,7 +29,7 @@ using namespace ::ooo::vba; #define UNO_TABLE_COLUMN_SUM 10000 -SwVbaTableHelper::SwVbaTableHelper( const uno::Reference< text::XTextTable >& xTextTable ) : mxTextTable( xTextTable ) +SwVbaTableHelper::SwVbaTableHelper( uno::Reference< text::XTextTable > xTextTable ) : mxTextTable(std::move( xTextTable )) { pTable = GetSwTable( mxTextTable ); } diff --git a/sw/source/ui/vba/vbatablehelper.hxx b/sw/source/ui/vba/vbatablehelper.hxx index 2b6fedbeb89b..5fb00cbba55f 100644 --- a/sw/source/ui/vba/vbatablehelper.hxx +++ b/sw/source/ui/vba/vbatablehelper.hxx @@ -40,7 +40,7 @@ private: public: /// @throws css::uno::RuntimeException - explicit SwVbaTableHelper( const css::uno::Reference< css::text::XTextTable >& xTextTable ); + explicit SwVbaTableHelper( css::uno::Reference< css::text::XTextTable > xTextTable ); /// @throws css::uno::RuntimeException sal_Int32 getTabColumnsCount( sal_Int32 nRowIndex ); /// @throws css::uno::RuntimeException diff --git a/sw/source/ui/vba/vbatableofcontents.cxx b/sw/source/ui/vba/vbatableofcontents.cxx index 08cb11b7ec55..e0d80cfb1c83 100644 --- a/sw/source/ui/vba/vbatableofcontents.cxx +++ b/sw/source/ui/vba/vbatableofcontents.cxx @@ -19,12 +19,13 @@ #include "vbatableofcontents.hxx" #include <com/sun/star/beans/XPropertySet.hpp> #include <ooo/vba/word/WdTabLeader.hpp> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; -SwVbaTableOfContents::SwVbaTableOfContents( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& xDoc, const uno::Reference< text::XDocumentIndex >& xDocumentIndex ) : - SwVbaTableOfContents_BASE( rParent, rContext ), mxTextDocument( xDoc ), mxDocumentIndex( xDocumentIndex ) +SwVbaTableOfContents::SwVbaTableOfContents( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, uno::Reference< text::XTextDocument > xDoc, uno::Reference< text::XDocumentIndex > xDocumentIndex ) : + SwVbaTableOfContents_BASE( rParent, rContext ), mxTextDocument(std::move( xDoc )), mxDocumentIndex(std::move( xDocumentIndex )) { mxTocProps.set( mxDocumentIndex, uno::UNO_QUERY_THROW ); } diff --git a/sw/source/ui/vba/vbatableofcontents.hxx b/sw/source/ui/vba/vbatableofcontents.hxx index effdd6c930fb..69ccd9394fe7 100644 --- a/sw/source/ui/vba/vbatableofcontents.hxx +++ b/sw/source/ui/vba/vbatableofcontents.hxx @@ -35,7 +35,7 @@ private: public: /// @throws css::uno::RuntimeException - SwVbaTableOfContents( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& xDoc, const css::uno::Reference< css::text::XDocumentIndex >& xDocumentIndex ); + SwVbaTableOfContents( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, css::uno::Reference< css::text::XTextDocument > xDoc, css::uno::Reference< css::text::XDocumentIndex > xDocumentIndex ); virtual ~SwVbaTableOfContents() override; // Attributes diff --git a/sw/source/ui/vba/vbatables.cxx b/sw/source/ui/vba/vbatables.cxx index 75e23a65dddf..03a88f248846 100644 --- a/sw/source/ui/vba/vbatables.cxx +++ b/sw/source/ui/vba/vbatables.cxx @@ -29,6 +29,7 @@ #include <com/sun/star/text/XText.hpp> #include <com/sun/star/table/XCellRange.hpp> #include <cppuhelper/implbase.hxx> +#include <utility> using namespace ::ooo::vba; using namespace css; @@ -142,7 +143,7 @@ class TableEnumerationImpl : public ::cppu::WeakImplHelper< css::container::XEnu uno::Reference< container::XIndexAccess > mxIndexAccess; sal_Int32 mnCurIndex; public: - TableEnumerationImpl( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xDocument, const uno::Reference< container::XIndexAccess >& xIndexAccess ) : mxParent( xParent ), mxContext( xContext ), mxDocument( xDocument ), mxIndexAccess( xIndexAccess ), mnCurIndex(0) + TableEnumerationImpl( uno::Reference< XHelperInterface > xParent, uno::Reference< uno::XComponentContext > xContext, uno::Reference< frame::XModel > xDocument, uno::Reference< container::XIndexAccess > xIndexAccess ) : mxParent(std::move( xParent )), mxContext(std::move( xContext )), mxDocument(std::move( xDocument )), mxIndexAccess(std::move( xIndexAccess )), mnCurIndex(0) { } virtual sal_Bool SAL_CALL hasMoreElements( ) override diff --git a/sw/source/ui/vba/vbatablesofcontents.cxx b/sw/source/ui/vba/vbatablesofcontents.cxx index b966e673e489..97e24ddb3496 100644 --- a/sw/source/ui/vba/vbatablesofcontents.cxx +++ b/sw/source/ui/vba/vbatablesofcontents.cxx @@ -23,6 +23,7 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/text/XDocumentIndexesSupplier.hpp> #include <cppuhelper/implbase.hxx> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -35,7 +36,7 @@ class TablesOfContentsEnumWrapper : public EnumerationHelper_BASE sal_Int32 nIndex; public: - explicit TablesOfContentsEnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) : mxIndexAccess( xIndexAccess ), nIndex( 0 ) + explicit TablesOfContentsEnumWrapper( uno::Reference< container::XIndexAccess > xIndexAccess ) : mxIndexAccess(std::move( xIndexAccess )), nIndex( 0 ) { } virtual sal_Bool SAL_CALL hasMoreElements( ) override @@ -64,7 +65,7 @@ private: public: /// @throws uno::RuntimeException - TableOfContentsCollectionHelper( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< text::XTextDocument >& xDoc ): mxParent( xParent ), mxContext( xContext ), mxTextDocument( xDoc ) + TableOfContentsCollectionHelper( uno::Reference< ov::XHelperInterface > xParent, uno::Reference< uno::XComponentContext > xContext, uno::Reference< text::XTextDocument > xDoc ): mxParent(std::move( xParent )), mxContext(std::move( xContext )), mxTextDocument(std::move( xDoc )) { uno::Reference< text::XDocumentIndexesSupplier > xDocIndexSupp( mxTextDocument, uno::UNO_QUERY_THROW ); uno::Reference< container::XIndexAccess > xDocIndexes = xDocIndexSupp->getDocumentIndexes(); diff --git a/sw/source/ui/vba/vbatabstops.cxx b/sw/source/ui/vba/vbatabstops.cxx index ac93903cd901..c5716c4c184c 100644 --- a/sw/source/ui/vba/vbatabstops.cxx +++ b/sw/source/ui/vba/vbatabstops.cxx @@ -25,6 +25,7 @@ #include <ooo/vba/word/WdTabAlignment.hpp> #include <basic/sberrors.hxx> #include <cppuhelper/implbase.hxx> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -51,7 +52,7 @@ class TabStopsEnumWrapper : public EnumerationHelper_BASE sal_Int32 nIndex; public: - explicit TabStopsEnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) : mxIndexAccess( xIndexAccess ), nIndex( 0 ) + explicit TabStopsEnumWrapper( uno::Reference< container::XIndexAccess > xIndexAccess ) : mxIndexAccess(std::move( xIndexAccess )), nIndex( 0 ) { } virtual sal_Bool SAL_CALL hasMoreElements( ) override @@ -79,7 +80,7 @@ private: public: /// @throws css::uno::RuntimeException - TabStopCollectionHelper( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& xParaProps ): mxParent( xParent ), mxContext( xContext ), mnTabStops(lcl_getTabStops( xParaProps ).getLength()) + TabStopCollectionHelper( css::uno::Reference< ov::XHelperInterface > xParent, css::uno::Reference< css::uno::XComponentContext > xContext, const css::uno::Reference< css::beans::XPropertySet >& xParaProps ): mxParent(std::move( xParent )), mxContext(std::move( xContext )), mnTabStops(lcl_getTabStops( xParaProps ).getLength()) { } diff --git a/sw/source/ui/vba/vbatemplate.cxx b/sw/source/ui/vba/vbatemplate.cxx index 94cdcf56c12b..6b8a4526a3a5 100644 --- a/sw/source/ui/vba/vbatemplate.cxx +++ b/sw/source/ui/vba/vbatemplate.cxx @@ -23,6 +23,7 @@ #include <tools/urlobj.hxx> #include <rtl/character.hxx> #include <osl/file.hxx> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -44,8 +45,8 @@ static OUString lcl_CheckGroupName( const OUString& rGroupName ) return sRet.makeStringAndClear(); } -SwVbaTemplate::SwVbaTemplate( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const OUString& rFullUrl ) - : SwVbaTemplate_BASE( rParent, rContext ), msFullUrl( rFullUrl ) +SwVbaTemplate::SwVbaTemplate( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, OUString aFullUrl ) + : SwVbaTemplate_BASE( rParent, rContext ), msFullUrl(std::move( aFullUrl )) { } diff --git a/sw/source/ui/vba/vbatemplate.hxx b/sw/source/ui/vba/vbatemplate.hxx index 5765c06a8ee5..146684b18cf7 100644 --- a/sw/source/ui/vba/vbatemplate.hxx +++ b/sw/source/ui/vba/vbatemplate.hxx @@ -30,7 +30,7 @@ private: OUString msFullUrl; public: SwVbaTemplate( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, - const OUString& ); + OUString ); virtual ~SwVbaTemplate() override; // XTemplate diff --git a/sw/source/ui/vba/vbavariable.cxx b/sw/source/ui/vba/vbavariable.cxx index 525225c675b3..dea82686e1b3 100644 --- a/sw/source/ui/vba/vbavariable.cxx +++ b/sw/source/ui/vba/vbavariable.cxx @@ -19,13 +19,14 @@ #include "vbavariable.hxx" #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/PropertyValue.hpp> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; SwVbaVariable::SwVbaVariable( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, - const uno::Reference< beans::XPropertyAccess >& rUserDefined, const OUString& rVariableName ) : - SwVbaVariable_BASE( rParent, rContext ), mxUserDefined( rUserDefined ), maVariableName( rVariableName ) + uno::Reference< beans::XPropertyAccess > xUserDefined, OUString aVariableName ) : + SwVbaVariable_BASE( rParent, rContext ), mxUserDefined(std::move( xUserDefined )), maVariableName(std::move( aVariableName )) { } diff --git a/sw/source/ui/vba/vbavariable.hxx b/sw/source/ui/vba/vbavariable.hxx index a278ed16d2b6..6b3ab37c787c 100644 --- a/sw/source/ui/vba/vbavariable.hxx +++ b/sw/source/ui/vba/vbavariable.hxx @@ -34,7 +34,7 @@ private: public: /// @throws css::uno::RuntimeException SwVbaVariable( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, - const css::uno::Reference< css::beans::XPropertyAccess >& rUserDefined, const OUString& rName ); + css::uno::Reference< css::beans::XPropertyAccess > xUserDefined, OUString aName ); virtual ~SwVbaVariable() override; // XVariable diff --git a/sw/source/ui/vba/vbaview.cxx b/sw/source/ui/vba/vbaview.cxx index cb3c40321935..1e620cc5c56a 100644 --- a/sw/source/ui/vba/vbaview.cxx +++ b/sw/source/ui/vba/vbaview.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include "vbaview.hxx" +#include <utility> #include <vbahelper/vbahelper.hxx> #include <basic/sberrors.hxx> #include <com/sun/star/beans/XPropertySet.hpp> @@ -44,8 +45,8 @@ using namespace ::com::sun::star; const sal_Int32 DEFAULT_BODY_DISTANCE = 500; SwVbaView::SwVbaView( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, - const uno::Reference< frame::XModel >& rModel ) : - SwVbaView_BASE( rParent, rContext ), mxModel( rModel ) + uno::Reference< frame::XModel > xModel ) : + SwVbaView_BASE( rParent, rContext ), mxModel(std::move( xModel )) { uno::Reference< frame::XController > xController = mxModel->getCurrentController(); diff --git a/sw/source/ui/vba/vbaview.hxx b/sw/source/ui/vba/vbaview.hxx index 9921fb3c3763..7ac6003ddfc3 100644 --- a/sw/source/ui/vba/vbaview.hxx +++ b/sw/source/ui/vba/vbaview.hxx @@ -41,7 +41,7 @@ private: public: /// @throws css::uno::RuntimeException SwVbaView( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, - const css::uno::Reference< css::frame::XModel >& rModel ); + css::uno::Reference< css::frame::XModel > xModel ); virtual ~SwVbaView() override; // XView diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index a891a53daa90..0ff18faa34d9 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -50,6 +50,7 @@ #include <numrule.hxx> #include <swundo.hxx> #include <svx/drawitem.hxx> +#include <utility> #include <view.hxx> #include <wrtsh.hxx> #include <docsh.hxx> @@ -540,16 +541,16 @@ class ApplyStyle { public: ApplyStyle(SwDocShell &rDocSh, bool bNew, - rtl::Reference< SwDocStyleSheet > const & xTmp, + rtl::Reference< SwDocStyleSheet > xTmp, SfxStyleFamily nFamily, SfxAbstractApplyTabDialog *pDlg, - rtl::Reference< SfxStyleSheetBasePool > const & xBasePool, + rtl::Reference< SfxStyleSheetBasePool > xBasePool, bool bModified) : m_pDlg(pDlg) , m_rDocSh(rDocSh) , m_bNew(bNew) - , m_xTmp(xTmp) + , m_xTmp(std::move(xTmp)) , m_nFamily(nFamily) - , m_xBasePool(xBasePool) + , m_xBasePool(std::move(xBasePool)) , m_bModified(bModified) { } diff --git a/sw/source/uibase/config/uinums.cxx b/sw/source/uibase/config/uinums.cxx index 71e68f558e57..2659a1bb3b05 100644 --- a/sw/source/uibase/config/uinums.cxx +++ b/sw/source/uibase/config/uinums.cxx @@ -26,6 +26,7 @@ #include <svl/itemiter.hxx> #include <swtypes.hxx> +#include <utility> #include <wrtsh.hxx> #include <poolfmt.hxx> #include <charfmt.hxx> @@ -104,8 +105,8 @@ void SwChapterNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, sal_uInt1 } SwNumRulesWithName::SwNumRulesWithName( const SwNumRule &rCopy, - const OUString &rName ) - : maName(rName) + OUString aName ) + : maName(std::move(aName)) { for( sal_uInt16 n = 0; n < MAXLEVEL; ++n ) { diff --git a/sw/source/uibase/dbui/maildispatcher.cxx b/sw/source/uibase/dbui/maildispatcher.cxx index 4bde20e97965..8af9b1800711 100644 --- a/sw/source/uibase/dbui/maildispatcher.cxx +++ b/sw/source/uibase/dbui/maildispatcher.cxx @@ -23,6 +23,7 @@ #include <algorithm> #include <com/sun/star/mail/MailException.hpp> +#include <utility> #include <osl/diagnose.h> using namespace ::com::sun::star; @@ -34,8 +35,8 @@ namespace /* private */ class MailDeliveryNotifier { public: - MailDeliveryNotifier(uno::Reference<mail::XMailMessage> const & message) : - message_(message) + MailDeliveryNotifier(uno::Reference<mail::XMailMessage> message) : + message_(std::move(message)) {} void operator() (::rtl::Reference<IMailDispatcherListener> const & listener) const @@ -49,12 +50,12 @@ namespace /* private */ { public: MailDeliveryErrorNotifier( - ::rtl::Reference<MailDispatcher> const & xMailDispatcher, - uno::Reference<mail::XMailMessage> const & message, - const OUString& error_message) : - m_mail_dispatcher(xMailDispatcher), - m_message(message), - m_error_message(error_message) + ::rtl::Reference<MailDispatcher> xMailDispatcher, + uno::Reference<mail::XMailMessage> message, + OUString error_message) : + m_mail_dispatcher(std::move(xMailDispatcher)), + m_message(std::move(message)), + m_error_message(std::move(error_message)) {} void operator() (::rtl::Reference<IMailDispatcherListener> const & listener) const @@ -68,8 +69,8 @@ namespace /* private */ } // namespace private -MailDispatcher::MailDispatcher(uno::Reference<mail::XSmtpService> const & mailserver) : - m_xMailserver( mailserver ), +MailDispatcher::MailDispatcher(uno::Reference<mail::XSmtpService> mailserver) : + m_xMailserver(std::move( mailserver )), m_bActive( false ), m_bShutdownRequested( false ) { diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx index 5eadf3dc9276..5ad702e73ad9 100644 --- a/sw/source/uibase/dbui/mailmergehelper.cxx +++ b/sw/source/uibase/dbui/mailmergehelper.cxx @@ -33,6 +33,7 @@ #include <com/sun/star/mail/XSmtpService.hpp> #include <comphelper/processfactory.hxx> #include <o3tl/safeint.hxx> +#include <utility> #include <vcl/event.hxx> #include <vcl/settings.hxx> #include <vcl/weldutils.hxx> @@ -590,11 +591,11 @@ OUString SwAuthenticator::getPassword( ) } SwConnectionContext::SwConnectionContext( - const OUString& rMailServer, sal_Int16 nPort, - const OUString& rConnectionType) : - m_sMailServer(rMailServer), + OUString aMailServer, sal_Int16 nPort, + OUString aConnectionType) : + m_sMailServer(std::move(aMailServer)), m_nPort(nPort), - m_sConnectionType(rConnectionType) + m_sConnectionType(std::move(aConnectionType)) { } @@ -630,20 +631,20 @@ void SwConnectionListener::disposing(const lang::EventObject& /*aEvent*/) { } -SwMailTransferable::SwMailTransferable(const OUString& rBody, const OUString& rMimeType) : +SwMailTransferable::SwMailTransferable(OUString aBody, OUString aMimeType) : cppu::WeakComponentImplHelper< datatransfer::XTransferable, beans::XPropertySet >(m_aMutex), - m_aMimeType( rMimeType ), - m_sBody( rBody ), + m_aMimeType(std::move( aMimeType )), + m_sBody(std::move( aBody )), m_bIsBody( true ) { } -SwMailTransferable::SwMailTransferable(const OUString& rURL, - const OUString& rName, const OUString& rMimeType) : +SwMailTransferable::SwMailTransferable(OUString aURL, + OUString aName, OUString aMimeType) : cppu::WeakComponentImplHelper< datatransfer::XTransferable, beans::XPropertySet >(m_aMutex), - m_aMimeType( rMimeType ), - m_aURL(rURL), - m_aName( rName ), + m_aMimeType(std::move( aMimeType )), + m_aURL(std::move(aURL)), + m_aName(std::move( aName )), m_bIsBody( false ) { } diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx index 3846bdb3e1c5..c276f59ac6ce 100644 --- a/sw/source/uibase/dochdl/gloshdl.cxx +++ b/sw/source/uibase/dochdl/gloshdl.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <utility> #include <vcl/errinf.hxx> #include <vcl/weld.hxx> #include <svl/macitem.hxx> @@ -58,8 +59,8 @@ struct TextBlockInfo_Impl OUString sTitle; OUString sLongName; OUString sGroupName; - TextBlockInfo_Impl(OUString const& rTitle, OUString const& rLongName, OUString const& rGroupName) - : sTitle(rTitle), sLongName(rLongName), sGroupName(rGroupName) {} + TextBlockInfo_Impl(OUString aTitle, OUString aLongName, OUString aGroupName) + : sTitle(std::move(aTitle)), sLongName(std::move(aLongName)), sGroupName(std::move(aGroupName)) {} }; } diff --git a/sw/source/uibase/docvw/AnchorOverlayObject.cxx b/sw/source/uibase/docvw/AnchorOverlayObject.cxx index a5e9cb3535a8..4cbb0e6ada13 100644 --- a/sw/source/uibase/docvw/AnchorOverlayObject.cxx +++ b/sw/source/uibase/docvw/AnchorOverlayObject.cxx @@ -21,6 +21,7 @@ #include <SidebarWindowsConsts.hxx> #include <swrect.hxx> +#include <utility> #include <view.hxx> #include <svx/sdrpaintwindow.hxx> #include <svx/svdview.hxx> @@ -59,16 +60,16 @@ protected: const drawinglayer::geometry::ViewInformation2D& rViewInformation) const override; public: - AnchorPrimitive( const basegfx::B2DPolygon& rTriangle, - const basegfx::B2DPolygon& rLine, - const basegfx::B2DPolygon& rLineTop, + AnchorPrimitive( basegfx::B2DPolygon aTriangle, + basegfx::B2DPolygon aLine, + basegfx::B2DPolygon aLineTop, AnchorState aAnchorState, const basegfx::BColor& rColor, double fDiscreteLineWidth, bool bLineSolid ) - : maTriangle(rTriangle), - maLine(rLine), - maLineTop(rLineTop), + : maTriangle(std::move(aTriangle)), + maLine(std::move(aLine)), + maLineTop(std::move(aLineTop)), maAnchorState(aAnchorState), maColor(rColor), mfDiscreteLineWidth(fDiscreteLineWidth), diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index 92d1d75d4cd4..ac132eae55cb 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -32,6 +32,7 @@ #include "AnchorOverlayObject.hxx" #include "ShadowOverlayObject.hxx" +#include <utility> #include <vcl/svapp.hxx> #include <vcl/outdev.hxx> #include <vcl/settings.hxx> @@ -1356,8 +1357,8 @@ class IsPostitFieldWithAuthorOf : public FilterFunctor { OUString m_sAuthor; public: - explicit IsPostitFieldWithAuthorOf(const OUString &rAuthor) - : m_sAuthor(rAuthor) + explicit IsPostitFieldWithAuthorOf(OUString aAuthor) + : m_sAuthor(std::move(aAuthor)) { } bool operator()(const SwFormatField* pField) const override diff --git a/sw/source/uibase/frmdlg/frmmgr.cxx b/sw/source/uibase/frmdlg/frmmgr.cxx index 50ce75e7b7e0..e6d788f0e6c9 100644 --- a/sw/source/uibase/frmdlg/frmmgr.cxx +++ b/sw/source/uibase/frmdlg/frmmgr.cxx @@ -31,6 +31,7 @@ #include <comphelper/classids.hxx> #include <osl/diagnose.h> #include <fmtclds.hxx> +#include <utility> #include <wrtsh.hxx> #include <view.hxx> #include <viewopt.hxx> @@ -117,8 +118,8 @@ SwFlyFrameAttrMgr::SwFlyFrameAttrMgr( bool bNew, SwWrtShell* pSh, Frmmgr_Type nT ::PrepareBoxInfo( m_aSet, *m_pOwnSh ); } -SwFlyFrameAttrMgr::SwFlyFrameAttrMgr( bool bNew, SwWrtShell* pSh, const SfxItemSet &rSet ) : - m_aSet( rSet ), +SwFlyFrameAttrMgr::SwFlyFrameAttrMgr( bool bNew, SwWrtShell* pSh, SfxItemSet aSet ) : + m_aSet(std::move( aSet )), m_pOwnSh( pSh ), m_bAbsPos( false ), m_bNewFrame( bNew ), diff --git a/sw/source/uibase/inc/content.hxx b/sw/source/uibase/inc/content.hxx index 0acc45197e76..f7666e97244b 100644 --- a/sw/source/uibase/inc/content.hxx +++ b/sw/source/uibase/inc/content.hxx @@ -23,6 +23,7 @@ #include <ndarr.hxx> #include <tools/long.hxx> +#include <utility> class SwWrtShell; class SwContentArr; @@ -78,10 +79,10 @@ class SwURLFieldContent final : public SwContent public: SwURLFieldContent( const SwContentType* pCnt, const OUString& rName, - const OUString& rURL, + OUString aURL, const SwTextINetFormat* pAttr, tools::Long nYPos ) - : SwContent( pCnt, rName, nYPos ), m_sURL( rURL ), m_pINetAttr( pAttr ) + : SwContent( pCnt, rName, nYPos ), m_sURL(std::move( aURL )), m_pINetAttr( pAttr ) {} virtual bool IsProtect() const override; @@ -140,8 +141,8 @@ class SwGraphicContent final : public SwContent { OUString m_sLink; public: - SwGraphicContent(const SwContentType* pCnt, const OUString& rName, const OUString& rLink, tools::Long nYPos) - : SwContent( pCnt, rName, nYPos ), m_sLink( rLink ) + SwGraphicContent(const SwContentType* pCnt, const OUString& rName, OUString aLink, tools::Long nYPos) + : SwContent( pCnt, rName, nYPos ), m_sLink(std::move( aLink )) {} virtual ~SwGraphicContent() override; diff --git a/sw/source/uibase/inc/dbinsdlg.hxx b/sw/source/uibase/inc/dbinsdlg.hxx index be1496229f91..fbef5f1f0252 100644 --- a/sw/source/uibase/inc/dbinsdlg.hxx +++ b/sw/source/uibase/inc/dbinsdlg.hxx @@ -20,6 +20,7 @@ #ifndef INCLUDED_SW_SOURCE_UIBASE_INC_DBINSDLG_HXX #define INCLUDED_SW_SOURCE_UIBASE_INC_DBINSDLG_HXX +#include <utility> #include <vcl/weld.hxx> #include <sfx2/basedlgs.hxx> #include <unotools/configitem.hxx> @@ -60,8 +61,8 @@ struct SwInsDBColumn bool bHasFormat : 1; bool bIsDBFormat : 1; - SwInsDBColumn( const OUString& rStr ) - : sColumn( rStr ), + SwInsDBColumn( OUString aStr ) + : sColumn(std::move( aStr )), nDBNumFormat( 0 ), nUsrNumFormat( 0 ), eUsrNumFormatLng( LANGUAGE_SYSTEM ), @@ -145,7 +146,7 @@ public: SwInsertDBColAutoPilot( SwView& rView, css::uno::Reference< css::sdbc::XDataSource> const & rxSource, css::uno::Reference<css::sdbcx::XColumnsSupplier> const & xColSupp, - const SwDBData& rData ); + SwDBData aData ); virtual ~SwInsertDBColAutoPilot() override; diff --git a/sw/source/uibase/inc/fldmgr.hxx b/sw/source/uibase/inc/fldmgr.hxx index c62d5cb00c97..4bf88db3c3f3 100644 --- a/sw/source/uibase/inc/fldmgr.hxx +++ b/sw/source/uibase/inc/fldmgr.hxx @@ -26,6 +26,7 @@ #include <com/sun/star/uno/Any.h> #include <memory> #include <optional> +#include <utility> #include <vector> namespace com::sun::star{ @@ -83,12 +84,12 @@ struct SwInsertField_Data /// Marks the PostIt field's annotation start/end if it differs from the cursor selection. std::optional<SwPaM> m_oAnnotationRange; - SwInsertField_Data(SwFieldTypesEnum nType, sal_uInt16 nSub, const OUString& rPar1, const OUString& rPar2, + SwInsertField_Data(SwFieldTypesEnum nType, sal_uInt16 nSub, OUString aPar1, OUString aPar2, sal_uInt32 nFormatId, SwWrtShell* pShell = nullptr, sal_Unicode cSep = ' ', bool bIsAutoLanguage = true) : m_nTypeId(nType), m_nSubType(nSub), - m_sPar1(rPar1), - m_sPar2(rPar2), + m_sPar1(std::move(aPar1)), + m_sPar2(std::move(aPar2)), m_nFormatId(nFormatId), m_pSh(pShell), m_cSeparator(cSep), diff --git a/sw/source/uibase/inc/frmmgr.hxx b/sw/source/uibase/inc/frmmgr.hxx index 92e23853f139..9368766e43a3 100644 --- a/sw/source/uibase/inc/frmmgr.hxx +++ b/sw/source/uibase/inc/frmmgr.hxx @@ -71,7 +71,7 @@ public: SwFlyFrameAttrMgr( bool bNew, SwWrtShell* pSh, Frmmgr_Type nType, const SvGlobalName* pName ); //CopyCtor for dialogs to check the metrics - SwFlyFrameAttrMgr( bool bNew, SwWrtShell *pSh, const SfxItemSet &rSet ); + SwFlyFrameAttrMgr( bool bNew, SwWrtShell *pSh, SfxItemSet aSet ); void SetAnchor(RndStdIds eId); inline RndStdIds GetAnchor() const; diff --git a/sw/source/uibase/inc/maildispatcher.hxx b/sw/source/uibase/inc/maildispatcher.hxx index 5fd862d36331..e0cdd3a751d2 100644 --- a/sw/source/uibase/inc/maildispatcher.hxx +++ b/sw/source/uibase/inc/maildispatcher.hxx @@ -59,7 +59,7 @@ public: @throws css::uno::RuntimeException on errors during construction of an instance of this class. */ - MailDispatcher(css::uno::Reference<css::mail::XSmtpService> const& xMailService); + MailDispatcher(css::uno::Reference<css::mail::XSmtpService> xMailService); /** Shutdown the mail dispatcher. Every mail messages diff --git a/sw/source/uibase/inc/mailmergehelper.hxx b/sw/source/uibase/inc/mailmergehelper.hxx index 8d7d33de96af..6eb0a8f1c4b4 100644 --- a/sw/source/uibase/inc/mailmergehelper.hxx +++ b/sw/source/uibase/inc/mailmergehelper.hxx @@ -29,6 +29,7 @@ #include <cppuhelper/basemutex.hxx> #include <cppuhelper/implbase.hxx> #include <cppuhelper/compbase.hxx> +#include <utility> #include <vcl/customweld.hxx> #include <vcl/weld.hxx> #include <rtl/ustring.hxx> @@ -126,8 +127,8 @@ class SW_DLLPUBLIC SwAddressIterator { OUString m_sAddress; public: - SwAddressIterator(const OUString& rAddress) : - m_sAddress(rAddress) + SwAddressIterator(OUString aAddress) : + m_sAddress(std::move(aAddress)) {} SwMergeAddressItem Next(); @@ -144,9 +145,9 @@ public: SwAuthenticator() : m_pParentWindow(nullptr) {} - SwAuthenticator(const OUString& username, const OUString& password, weld::Window* pParent) - : m_aUserName(username) - , m_aPassword(password) + SwAuthenticator(OUString username, OUString password, weld::Window* pParent) + : m_aUserName(std::move(username)) + , m_aPassword(std::move(password)) , m_pParentWindow(pParent) {} virtual ~SwAuthenticator() override; @@ -163,7 +164,7 @@ class SW_DLLPUBLIC SwConnectionContext final : public cppu::WeakImplHelper<css:: OUString m_sConnectionType; public: - SwConnectionContext(const OUString& rMailServer, sal_Int16 nPort, const OUString& rConnectionType); + SwConnectionContext(OUString aMailServer, sal_Int16 nPort, OUString aConnectionType); virtual ~SwConnectionContext() override; virtual css::uno::Any SAL_CALL getValueByName(const OUString& Name) override; @@ -199,8 +200,8 @@ class SW_DLLPUBLIC SwMailTransferable final : bool m_bIsBody; public: - SwMailTransferable(const OUString& rURL, const OUString& rName, const OUString& rMimeType); - SwMailTransferable(const OUString& rBody, const OUString& rMimeType); + SwMailTransferable(OUString aURL, OUString aName, OUString aMimeType); + SwMailTransferable(OUString aBody, OUString aMimeType); virtual ~SwMailTransferable() override; virtual css::uno::Any SAL_CALL getTransferData(const css::datatransfer::DataFlavor& aFlavor) override; diff --git a/sw/source/uibase/inc/mailmergewizard.hxx b/sw/source/uibase/inc/mailmergewizard.hxx index 657341cf307c..aabccbb887a0 100644 --- a/sw/source/uibase/inc/mailmergewizard.hxx +++ b/sw/source/uibase/inc/mailmergewizard.hxx @@ -59,7 +59,7 @@ class SwMailMergeWizard final : public ::vcl::RoadmapWizardMachine virtual OUString getStateDisplayName( WizardState _nState ) const override; public: - SwMailMergeWizard(SwView& rView, std::shared_ptr<SwMailMergeConfigItem> const & rConfigItem); + SwMailMergeWizard(SwView& rView, std::shared_ptr<SwMailMergeConfigItem> xConfigItem); virtual ~SwMailMergeWizard() override; SwView* GetSwView() {return m_pSwView;} diff --git a/sw/source/uibase/inc/navicont.hxx b/sw/source/uibase/inc/navicont.hxx index e6ee7e30fc6b..f8c81ae3dcef 100644 --- a/sw/source/uibase/inc/navicont.hxx +++ b/sw/source/uibase/inc/navicont.hxx @@ -41,7 +41,7 @@ class NaviContentBookmark public: NaviContentBookmark(); - NaviContentBookmark( const OUString &rUrl, const OUString& rDesc, + NaviContentBookmark( OUString aUrl, OUString aDesc, RegionMode nDragType, const SwDocShell* ); const OUString& GetURL() const { return m_aUrl; } diff --git a/sw/source/uibase/inc/olmenu.hxx b/sw/source/uibase/inc/olmenu.hxx index b5d8e59d7e5f..fc043046c93e 100644 --- a/sw/source/uibase/inc/olmenu.hxx +++ b/sw/source/uibase/inc/olmenu.hxx @@ -111,7 +111,7 @@ class SW_DLLPUBLIC SwSpellPopup public: SwSpellPopup( SwWrtShell *pWrtSh, - const css::uno::Reference< css::linguistic2::XSpellAlternatives > &xAlt, + css::uno::Reference< css::linguistic2::XSpellAlternatives > xAlt, const OUString & rParaText ); SwSpellPopup( SwWrtShell *pWrtSh, diff --git a/sw/source/uibase/inc/optload.hxx b/sw/source/uibase/inc/optload.hxx index 9b8c7c475995..17964daa63ef 100644 --- a/sw/source/uibase/inc/optload.hxx +++ b/sw/source/uibase/inc/optload.hxx @@ -23,6 +23,7 @@ #include <tools/solar.h> #include <sfx2/tabdlg.hxx> +#include <utility> #include <vcl/customweld.hxx> #include <vcl/textfilter.hxx> #include <vcl/weld.hxx> @@ -47,8 +48,8 @@ private: OUString m_sLastGoodText; OUString m_sNone; public: - TextFilterAutoConvert(const OUString &rNone) - : m_sNone(rNone) + TextFilterAutoConvert(OUString aNone) + : m_sNone(std::move(aNone)) { } virtual OUString filter(const OUString &rText) override; diff --git a/sw/source/uibase/inc/redlndlg.hxx b/sw/source/uibase/inc/redlndlg.hxx index c91bb468a808..36be9513a932 100644 --- a/sw/source/uibase/inc/redlndlg.hxx +++ b/sw/source/uibase/inc/redlndlg.hxx @@ -105,7 +105,7 @@ class SW_DLLPUBLIC SwRedlineAcceptDlg final SwRedlineAcceptDlg& operator=(SwRedlineAcceptDlg const&) = delete; public: - SwRedlineAcceptDlg(const std::shared_ptr<weld::Window>& rParent, weld::Builder *pBuilder, weld::Container *pContentArea, bool bAutoFormat = false); + SwRedlineAcceptDlg(std::shared_ptr<weld::Window> xParent, weld::Builder *pBuilder, weld::Container *pContentArea, bool bAutoFormat = false); ~SwRedlineAcceptDlg(); DECL_LINK( FilterChangedHdl, SvxTPFilter*, void ); diff --git a/sw/source/uibase/inc/swcont.hxx b/sw/source/uibase/inc/swcont.hxx index 77b9d5656030..b29489f098c3 100644 --- a/sw/source/uibase/inc/swcont.hxx +++ b/sw/source/uibase/inc/swcont.hxx @@ -81,7 +81,7 @@ class SwContent : public SwTypeNumber // the index in its subtree bool m_bInvisible; public: - SwContent(const SwContentType* pCnt, const OUString& rName, double nYPos); + SwContent(const SwContentType* pCnt, OUString aName, double nYPos); virtual bool IsProtect() const; const SwContentType* GetParent() const {return m_pParent;} diff --git a/sw/source/uibase/inc/swuiidxmrk.hxx b/sw/source/uibase/inc/swuiidxmrk.hxx index 1c4a38e0fcf3..07fc7a54c8e6 100644 --- a/sw/source/uibase/inc/swuiidxmrk.hxx +++ b/sw/source/uibase/inc/swuiidxmrk.hxx @@ -124,7 +124,7 @@ class SwIndexMarkPane public: - SwIndexMarkPane(const std::shared_ptr<weld::Dialog>& rDialog, weld::Builder& rBuilder, + SwIndexMarkPane(std::shared_ptr<weld::Dialog> xDialog, weld::Builder& rBuilder, bool bNewDlg, SwWrtShell* pWrtShell); ~SwIndexMarkPane(); diff --git a/sw/source/uibase/inc/uinums.hxx b/sw/source/uibase/inc/uinums.hxx index 54dd1c2a0f4b..b0c49b0ca2cb 100644 --- a/sw/source/uibase/inc/uinums.hxx +++ b/sw/source/uibase/inc/uinums.hxx @@ -65,7 +65,7 @@ class SW_DLLPUBLIC SwNumRulesWithName final SwNumRulesWithName() = default; public: - SwNumRulesWithName(const SwNumRule &, const OUString &); + SwNumRulesWithName(const SwNumRule &, OUString ); SwNumRulesWithName( const SwNumRulesWithName & ); ~SwNumRulesWithName(); diff --git a/sw/source/uibase/inc/unoatxt.hxx b/sw/source/uibase/inc/unoatxt.hxx index 9c566c2253f6..1526c06570a4 100644 --- a/sw/source/uibase/inc/unoatxt.hxx +++ b/sw/source/uibase/inc/unoatxt.hxx @@ -195,7 +195,7 @@ class SwXAutoTextEntry final virtual ~SwXAutoTextEntry() override; // ref-counted objects are not to be deleted from outside -> protected dtor public: - SwXAutoTextEntry(SwGlossaries* , const OUString& rGroupName, const OUString& rEntryName); + SwXAutoTextEntry(SwGlossaries* , OUString aGroupName, OUString aEntryName); static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId(); diff --git a/sw/source/uibase/inc/workctrl.hxx b/sw/source/uibase/inc/workctrl.hxx index 5da3c344351c..c10e811f7c0f 100644 --- a/sw/source/uibase/inc/workctrl.hxx +++ b/sw/source/uibase/inc/workctrl.hxx @@ -103,7 +103,7 @@ class NavElementBox_Base { public: NavElementBox_Base(std::unique_ptr<weld::ComboBox> xComboBox, - const uno::Reference<frame::XFrame>& xFrame); + uno::Reference<frame::XFrame> xFrame); virtual ~NavElementBox_Base() {} diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx index 9c4865fc8b2a..b7dc2e106221 100644 --- a/sw/source/uibase/lingu/olmenu.cxx +++ b/sw/source/uibase/lingu/olmenu.cxx @@ -29,6 +29,7 @@ #include <swmodule.hxx> #include <swtypes.hxx> #include <swundo.hxx> +#include <utility> #include <view.hxx> #include <wrtsh.hxx> @@ -195,7 +196,7 @@ void SwSpellPopup::fillLangPopupMenu( SwSpellPopup::SwSpellPopup( SwWrtShell* pWrtSh, - const uno::Reference< linguistic2::XSpellAlternatives > &xAlt, + uno::Reference< linguistic2::XSpellAlternatives > xAlt, const OUString &rParaText) : m_aBuilder(nullptr, AllSettings::GetUIRootDir(), "modules/swriter/ui/spellmenu.ui", "") , m_xPopupMenu(m_aBuilder.get_menu("menu")) @@ -212,7 +213,7 @@ SwSpellPopup::SwSpellPopup( , m_nRedlineNextId(m_xPopupMenu->GetItemId("next")) , m_nRedlinePrevId(m_xPopupMenu->GetItemId("prev")) , m_pSh( pWrtSh ) - , m_xSpellAlt(xAlt) + , m_xSpellAlt(std::move(xAlt)) , m_bGrammarResults(false) { OSL_ENSURE(m_xSpellAlt.is(), "no spelling alternatives available"); diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx index df1dd5feedff..8d23639aefb3 100644 --- a/sw/source/uibase/misc/redlndlg.cxx +++ b/sw/source/uibase/misc/redlndlg.cxx @@ -25,6 +25,7 @@ #include <sfx2/dispatch.hxx> #include <svx/ctredlin.hxx> #include <svx/postattr.hxx> +#include <utility> #include <vcl/commandevent.hxx> #include <swtypes.hxx> #include <wrtsh.hxx> @@ -137,9 +138,9 @@ SwModelessRedlineAcceptDlg::~SwModelessRedlineAcceptDlg() { } -SwRedlineAcceptDlg::SwRedlineAcceptDlg(const std::shared_ptr<weld::Window>& rParent, weld::Builder *pBuilder, +SwRedlineAcceptDlg::SwRedlineAcceptDlg(std::shared_ptr<weld::Window> xParent, weld::Builder *pBuilder, weld::Container *pContentArea, bool bAutoFormat) - : m_xParentDlg(rParent) + : m_xParentDlg(std::move(xParent)) , m_aSelectTimer("SwRedlineAcceptDlg m_aSelectTimer") , m_sInserted(SwResId(STR_REDLINE_INSERTED)) , m_sDeleted(SwResId(STR_REDLINE_DELETED)) diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx index e65a376f7592..d72f6c3b2381 100644 --- a/sw/source/uibase/ribbar/workctrl.cxx +++ b/sw/source/uibase/ribbar/workctrl.cxx @@ -23,6 +23,7 @@ #include <sfx2/dispatch.hxx> #include <sfx2/bindings.hxx> #include <swmodule.hxx> +#include <utility> #include <view.hxx> #include <initui.hxx> #include <docsh.hxx> @@ -583,9 +584,9 @@ VclPtr<InterimItemWindow> SwJumpToSpecificPageControl::CreateItemWindow( vcl::Wi } NavElementBox_Base::NavElementBox_Base(std::unique_ptr<weld::ComboBox> xComboBox, - const uno::Reference<frame::XFrame>& xFrame) + uno::Reference<frame::XFrame> xFrame) : m_xComboBox(std::move(xComboBox)) - ,m_xFrame(xFrame) + ,m_xFrame(std::move(xFrame)) ,m_bRelease(true) { m_xComboBox->set_size_request(150, -1); diff --git a/sw/source/uibase/sidebar/StylePresetsPanel.hxx b/sw/source/uibase/sidebar/StylePresetsPanel.hxx index 75a6cb3c4e0e..f91268886332 100644 --- a/sw/source/uibase/sidebar/StylePresetsPanel.hxx +++ b/sw/source/uibase/sidebar/StylePresetsPanel.hxx @@ -15,6 +15,7 @@ #include <sfx2/sidebar/PanelLayout.hxx> #include <sfx2/sidebar/ControllerItem.hxx> #include <svtools/valueset.hxx> +#include <utility> namespace sw::sidebar { @@ -39,8 +40,8 @@ public: private: struct TemplateEntry { - explicit TemplateEntry(const OUString& rURL) - : maURL(rURL) + explicit TemplateEntry(OUString aURL) + : maURL(std::move(aURL)) {} OUString maURL; diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx b/sw/source/uibase/sidebar/ThemePanel.cxx index 6a13accc32a8..d6517d6a84ad 100644 --- a/sw/source/uibase/sidebar/ThemePanel.cxx +++ b/sw/source/uibase/sidebar/ThemePanel.cxx @@ -17,6 +17,7 @@ #include <com/sun/star/lang/IllegalArgumentException.hpp> #include <editeng/fontitem.hxx> +#include <utility> #include <vcl/bitmapex.hxx> #include <vcl/image.hxx> #include <vcl/settings.hxx> @@ -66,8 +67,8 @@ public: OUString maElementName; public: - explicit StyleRedefinition(const OUString& aElementName) - : maElementName(aElementName) + explicit StyleRedefinition(OUString aElementName) + : maElementName(std::move(aElementName)) {} void setColorVariable(ColorVariable aVariable) diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx index 7e783376d4a1..5e037b4d679a 100644 --- a/sw/source/uibase/uno/unoatxt.cxx +++ b/sw/source/uibase/uno/unoatxt.cxx @@ -26,6 +26,7 @@ #include <o3tl/safeint.hxx> #include <osl/diagnose.h> #include <rtl/character.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <svtools/unoevent.hxx> #include <sfx2/event.hxx> @@ -666,11 +667,11 @@ sal_Int64 SAL_CALL SwXAutoTextEntry::getSomething( const uno::Sequence< sal_Int8 return comphelper::getSomethingImpl(rId, this); } -SwXAutoTextEntry::SwXAutoTextEntry(SwGlossaries* pGlss, const OUString& rGroupName, - const OUString& rEntryName) : +SwXAutoTextEntry::SwXAutoTextEntry(SwGlossaries* pGlss, OUString aGroupName, + OUString aEntryName) : m_pGlossaries(pGlss), - m_sGroupName(rGroupName), - m_sEntryName(rEntryName) + m_sGroupName(std::move(aGroupName)), + m_sEntryName(std::move(aEntryName)) { } diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx index 89aa97861017..f0b71db96f5c 100644 --- a/sw/source/uibase/uno/unomailmerge.cxx +++ b/sw/source/uibase/uno/unomailmerge.cxx @@ -18,6 +18,7 @@ */ #include <comphelper/servicehelper.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <osl/mutex.hxx> #include <svl/itemprop.hxx> @@ -190,7 +191,7 @@ namespace public: DelayedFileDeletion( const Reference< XModel >& _rxModel, - const OUString& _rTemporaryFile ); + OUString _aTemporaryFile ); protected: virtual ~DelayedFileDeletion( ) override; @@ -207,11 +208,11 @@ namespace DECL_LINK( OnTryDeleteFile, Timer*, void ); }; - DelayedFileDeletion::DelayedFileDeletion( const Reference< XModel >& _rxModel, const OUString& _rTemporaryFile ) + DelayedFileDeletion::DelayedFileDeletion( const Reference< XModel >& _rxModel, OUString _aTemporaryFile ) : m_xDocument( _rxModel, UNO_QUERY ) ,m_aDeleteTimer("sw DelayedFileDeletion m_aDeleteTimer") - ,m_sTemporaryFile( _rTemporaryFile ) + ,m_sTemporaryFile(std::move( _aTemporaryFile )) ,m_nPendingDeleteAttempts( 0 ) { osl_atomic_increment( &m_refCount ); diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index eb497dbb266c..b8152b7ce248 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -22,6 +22,7 @@ #include <comphelper/string.hxx> #include <AnnotationWin.hxx> #include <o3tl/any.hxx> +#include <utility> #include <vcl/virdev.hxx> #include <vcl/sysdata.hxx> #include <vcl/svapp.hxx> @@ -1298,7 +1299,7 @@ class SwDrawPagesObj : public cppu::WeakImplHelper< private: css::uno::Reference< css::drawing::XDrawPageSupplier > m_xDoc; public: - SwDrawPagesObj(const css::uno::Reference< css::drawing::XDrawPageSupplier >& rxDoc) : m_xDoc(rxDoc) {} + SwDrawPagesObj(css::uno::Reference< css::drawing::XDrawPageSupplier > xDoc) : m_xDoc(std::move(xDoc)) {} // XDrawPages virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 896395193a75..b3285972ca2b 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -29,6 +29,7 @@ #include <sfx2/viewfrm.hxx> #include <o3tl/enumrange.hxx> #include <o3tl/sorted_vector.hxx> +#include <utility> #include <vcl/commandevent.hxx> #include <vcl/weldutils.hxx> #include <sot/formats.hxx> @@ -185,10 +186,10 @@ namespace // Content, contains names and reference at the content type. -SwContent::SwContent(const SwContentType* pCnt, const OUString& rName, double nYPos) : +SwContent::SwContent(const SwContentType* pCnt, OUString aName, double nYPos) : SwTypeNumber(CTYPE_CNT), m_pParent(pCnt), - m_sContentName(rName), + m_sContentName(std::move(aName)), m_nYPosition(nYPos), m_bInvisible(false) { @@ -5236,12 +5237,12 @@ NaviContentBookmark::NaviContentBookmark() { } -NaviContentBookmark::NaviContentBookmark( const OUString &rUrl, - const OUString& rDesc, +NaviContentBookmark::NaviContentBookmark( OUString aUrl, + OUString aDesc, RegionMode nDragType, const SwDocShell* pDocSh ) : - m_aUrl( rUrl ), - m_aDescription(rDesc), + m_aUrl(std::move( aUrl )), + m_aDescription(std::move(aDesc)), m_nDocSh(reinterpret_cast<sal_IntPtr>(pDocSh)), m_nDefaultDrag( nDragType ) { |