summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-07-13 13:14:34 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-07-14 12:15:07 +0200
commit34d8eb4d3f2a75a3a072f5f6a443f959ba99113c (patch)
tree4f9e5ee058152111ed559369ac2a490ad3d06153 /svtools
parent2d009c405714934ae5f95f4131510cb4e9c2493f (diff)
clang-tidy modernize-pass-by-value in svtools
Change-Id: I60e7373c924a479fed72eb4f0538006e3e422004 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137019 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/inc/framestatuslistener.hxx5
-rw-r--r--svtools/source/brwbox/datwin.cxx5
-rw-r--r--svtools/source/brwbox/datwin.hxx7
-rw-r--r--svtools/source/control/accessibleruler.cxx7
-rw-r--r--svtools/source/control/accessibleruler.hxx2
-rw-r--r--svtools/source/control/ctrltool.cxx5
-rw-r--r--svtools/source/control/inettbc.cxx7
-rw-r--r--svtools/source/control/tabbar.cxx5
-rw-r--r--svtools/source/control/toolbarmenu.cxx5
-rw-r--r--svtools/source/dialogs/ServerDetailsControls.cxx9
-rw-r--r--svtools/source/dialogs/ServerDetailsControls.hxx4
-rw-r--r--svtools/source/dialogs/addresstemplate.cxx11
-rw-r--r--svtools/source/filter/SvFilterOptionsDialog.cxx7
-rw-r--r--svtools/source/filter/exportdialog.cxx5
-rw-r--r--svtools/source/filter/exportdialog.hxx2
-rw-r--r--svtools/source/misc/acceleratorexecute.cxx19
-rw-r--r--svtools/source/misc/ehdl.cxx5
-rw-r--r--svtools/source/misc/filechangedchecker.cxx13
-rw-r--r--svtools/source/misc/imageresourceaccess.cxx9
-rw-r--r--svtools/source/misc/openfiledroptargetlistener.cxx5
-rw-r--r--svtools/source/misc/stringtransfer.cxx5
-rw-r--r--svtools/source/misc/templatefoldercache.cxx28
-rw-r--r--svtools/source/svhtml/parhtml.cxx8
-rw-r--r--svtools/source/uno/popupmenucontrollerbase.cxx5
-rw-r--r--svtools/source/uno/statusbarcontroller.cxx5
-rw-r--r--svtools/source/uno/toolboxcontroller.cxx5
26 files changed, 106 insertions, 87 deletions
diff --git a/svtools/inc/framestatuslistener.hxx b/svtools/inc/framestatuslistener.hxx
index 6b49200399d8..c3ed32233b2c 100644
--- a/svtools/inc/framestatuslistener.hxx
+++ b/svtools/inc/framestatuslistener.hxx
@@ -25,6 +25,7 @@
#include <cppuhelper/basemutex.hxx>
#include <unordered_map>
+#include <utility>
namespace com :: sun :: star :: frame { class XDispatch; }
namespace com :: sun :: star :: frame { class XFrame; }
@@ -70,8 +71,8 @@ class FrameStatusListener : public css::frame::XStatusListener,
protected:
struct Listener
{
- Listener( const css::util::URL& rURL, const css::uno::Reference< css::frame::XDispatch >& rDispatch ) :
- aURL( rURL ), xDispatch( rDispatch ) {}
+ Listener( css::util::URL _aURL, css::uno::Reference< css::frame::XDispatch > _xDispatch ) :
+ aURL(std::move( _aURL )), xDispatch(std::move( _xDispatch )) {}
css::util::URL aURL;
css::uno::Reference< css::frame::XDispatch > xDispatch;
diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx
index 47541b623bfe..331fd2571226 100644
--- a/svtools/source/brwbox/datwin.cxx
+++ b/svtools/source/brwbox/datwin.cxx
@@ -20,6 +20,7 @@
#include "datwin.hxx"
#include <o3tl/numeric.hxx>
#include <svtools/brwhead.hxx>
+#include <utility>
#include <vcl/commandevent.hxx>
#include <vcl/help.hxx>
#include <vcl/settings.hxx>
@@ -86,10 +87,10 @@ void ButtonFrame::Draw( OutputDevice& rDev )
}
BrowserColumn::BrowserColumn( sal_uInt16 nItemId,
- const OUString& rTitle, sal_uLong nWidthPixel, const Fraction& rCurrentZoom )
+ OUString aTitle, sal_uLong nWidthPixel, const Fraction& rCurrentZoom )
: _nId( nItemId ),
_nWidth( nWidthPixel ),
- _aTitle( rTitle ),
+ _aTitle(std::move( aTitle )),
_bFrozen( false )
{
double n = static_cast<double>(_nWidth);
diff --git a/svtools/source/brwbox/datwin.hxx b/svtools/source/brwbox/datwin.hxx
index 789d96548a2c..460712e34afd 100644
--- a/svtools/source/brwbox/datwin.hxx
+++ b/svtools/source/brwbox/datwin.hxx
@@ -21,6 +21,7 @@
#include <svtools/brwbox.hxx>
#include <tools/long.hxx>
+#include <utility>
#include <vcl/scrbar.hxx>
#include <limits>
@@ -36,12 +37,12 @@ class ButtonFrame
public:
ButtonFrame( const Point& rPt, const Size& rSz,
- const OUString &rText,
+ OUString _aText,
bool _bDrawDisabled)
:aRect( rPt, rSz )
,aInnerRect( Point( aRect.Left()+1, aRect.Top()+1 ),
Size( aRect.GetWidth()-2, aRect.GetHeight()-2 ) )
- ,aText(rText)
+ ,aText(std::move(_aText))
,m_bDrawDisabled(_bDrawDisabled)
{
}
@@ -60,7 +61,7 @@ class BrowserColumn final
public:
BrowserColumn( sal_uInt16 nItemId,
- const OUString& rTitle, sal_uLong nWidthPixel, const Fraction& rCurrentZoom );
+ OUString aTitle, sal_uLong nWidthPixel, const Fraction& rCurrentZoom );
~BrowserColumn();
sal_uInt16 GetId() const { return _nId; }
diff --git a/svtools/source/control/accessibleruler.cxx b/svtools/source/control/accessibleruler.cxx
index e7757de55c32..4fec393c0012 100644
--- a/svtools/source/control/accessibleruler.cxx
+++ b/svtools/source/control/accessibleruler.cxx
@@ -22,6 +22,7 @@
#include <comphelper/accessibleeventnotifier.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <toolkit/helper/convert.hxx>
+#include <utility>
#include <vcl/svapp.hxx>
#include <osl/mutex.hxx>
#include <tools/gen.hxx>
@@ -39,11 +40,11 @@ using namespace ::com::sun::star::accessibility;
//===== internal ============================================================
SvtRulerAccessible::SvtRulerAccessible(
- const uno::Reference< XAccessible >& rxParent, Ruler& rRepr, const OUString& rName ) :
+ uno::Reference< XAccessible > xParent, Ruler& rRepr, OUString aName ) :
SvtRulerAccessible_Base( m_aMutex ),
- msName( rName ),
- mxParent( rxParent ),
+ msName(std::move( aName )),
+ mxParent(std::move( xParent )),
mpRepr( &rRepr ),
mnClientId( 0 )
{
diff --git a/svtools/source/control/accessibleruler.hxx b/svtools/source/control/accessibleruler.hxx
index 167816fda94a..63f4739a3bc3 100644
--- a/svtools/source/control/accessibleruler.hxx
+++ b/svtools/source/control/accessibleruler.hxx
@@ -48,7 +48,7 @@ class SvtRulerAccessible final : public ::cppu::BaseMutex, public SvtRulerAccess
public:
//===== internal ========================================================
SvtRulerAccessible(
- const css::uno::Reference< css::accessibility::XAccessible>& rxParent, Ruler& rRepresentation, const OUString& rName );
+ css::uno::Reference< css::accessibility::XAccessible> xParent, Ruler& rRepresentation, OUString aName );
/// @throws css::uno::RuntimeException
bool
diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx
index 31c3c33b8004..508ee9b9092b 100644
--- a/svtools/source/control/ctrltool.cxx
+++ b/svtools/source/control/ctrltool.cxx
@@ -26,6 +26,7 @@
#include <tools/debug.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <i18nlangtag/mslangid.hxx>
+#include <utility>
#include <vcl/outdev.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
@@ -114,8 +115,8 @@ private:
ImplFontListFontMetric* mpFirst;
FontListFontNameType mnType;
- explicit ImplFontListNameInfo(const OUString& rSearchName)
- : maSearchName(rSearchName)
+ explicit ImplFontListNameInfo(OUString aSearchName)
+ : maSearchName(std::move(aSearchName))
, mpFirst(nullptr)
, mnType(FontListFontNameType::NONE)
{
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index d2afe69cdc35..77dffa93230d 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -51,6 +51,7 @@
#include <svtools/urlfilter.hxx>
#include <mutex>
+#include <utility>
#include <vector>
#include <algorithm>
@@ -105,7 +106,7 @@ class SvtMatchContext_Impl: public salhelper::Thread
static void FillPicklist(std::vector<OUString>& rPickList);
public:
- SvtMatchContext_Impl( SvtURLBox* pBoxP, const OUString& rText );
+ SvtMatchContext_Impl( SvtURLBox* pBoxP, OUString aText );
void Stop();
};
@@ -119,10 +120,10 @@ namespace
}
}
-SvtMatchContext_Impl::SvtMatchContext_Impl(SvtURLBox* pBoxP, const OUString& rText)
+SvtMatchContext_Impl::SvtMatchContext_Impl(SvtURLBox* pBoxP, OUString _aText)
: Thread( "MatchContext_Impl" )
, aLink( LINK( this, SvtMatchContext_Impl, Select_Impl ) )
- , aText( rText )
+ , aText(std::move( _aText ))
, pBox( pBoxP )
, bOnlyDirectories( pBoxP->bOnlyDirectories )
, bNoSelection( pBoxP->bNoSelection )
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index d47d96bc105a..11448292f5e0 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -21,6 +21,7 @@
#include <svtools/tabbar.hxx>
#include <tools/time.hxx>
#include <tools/poly.hxx>
+#include <utility>
#include <vcl/InterimItemWindow.hxx>
#include <vcl/bitmapex.hxx>
#include <vcl/svapp.hxx>
@@ -213,10 +214,10 @@ struct ImplTabBarItem
Color maTabBgColor;
Color maTabTextColor;
- ImplTabBarItem(sal_uInt16 nItemId, const OUString& rText, TabBarPageBits nPageBits)
+ ImplTabBarItem(sal_uInt16 nItemId, OUString aText, TabBarPageBits nPageBits)
: mnId(nItemId)
, mnBits(nPageBits)
- , maText(rText)
+ , maText(std::move(aText))
, mnWidth(0)
, mbShort(false)
, mbSelect(false)
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index 4cd797bca5c9..f72fbd2540cb 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -21,6 +21,7 @@
#include <comphelper/lok.hxx>
#include <comphelper/processfactory.hxx>
+#include <utility>
#include <vcl/taskpanelist.hxx>
#include <vcl/svapp.hxx>
@@ -103,13 +104,13 @@ void InterimToolbarPopup::EndPopupMode()
GetDockingManager()->EndPopupMode(this);
}
-WeldToolbarPopup::WeldToolbarPopup(const css::uno::Reference<css::frame::XFrame>& rFrame,
+WeldToolbarPopup::WeldToolbarPopup(css::uno::Reference<css::frame::XFrame> xFrame,
weld::Widget* pParent, const OUString& rUIFile,
const OString& rId)
: m_xBuilder(Application::CreateBuilder(pParent, rUIFile))
, m_xTopLevel(m_xBuilder->weld_popover(rId))
, m_xContainer(m_xBuilder->weld_container("container"))
- , m_xFrame(rFrame)
+ , m_xFrame(std::move(xFrame))
{
m_xTopLevel->connect_focus_in(LINK(this, WeldToolbarPopup, FocusHdl));
}
diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx b/svtools/source/dialogs/ServerDetailsControls.cxx
index 24a6de413ecb..3ae8e2ebe466 100644
--- a/svtools/source/dialogs/ServerDetailsControls.cxx
+++ b/svtools/source/dialogs/ServerDetailsControls.cxx
@@ -22,6 +22,7 @@
#include <tools/diagnose_ex.h>
#include <svtools/PlaceEditDialog.hxx>
+#include <utility>
#include <config_oauth2.h>
#include "ServerDetailsControls.hxx"
@@ -79,10 +80,10 @@ IMPL_LINK_NOARG( DetailsContainer, ValueChangeHdl, weld::Entry&, void )
notifyChange( );
}
-HostDetailsContainer::HostDetailsContainer(PlaceEditDialog* pDialog, sal_uInt16 nPort, const OUString& sScheme) :
+HostDetailsContainer::HostDetailsContainer(PlaceEditDialog* pDialog, sal_uInt16 nPort, OUString sScheme) :
DetailsContainer( pDialog ),
m_nDefaultPort( nPort ),
- m_sScheme( sScheme )
+ m_sScheme(std::move( sScheme ))
{
set_visible( false );
}
@@ -271,13 +272,13 @@ void SmbDetailsContainer::set_visible( bool bShow )
m_pDialog->m_xEDHost->set_text( m_sHost );
}
-CmisDetailsContainer::CmisDetailsContainer(PlaceEditDialog* pParentDialog, OUString const & sBinding) :
+CmisDetailsContainer::CmisDetailsContainer(PlaceEditDialog* pParentDialog, OUString sBinding) :
DetailsContainer( pParentDialog ),
m_sUsername( ),
m_xCmdEnv( ),
m_aRepoIds( ),
m_sRepoId( ),
- m_sBinding( sBinding ),
+ m_sBinding(std::move( sBinding )),
m_xParentDialog(pParentDialog->getDialog()->GetXWindow())
{
Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
diff --git a/svtools/source/dialogs/ServerDetailsControls.hxx b/svtools/source/dialogs/ServerDetailsControls.hxx
index b0f892fe2877..186125e555bb 100644
--- a/svtools/source/dialogs/ServerDetailsControls.hxx
+++ b/svtools/source/dialogs/ServerDetailsControls.hxx
@@ -71,7 +71,7 @@ class HostDetailsContainer : public DetailsContainer
OUString m_sHost;
public:
- HostDetailsContainer(PlaceEditDialog* pDialog, sal_uInt16 nPort, const OUString& sScheme);
+ HostDetailsContainer(PlaceEditDialog* pDialog, sal_uInt16 nPort, OUString sScheme);
virtual void set_visible( bool bShow ) override;
virtual INetURLObject getUrl( ) override;
@@ -125,7 +125,7 @@ class CmisDetailsContainer final : public DetailsContainer
css::uno::Reference< css::awt::XWindow > m_xParentDialog;
public:
- CmisDetailsContainer(PlaceEditDialog* pDialog, OUString const & sBinding);
+ CmisDetailsContainer(PlaceEditDialog* pDialog, OUString sBinding);
virtual void set_visible( bool bShow ) override;
virtual INetURLObject getUrl( ) override;
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index 6f29151e308f..85928dc7661c 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -27,6 +27,7 @@
#include <comphelper/propertyvalue.hxx>
#include <comphelper/string.hxx>
#include <unotools/configitem.hxx>
+#include <utility>
#include <vcl/stdtext.hxx>
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
@@ -132,8 +133,8 @@ namespace svt
public:
AssignmentTransientData(
- const OUString& _rDataSourceName,
- const OUString& _rTableName,
+ OUString _aDataSourceName,
+ OUString _aTableName,
const Sequence< AliasProgrammaticPair >& _rFields
);
@@ -152,10 +153,10 @@ namespace svt
}
AssignmentTransientData::AssignmentTransientData(
- const OUString& _rDataSourceName, const OUString& _rTableName,
+ OUString _aDataSourceName, OUString _aTableName,
const Sequence< AliasProgrammaticPair >& _rFields )
- :m_sDSName( _rDataSourceName )
- ,m_sTableName( _rTableName )
+ :m_sDSName(std::move( _aDataSourceName ))
+ ,m_sTableName(std::move( _aTableName ))
{
// fill our aliases structure
// first collect all known programmatic names
diff --git a/svtools/source/filter/SvFilterOptionsDialog.cxx b/svtools/source/filter/SvFilterOptionsDialog.cxx
index 5d0926ace1ab..8d8fbeed71a2 100644
--- a/svtools/source/filter/SvFilterOptionsDialog.cxx
+++ b/svtools/source/filter/SvFilterOptionsDialog.cxx
@@ -18,6 +18,7 @@
*/
+#include <utility>
#include <vcl/FilterConfigItem.hxx>
#include <vcl/graphicfilter.hxx>
#include <vcl/svapp.hxx>
@@ -69,7 +70,7 @@ class SvFilterOptionsDialog : public cppu::WeakImplHelper
public:
- explicit SvFilterOptionsDialog( const uno::Reference< uno::XComponentContext >& _rxORB );
+ explicit SvFilterOptionsDialog( uno::Reference< uno::XComponentContext > _xORB );
// XInterface
virtual void SAL_CALL acquire() noexcept override;
@@ -96,8 +97,8 @@ public:
};
-SvFilterOptionsDialog::SvFilterOptionsDialog( const uno::Reference< uno::XComponentContext >& rxContext ) :
- mxContext ( rxContext ),
+SvFilterOptionsDialog::SvFilterOptionsDialog( uno::Reference< uno::XComponentContext > xContext ) :
+ mxContext (std::move( xContext )),
meFieldUnit ( FieldUnit::CM ),
mbExportSelection ( false ),
mbGraphicsSource ( true )
diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx
index d48ec013d175..142da3354f7a 100644
--- a/svtools/source/filter/exportdialog.cxx
+++ b/svtools/source/filter/exportdialog.cxx
@@ -25,6 +25,7 @@
#include <o3tl/safeint.hxx>
#include <tools/stream.hxx>
#include <tools/fract.hxx>
+#include <utility>
#include <vcl/graphicfilter.hxx>
#include <vcl/FilterConfigItem.hxx>
#include <svtools/strings.hrc>
@@ -557,13 +558,13 @@ bool ExportDialog::IsTempExportAvailable() const
}
ExportDialog::ExportDialog(FltCallDialogParameter& rPara,
- const css::uno::Reference< css::uno::XComponentContext >& rxContext,
+ css::uno::Reference< css::uno::XComponentContext > xContext,
const css::uno::Reference< css::lang::XComponent >& rxSourceDocument,
bool bExportSelection, bool bIsPixelFormat, bool bGraphicsSource,
const css::uno::Reference< css::graphic::XGraphic >& rxGraphic)
: GenericDialogController(rPara.pWindow, "svt/ui/graphicexport.ui", "GraphicExportDialog")
, mrFltCallPara(rPara)
- , mxContext(rxContext)
+ , mxContext(std::move(xContext))
, mxSourceDocument(rxSourceDocument)
, mxGraphic(rxGraphic)
, msEstimatedSizePix1(SvtResId(STR_SVT_ESTIMATED_SIZE_PIX_1))
diff --git a/svtools/source/filter/exportdialog.hxx b/svtools/source/filter/exportdialog.hxx
index 1c7c63953a16..ffb7fa8e240b 100644
--- a/svtools/source/filter/exportdialog.hxx
+++ b/svtools/source/filter/exportdialog.hxx
@@ -177,7 +177,7 @@ private:
public:
ExportDialog( FltCallDialogParameter& rPara,
- const css::uno::Reference< css::uno::XComponentContext >& rxContext,
+ css::uno::Reference< css::uno::XComponentContext > xContext,
const css::uno::Reference< css::lang::XComponent >& rxSourceDocument,
bool bExportSelection, bool bIsExportVectorFormat, bool bGraphicsSource,
const css::uno::Reference< css::graphic::XGraphic >& rxGraphic);
diff --git a/svtools/source/misc/acceleratorexecute.cxx b/svtools/source/misc/acceleratorexecute.cxx
index eb6d611fe53b..23f2b3cdacdf 100644
--- a/svtools/source/misc/acceleratorexecute.cxx
+++ b/svtools/source/misc/acceleratorexecute.cxx
@@ -32,6 +32,7 @@
#include <com/sun/star/util/URLTransformer.hpp>
#include <cppuhelper/implbase.hxx>
+#include <utility>
#include <vcl/evntpost.hxx>
#include <sal/log.hxx>
#include <vcl/lok.hxx>
@@ -74,9 +75,9 @@ class AsyncAccelExec : public cppu::WeakImplHelper<css::lang::XEventListener>
/** @short allow creation of instances of this class
by using our factory only!
*/
- AsyncAccelExec(const css::uno::Reference<css::lang::XComponent>& xFrame,
- const css::uno::Reference< css::frame::XDispatch >& xDispatch,
- const css::util::URL& rURL);
+ AsyncAccelExec(css::uno::Reference<css::lang::XComponent> xFrame,
+ css::uno::Reference< css::frame::XDispatch > xDispatch,
+ css::util::URL aURL);
DECL_LINK(impl_ts_asyncCallback, LinkParamNone*, void);
};
@@ -442,12 +443,12 @@ css::uno::Reference< css::util::XURLTransformer > AcceleratorExecute::impl_ts_ge
return xParser;
}
-AsyncAccelExec::AsyncAccelExec(const css::uno::Reference<css::lang::XComponent>& xFrame,
- const css::uno::Reference<css::frame::XDispatch>& xDispatch,
- const css::util::URL& rURL)
- : m_xFrame(xFrame)
- , m_xDispatch(xDispatch)
- , m_aURL(rURL)
+AsyncAccelExec::AsyncAccelExec(css::uno::Reference<css::lang::XComponent> xFrame,
+ css::uno::Reference<css::frame::XDispatch> xDispatch,
+ css::util::URL aURL)
+ : m_xFrame(std::move(xFrame))
+ , m_xDispatch(std::move(xDispatch))
+ , m_aURL(std::move(aURL))
, m_aAsyncCallback(LINK(this, AsyncAccelExec, impl_ts_asyncCallback))
{
acquire();
diff --git a/svtools/source/misc/ehdl.cxx b/svtools/source/misc/ehdl.cxx
index dab1544eeffd..a2cd3ef63323 100644
--- a/svtools/source/misc/ehdl.cxx
+++ b/svtools/source/misc/ehdl.cxx
@@ -18,6 +18,7 @@
*/
#include <unotools/resmgr.hxx>
+#include <utility>
#include <vcl/stdtext.hxx>
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
@@ -248,10 +249,10 @@ SfxErrorContext::SfxErrorContext(
SfxErrorContext::SfxErrorContext(
- sal_uInt16 nCtxIdP, const OUString &aArg1P, weld::Window *pWindow,
+ sal_uInt16 nCtxIdP, OUString aArg1P, weld::Window *pWindow,
const ErrMsgCode* pIdsP, const std::locale& rResLocaleP)
: ErrorContext(pWindow), nCtxId(nCtxIdP), pIds(pIdsP), aResLocale(rResLocaleP),
- aArg1(aArg1P)
+ aArg1(std::move(aArg1P))
{
if (!pIds)
pIds = RID_ERRCTX;
diff --git a/svtools/source/misc/filechangedchecker.cxx b/svtools/source/misc/filechangedchecker.cxx
index dd7cf22b924c..7ffc5cae8364 100644
--- a/svtools/source/misc/filechangedchecker.cxx
+++ b/svtools/source/misc/filechangedchecker.cxx
@@ -12,14 +12,15 @@
#include <osl/file.hxx>
#include <svtools/filechangedchecker.hxx>
+#include <utility>
#include <vcl/timer.hxx>
-FileChangedChecker::FileChangedChecker(const OUString& rFilename,
- const ::std::function<void ()>& rCallback)
+FileChangedChecker::FileChangedChecker(OUString aFilename,
+ ::std::function<void ()> aCallback)
: mTimer("SVTools FileChangedChecker Timer")
- , mFileName(rFilename)
+ , mFileName(std::move(aFilename))
, mLastModTime()
- , mpCallback(rCallback)
+ , mpCallback(std::move(aCallback))
{
// Get the current last file modified Status
getCurrentModTime(mLastModTime);
@@ -34,9 +35,9 @@ FileChangedChecker::FileChangedChecker(const OUString& rFilename,
resetTimer();
}
-FileChangedChecker::FileChangedChecker(const OUString& rFilename)
+FileChangedChecker::FileChangedChecker(OUString aFilename)
: mTimer("")
- , mFileName(rFilename)
+ , mFileName(std::move(aFilename))
, mLastModTime()
, mpCallback(nullptr)
{
diff --git a/svtools/source/misc/imageresourceaccess.cxx b/svtools/source/misc/imageresourceaccess.cxx
index 66c458c911e6..7523efaea3a1 100644
--- a/svtools/source/misc/imageresourceaccess.cxx
+++ b/svtools/source/misc/imageresourceaccess.cxx
@@ -33,6 +33,7 @@
#include <tools/diagnose_ex.h>
#include <unotools/streamwrap.hxx>
#include <cppuhelper/implbase.hxx>
+#include <utility>
namespace svt::GraphicAccess
{
@@ -52,7 +53,7 @@ private:
uno::Reference<io::XSeekable> m_xSeekable;
public:
- StreamSupplier(uno::Reference<io::XInputStream> const & rxInput, uno::Reference<io::XOutputStream> const & rxOutput);
+ StreamSupplier(uno::Reference<io::XInputStream> xInput, uno::Reference<io::XOutputStream> xOutput);
protected:
// XStream
@@ -67,9 +68,9 @@ protected:
}
-StreamSupplier::StreamSupplier(uno::Reference<io::XInputStream> const & rxInput, uno::Reference<io::XOutputStream> const & rxOutput)
- : m_xInput(rxInput)
- , m_xOutput(rxOutput)
+StreamSupplier::StreamSupplier(uno::Reference<io::XInputStream> xInput, uno::Reference<io::XOutputStream> xOutput)
+ : m_xInput(std::move(xInput))
+ , m_xOutput(std::move(xOutput))
{
m_xSeekable.set(m_xInput, uno::UNO_QUERY);
if (!m_xSeekable.is())
diff --git a/svtools/source/misc/openfiledroptargetlistener.cxx b/svtools/source/misc/openfiledroptargetlistener.cxx
index 61d20c0bbb5a..3c1552f0d91c 100644
--- a/svtools/source/misc/openfiledroptargetlistener.cxx
+++ b/svtools/source/misc/openfiledroptargetlistener.cxx
@@ -27,15 +27,16 @@
#include <com/sun/star/util/URLTransformer.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
+#include <utility>
#include <vcl/transfer.hxx>
#include <sot/filelist.hxx>
#include <osl/file.hxx>
#include <vcl/svapp.hxx>
-OpenFileDropTargetListener::OpenFileDropTargetListener( const css::uno::Reference< css::uno::XComponentContext >& xContext,
+OpenFileDropTargetListener::OpenFileDropTargetListener( css::uno::Reference< css::uno::XComponentContext > xContext,
const css::uno::Reference< css::frame::XFrame >& xFrame )
- : m_xContext ( xContext )
+ : m_xContext (std::move( xContext ))
, m_xTargetFrame ( xFrame )
{
}
diff --git a/svtools/source/misc/stringtransfer.cxx b/svtools/source/misc/stringtransfer.cxx
index 14b28dfe3520..37470128e5c2 100644
--- a/svtools/source/misc/stringtransfer.cxx
+++ b/svtools/source/misc/stringtransfer.cxx
@@ -22,6 +22,7 @@
#include <rtl/ref.hxx>
#include <sot/exchange.hxx>
#include <svtools/stringtransfer.hxx>
+#include <utility>
namespace svt
@@ -33,9 +34,9 @@ namespace svt
//= OStringTransferable
- OStringTransferable::OStringTransferable(const OUString& rContent)
+ OStringTransferable::OStringTransferable(OUString aContent)
: TransferDataContainer()
- , m_sContent(rContent)
+ , m_sContent(std::move(aContent))
{
}
diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx
index 532174b7e10e..43e2123532c8 100644
--- a/svtools/source/misc/templatefoldercache.cxx
+++ b/svtools/source/misc/templatefoldercache.cxx
@@ -42,6 +42,7 @@
#include <comphelper/processfactory.hxx>
#include <mutex>
+#include <utility>
#include <vector>
#include <algorithm>
@@ -128,7 +129,7 @@ namespace svt
virtual ~TemplateContent() override;
public:
- explicit TemplateContent( const INetURLObject& _rURL );
+ explicit TemplateContent( INetURLObject _aURL );
// attribute access
OUString getURL( ) const { return m_aURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ); }
@@ -148,8 +149,8 @@ namespace svt
}
- TemplateContent::TemplateContent( const INetURLObject& _rURL )
- :m_aURL( _rURL )
+ TemplateContent::TemplateContent( INetURLObject _aURL )
+ :m_aURL(std::move( _aURL ))
{
DBG_ASSERT( INetProtocol::NotValid != m_aURL.GetProtocol(), "TemplateContent::TemplateContent: invalid URL!" );
implResetDate();
@@ -259,10 +260,9 @@ namespace svt
uno::Reference< util::XOfficeInstallationDirectories > m_xOfficeInstDirs;
StoreContentURL( SvStream& _rStorage,
- const uno::Reference<
- util::XOfficeInstallationDirectories > &
- xOfficeInstDirs )
- : StorageHelper( _rStorage ), m_xOfficeInstDirs( xOfficeInstDirs ) { }
+ uno::Reference<
+ util::XOfficeInstallationDirectories > xOfficeInstDirs )
+ : StorageHelper( _rStorage ), m_xOfficeInstDirs(std::move( xOfficeInstDirs )) { }
void operator() ( const ::rtl::Reference< TemplateContent >& _rxContent ) const
{
@@ -283,10 +283,9 @@ namespace svt
public:
StoreFolderContent( SvStream& _rStorage,
- const uno::Reference<
- util::XOfficeInstallationDirectories > &
- xOfficeInstDirs )
- : StorageHelper( _rStorage ), m_xOfficeInstDirs( xOfficeInstDirs ) { }
+ uno::Reference<
+ util::XOfficeInstallationDirectories > xOfficeInstDirs )
+ : StorageHelper( _rStorage ), m_xOfficeInstDirs(std::move( xOfficeInstDirs )) { }
void operator() ( const TemplateContent& _rContent ) const
@@ -328,10 +327,9 @@ namespace svt
uno::Reference< util::XOfficeInstallationDirectories > m_xOfficeInstDirs;
ReadFolderContent( SvStream& _rStorage,
- const uno::Reference<
- util::XOfficeInstallationDirectories > &
- xOfficeInstDirs )
- : StorageHelper( _rStorage ), m_xOfficeInstDirs( xOfficeInstDirs ) { }
+ uno::Reference<
+ util::XOfficeInstallationDirectories > xOfficeInstDirs )
+ : StorageHelper( _rStorage ), m_xOfficeInstDirs(std::move( xOfficeInstDirs )) { }
void operator() ( TemplateContent& _rContent ) const
diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx
index c6962824b6b6..d29027449181 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -96,10 +96,10 @@ HTMLOptionEnum<HTMLTableRules> const aTableRulesOptEnums[] =
};
-HTMLOption::HTMLOption( HtmlOptionId nTok, const OUString& rToken,
- const OUString& rValue )
- : aValue(rValue)
- , aToken(rToken)
+HTMLOption::HTMLOption( HtmlOptionId nTok, OUString _aToken,
+ OUString _aValue )
+ : aValue(std::move(_aValue))
+ , aToken(std::move(_aToken))
, nToken( nTok )
{
DBG_ASSERT( nToken>=HtmlOptionId::BOOL_START && nToken<HtmlOptionId::END,
diff --git a/svtools/source/uno/popupmenucontrollerbase.cxx b/svtools/source/uno/popupmenucontrollerbase.cxx
index 07d28ff7f0fd..167548d0407c 100644
--- a/svtools/source/uno/popupmenucontrollerbase.cxx
+++ b/svtools/source/uno/popupmenucontrollerbase.cxx
@@ -25,6 +25,7 @@
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/util/URLTransformer.hpp>
+#include <utility>
#include <vcl/svapp.hxx>
#include <osl/mutex.hxx>
#include <cppuhelper/supportsservice.hxx>
@@ -47,8 +48,8 @@ struct PopupMenuControllerBaseDispatchInfo
const URL maURL;
const Sequence< PropertyValue > maArgs;
- PopupMenuControllerBaseDispatchInfo( const Reference< XDispatch >& xDispatch, const URL& rURL, const Sequence< PropertyValue >& rArgs )
- : mxDispatch( xDispatch ), maURL( rURL ), maArgs( rArgs ) {}
+ PopupMenuControllerBaseDispatchInfo( const Reference< XDispatch >& xDispatch, URL aURL, const Sequence< PropertyValue >& rArgs )
+ : mxDispatch( xDispatch ), maURL(std::move( aURL )), maArgs( rArgs ) {}
};
}
diff --git a/svtools/source/uno/statusbarcontroller.cxx b/svtools/source/uno/statusbarcontroller.cxx
index 69d360c9f73f..76387cbad0fd 100644
--- a/svtools/source/uno/statusbarcontroller.cxx
+++ b/svtools/source/uno/statusbarcontroller.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/util/URLTransformer.hpp>
#include <com/sun/star/ui/XStatusbarItem.hpp>
#include <cppuhelper/queryinterface.hxx>
+#include <utility>
#include <vcl/svapp.hxx>
#include <vcl/window.hxx>
#include <vcl/status.hxx>
@@ -46,7 +47,7 @@ namespace svt
StatusbarController::StatusbarController(
const Reference< XComponentContext >& rxContext,
const Reference< XFrame >& xFrame,
- const OUString& aCommandURL,
+ OUString aCommandURL,
unsigned short nID ) :
OWeakObject()
, m_bInitialized( false )
@@ -54,7 +55,7 @@ StatusbarController::StatusbarController(
, m_nID( nID )
, m_xFrame( xFrame )
, m_xContext( rxContext )
- , m_aCommandURL( aCommandURL )
+ , m_aCommandURL(std::move( aCommandURL ))
, m_aListenerContainer( m_aMutex )
{
}
diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx
index df28e6f8f069..8fe4eb37c621 100644
--- a/svtools/source/uno/toolboxcontroller.cxx
+++ b/svtools/source/uno/toolboxcontroller.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
#include <com/sun/star/util/URLTransformer.hpp>
+#include <utility>
#include <vcl/commandinfoprovider.hxx>
#include <vcl/svapp.hxx>
#include <toolkit/helper/vclunohelper.hxx>
@@ -52,7 +53,7 @@ namespace svt
ToolboxController::ToolboxController(
const Reference< XComponentContext >& rxContext,
const Reference< XFrame >& xFrame,
- const OUString& aCommandURL ) :
+ OUString aCommandURL ) :
OPropertyContainer( GetBroadcastHelper() )
, m_bSupportVisible( false )
, m_bInitialized( false )
@@ -61,7 +62,7 @@ ToolboxController::ToolboxController(
, m_nToolBoxId( SAL_MAX_UINT16 )
, m_xFrame( xFrame )
, m_xContext( rxContext )
- , m_aCommandURL( aCommandURL )
+ , m_aCommandURL(std::move( aCommandURL ))
, m_aListenerContainer( m_aMutex )
, m_pToolbar(nullptr)
, m_pBuilder(nullptr)