summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-05-31 10:23:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-31 15:11:27 +0200
commit5ecdedbf81af5516ff7d2195383dc9d6389fb0d0 (patch)
tree5b07d41d683abb65354bf4ced261edfb86ef3174 /basic
parentaf44198d80edce92bdbb82dfd6f218eeb6163484 (diff)
clang-tidy modernize-pass-by-value in basic
Change-Id: I9034ab95a4ccb58e36e77d911dd33cc50857c03a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135176 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic')
-rw-r--r--basic/inc/sbxform.hxx16
-rw-r--r--basic/source/basmgr/basmgr.cxx37
-rw-r--r--basic/source/classes/sbunoobj.cxx19
-rw-r--r--basic/source/classes/sbxmod.cxx5
-rw-r--r--basic/source/comp/exprnode.cxx5
-rw-r--r--basic/source/comp/scanner.cxx5
-rw-r--r--basic/source/comp/symtbl.cxx5
-rw-r--r--basic/source/inc/dlgcont.hxx4
-rw-r--r--basic/source/inc/expr.hxx2
-rw-r--r--basic/source/inc/namecont.hxx4
-rw-r--r--basic/source/inc/sbunoobj.hxx17
-rw-r--r--basic/source/inc/scanner.hxx2
-rw-r--r--basic/source/inc/symtbl.hxx2
-rw-r--r--basic/source/runtime/comenumwrapper.hxx5
-rw-r--r--basic/source/runtime/runtime.cxx11
-rw-r--r--basic/source/sbx/sbxform.cxx33
-rw-r--r--basic/source/sbx/sbxvar.cxx5
-rw-r--r--basic/source/uno/dlgcont.cxx9
-rw-r--r--basic/source/uno/namecont.cxx7
19 files changed, 103 insertions, 90 deletions
diff --git a/basic/inc/sbxform.hxx b/basic/inc/sbxform.hxx
index 8accc399547a..c14d950a8f6b 100644
--- a/basic/inc/sbxform.hxx
+++ b/basic/inc/sbxform.hxx
@@ -74,14 +74,14 @@ class SbxBasicFormater {
// Constructor takes signs for decimal point, thousand separation sign
// and necessary resource strings.
SbxBasicFormater( sal_Unicode _cDecPoint, sal_Unicode _cThousandSep,
- const OUString& _sOnStrg,
- const OUString& _sOffStrg,
- const OUString& _sYesStrg,
- const OUString& _sNoStrg,
- const OUString& _sTrueStrg,
- const OUString& _sFalseStrg,
- const OUString& _sCurrencyStrg,
- const OUString& _sCurrencyFormatStrg );
+ OUString _sOnStrg,
+ OUString _sOffStrg,
+ OUString _sYesStrg,
+ OUString _sNoStrg,
+ OUString _sTrueStrg,
+ OUString _sFalseStrg,
+ OUString _sCurrencyStrg,
+ OUString _sCurrencyFormatStrg );
/* Basic command: Format$( number,format-string )
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 4e01bff8cc9d..e21b0560bfda 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <utility>
#include <vcl/errinf.hxx>
#include <tools/stream.hxx>
#include <sot/storage.hxx>
@@ -107,9 +108,9 @@ class BasMgrContainerListenerImpl: public ContainerListenerHelper
OUString maLibName; // empty -> no lib, but lib container
public:
- BasMgrContainerListenerImpl( BasicManager* pMgr, const OUString& aLibName )
+ BasMgrContainerListenerImpl( BasicManager* pMgr, OUString aLibName )
: mpMgr( pMgr )
- , maLibName( aLibName ) {}
+ , maLibName(std::move( aLibName )) {}
static void insertLibraryImpl( const uno::Reference< script::XLibraryContainer >& xScriptCont, BasicManager* pMgr,
const uno::Any& aLibAny, const OUString& aLibName );
@@ -1573,8 +1574,8 @@ class ModuleInfo_Impl : public ModuleInfoHelper
OUString maSource;
public:
- ModuleInfo_Impl( const OUString& aName, const OUString& aLanguage, const OUString& aSource )
- : maName( aName ), maLanguage( aLanguage), maSource( aSource ) {}
+ ModuleInfo_Impl( OUString aName, OUString aLanguage, OUString aSource )
+ : maName(std::move( aName )), maLanguage(std::move( aLanguage)), maSource(std::move( aSource )) {}
// Methods XStarBasicModuleInfo
virtual OUString SAL_CALL getName() override
@@ -1592,8 +1593,8 @@ class DialogInfo_Impl : public WeakImplHelper< script::XStarBasicDialogInfo >
uno::Sequence< sal_Int8 > mData;
public:
- DialogInfo_Impl( const OUString& aName, const uno::Sequence< sal_Int8 >& Data )
- : maName( aName ), mData( Data ) {}
+ DialogInfo_Impl( OUString aName, const uno::Sequence< sal_Int8 >& Data )
+ : maName(std::move( aName )), mData( Data ) {}
// Methods XStarBasicDialogInfo
virtual OUString SAL_CALL getName() override
@@ -1615,19 +1616,19 @@ class LibraryInfo_Impl : public WeakImplHelper< script::XStarBasicLibraryInfo >
public:
LibraryInfo_Impl
(
- const OUString& aName,
- uno::Reference< container::XNameContainer > const & xModuleContainer,
- uno::Reference< container::XNameContainer > const & xDialogContainer,
- const OUString& aPassword,
- const OUString& aExternaleSourceURL,
- const OUString& aLinkTargetURL
+ OUString aName,
+ uno::Reference< container::XNameContainer > xModuleContainer,
+ uno::Reference< container::XNameContainer > xDialogContainer,
+ OUString aPassword,
+ OUString aExternaleSourceURL,
+ OUString aLinkTargetURL
)
- : maName( aName )
- , mxModuleContainer( xModuleContainer )
- , mxDialogContainer( xDialogContainer )
- , maPassword( aPassword )
- , maExternaleSourceURL( aExternaleSourceURL )
- , maLinkTargetURL( aLinkTargetURL )
+ : maName(std::move( aName ))
+ , mxModuleContainer(std::move( xModuleContainer ))
+ , mxDialogContainer(std::move( xDialogContainer ))
+ , maPassword(std::move( aPassword ))
+ , maExternaleSourceURL(std::move( aExternaleSourceURL ))
+ , maLinkTargetURL(std::move( aLinkTargetURL ))
{}
// Methods XStarBasicLibraryInfo
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 8968f19161c5..ad4aefb52f72 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -20,6 +20,7 @@
#include <sal/config.h>
#include <o3tl/any.hxx>
+#include <utility>
#include <vcl/svapp.hxx>
#include <vcl/errcode.hxx>
#include <svl/hint.hxx>
@@ -2563,13 +2564,13 @@ SbUnoProperty::SbUnoProperty
const OUString& aName_,
SbxDataType eSbxType,
SbxDataType eRealSbxType,
- const Property& aUnoProp_,
+ Property aUnoProp_,
sal_Int32 nId_,
bool bInvocation,
bool bUnoStruct
)
: SbxProperty( aName_, eSbxType )
- , aUnoProp( aUnoProp_ )
+ , aUnoProp(std::move( aUnoProp_ ))
, nId( nId_ )
, mbInvocation( bInvocation )
, mRealType( eRealSbxType )
@@ -3781,7 +3782,7 @@ public:
SbxObjectRef xSbxObj;
OUString aPrefixName;
- explicit BasicAllListener_Impl( const OUString& aPrefixName );
+ explicit BasicAllListener_Impl( OUString aPrefixName );
// Methods of XAllListener
virtual void SAL_CALL firing(const AllEventObject& Event) override;
@@ -3793,8 +3794,8 @@ public:
}
-BasicAllListener_Impl::BasicAllListener_Impl(const OUString& aPrefixName_)
- : aPrefixName( aPrefixName_ )
+BasicAllListener_Impl::BasicAllListener_Impl(OUString aPrefixName_)
+ : aPrefixName(std::move( aPrefixName_ ))
{
}
@@ -3879,7 +3880,7 @@ class InvocationToAllListenerMapper : public WeakImplHelper< XInvocation >
{
public:
InvocationToAllListenerMapper( const Reference< XIdlClass >& ListenerType,
- const Reference< XAllListener >& AllListener, const Any& Helper );
+ const Reference< XAllListener >& AllListener, Any Helper );
// XInvocation
virtual Reference< XIntrospectionAccess > SAL_CALL getIntrospection() override;
@@ -3920,10 +3921,10 @@ static Reference< XInterface > createAllListenerAdapter
// InvocationToAllListenerMapper
InvocationToAllListenerMapper::InvocationToAllListenerMapper
- ( const Reference< XIdlClass >& ListenerType, const Reference< XAllListener >& AllListener, const Any& Helper )
+ ( const Reference< XIdlClass >& ListenerType, const Reference< XAllListener >& AllListener, Any Helper )
: m_xAllListener( AllListener )
, m_xListenerType( ListenerType )
- , m_Helper( Helper )
+ , m_Helper(std::move( Helper ))
{
}
@@ -4629,7 +4630,7 @@ TypeClass StructRefInfo::getTypeClass() const
return maType.getTypeClass();
}
-SbUnoStructRefObject::SbUnoStructRefObject( const OUString& aName_, const StructRefInfo& rMemberInfo ) : SbxObject( aName_ ), maMemberInfo( rMemberInfo ), mbMemberCacheInit( false )
+SbUnoStructRefObject::SbUnoStructRefObject( const OUString& aName_, StructRefInfo aMemberInfo ) : SbxObject( aName_ ), maMemberInfo(std::move( aMemberInfo )), mbMemberCacheInit( false )
{
SetClassName( maMemberInfo.getTypeName() );
}
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 1e5e7ec36a7f..af2b4b2c9c5d 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -18,6 +18,7 @@
*/
+#include <utility>
#include <vcl/svapp.hxx>
#include <tools/stream.hxx>
#include <tools/diagnose_ex.h>
@@ -2212,8 +2213,8 @@ class FormObjEventListenerImpl:
public:
FormObjEventListenerImpl(const FormObjEventListenerImpl&) = delete;
const FormObjEventListenerImpl& operator=(const FormObjEventListenerImpl&) = delete;
- FormObjEventListenerImpl( SbUserFormModule* pUserForm, const uno::Reference< lang::XComponent >& xComponent, const uno::Reference< frame::XModel >& xModel ) :
- mpUserForm( pUserForm ), mxComponent( xComponent), mxModel( xModel ),
+ FormObjEventListenerImpl( SbUserFormModule* pUserForm, uno::Reference< lang::XComponent > xComponent, uno::Reference< frame::XModel > xModel ) :
+ mpUserForm( pUserForm ), mxComponent(std::move( xComponent)), mxModel(std::move( xModel )),
mbDisposed( false ), mbOpened( false ), mbActivated( false ), mbShowing( false )
{
if ( mxComponent.is() )
diff --git a/basic/source/comp/exprnode.cxx b/basic/source/comp/exprnode.cxx
index a5fd8dde3cfc..ade1d5832ba1 100644
--- a/basic/source/comp/exprnode.cxx
+++ b/basic/source/comp/exprnode.cxx
@@ -28,6 +28,7 @@
#include <basic/sberrors.hxx>
#include <rtl/math.hxx>
+#include <utility>
SbiExprNode::SbiExprNode( std::unique_ptr<SbiExprNode> l, SbiToken t, std::unique_ptr<SbiExprNode> r ) :
pLeft(std::move(l)),
@@ -50,8 +51,8 @@ SbiExprNode::SbiExprNode( double n, SbxDataType t ):
{
}
-SbiExprNode::SbiExprNode( const OUString& rVal ):
- aStrVal(rVal),
+SbiExprNode::SbiExprNode( OUString aVal ):
+ aStrVal(std::move(aVal)),
pWithParent(nullptr),
eNodeType(SbxSTRVAL),
eType(SbxSTRING),
diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index 4cb2e34e3285..af87757b2282 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -28,9 +28,10 @@
#include <svl/zforlist.hxx>
#include <rtl/character.hxx>
#include <o3tl/string_view.hxx>
+#include <utility>
-SbiScanner::SbiScanner(const OUString& rBuf, StarBASIC* p)
- : aBuf(rBuf)
+SbiScanner::SbiScanner(OUString _aBuf, StarBASIC* p)
+ : aBuf(std::move(_aBuf))
, nLineIdx(-1)
, nSaveLineIdx(-1)
, pBasic(p)
diff --git a/basic/source/comp/symtbl.cxx b/basic/source/comp/symtbl.cxx
index 9d4376b683fe..6caa3b2ed3d3 100644
--- a/basic/source/comp/symtbl.cxx
+++ b/basic/source/comp/symtbl.cxx
@@ -26,6 +26,7 @@
#include <stdio.h>
#include <rtl/character.hxx>
#include <basic/sberrors.hxx>
+#include <utility>
// All symbol names are laid down int the symbol-pool's stringpool, so that
// all symbols are handled in the same case. On saving the code-image, the
@@ -276,8 +277,8 @@ void SbiSymPool::CheckRefs()
}
}
-SbiSymDef::SbiSymDef( const OUString& rName ) :
- aName(rName),
+SbiSymDef::SbiSymDef( OUString _aName ) :
+ aName(std::move(_aName)),
eType(SbxEMPTY),
pIn(nullptr),
nLen(0),
diff --git a/basic/source/inc/dlgcont.hxx b/basic/source/inc/dlgcont.hxx
index 60882268e524..e66a23701759 100644
--- a/basic/source/inc/dlgcont.hxx
+++ b/basic/source/inc/dlgcont.hxx
@@ -108,7 +108,7 @@ public:
SfxDialogLibrary
(
ModifiableHelper& _rModifiable,
- const OUString& aName,
+ OUString aName,
const css::uno::Reference< css::ucb::XSimpleFileAccess3 >& xSFI,
SfxDialogLibraryContainer* pParent
);
@@ -116,7 +116,7 @@ public:
SfxDialogLibrary
(
ModifiableHelper& _rModifiable,
- const OUString& aName,
+ OUString aName,
const css::uno::Reference< css::ucb::XSimpleFileAccess3 >& xSFI,
const OUString& aLibInfoFileURL, const OUString& aStorageURL, bool ReadOnly,
SfxDialogLibraryContainer* pParent
diff --git a/basic/source/inc/expr.hxx b/basic/source/inc/expr.hxx
index 93f344e89fac..d5130c39dae9 100644
--- a/basic/source/inc/expr.hxx
+++ b/basic/source/inc/expr.hxx
@@ -114,7 +114,7 @@ class SbiExprNode final { // operators (and operands)
public:
SbiExprNode();
SbiExprNode( double, SbxDataType );
- SbiExprNode( const OUString& );
+ SbiExprNode( OUString );
SbiExprNode( const SbiSymDef&, SbxDataType, SbiExprListPtr = nullptr );
SbiExprNode( std::unique_ptr<SbiExprNode>, SbiToken, std::unique_ptr<SbiExprNode> );
SbiExprNode( std::unique_ptr<SbiExprNode>, sal_uInt16 ); // #120061 TypeOf
diff --git a/basic/source/inc/namecont.hxx b/basic/source/inc/namecont.hxx
index 6c25223da711..5875b6369faf 100644
--- a/basic/source/inc/namecont.hxx
+++ b/basic/source/inc/namecont.hxx
@@ -543,8 +543,8 @@ public:
ModifiableHelper& _rModifiable,
const css::uno::Type& aType,
const css::uno::Reference< css::ucb::XSimpleFileAccess3 >& xSFI,
- const OUString& aLibInfoFileURL,
- const OUString& aStorageURL,
+ OUString aLibInfoFileURL,
+ OUString aStorageURL,
bool ReadOnly
);
diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx
index 67be6f92ca5e..4dee669219ef 100644
--- a/basic/source/inc/sbunoobj.hxx
+++ b/basic/source/inc/sbunoobj.hxx
@@ -35,6 +35,7 @@
#include <string_view>
#include <unordered_map>
+#include <utility>
#include <vector>
#include <map>
@@ -83,7 +84,7 @@ class SbUnoStructRefObject final : public SbxObject
public:
StructRefInfo getStructMember( const OUString& rMember );
const StructRefInfo& getStructInfo() const { return maMemberInfo; }
- SbUnoStructRefObject( const OUString& aName_, const StructRefInfo& rMemberInfo );
+ SbUnoStructRefObject( const OUString& aName_, StructRefInfo aMemberInfo );
virtual ~SbUnoStructRefObject() override;
// override Find to support e. g. NameAccess
@@ -193,7 +194,7 @@ class SbUnoProperty final : public SbxProperty
public:
SbUnoProperty( const OUString& aName_, SbxDataType eSbxType, SbxDataType eRealSbxType,
- const css::beans::Property& aUnoProp_, sal_Int32 nId_, bool bInvocation, bool bUnoStruct );
+ css::beans::Property aUnoProp_, sal_Int32 nId_, bool bInvocation, bool bUnoStruct );
bool isUnoStruct() const { return mbUnoStruct; }
bool isInvocationBased() const
@@ -218,9 +219,9 @@ public:
SbUnoClass( const OUString& aName_ )
: SbxObject( aName_ )
{}
- SbUnoClass( const OUString& aName_, const css::uno::Reference< css::reflection::XIdlClass >& xClass_ )
+ SbUnoClass( const OUString& aName_, css::uno::Reference< css::reflection::XIdlClass > xClass_ )
: SbxObject( aName_ )
- , m_xClass( xClass_ )
+ , m_xClass(std::move( xClass_ ))
{}
@@ -245,9 +246,9 @@ class SbUnoService final : public SbxObject
public:
SbUnoService( const OUString& aName_,
- const css::uno::Reference< css::reflection::XServiceTypeDescription2 >& xServiceTypeDesc )
+ css::uno::Reference< css::reflection::XServiceTypeDescription2 > xServiceTypeDesc )
: SbxObject( aName_ )
- , m_xServiceTypeDesc( xServiceTypeDesc )
+ , m_xServiceTypeDesc(std::move( xServiceTypeDesc ))
, m_bNeedsInit( true )
{}
@@ -294,9 +295,9 @@ class SbUnoAnyObject final : public SbxObject
css::uno::Any mVal;
public:
- SbUnoAnyObject( const css::uno::Any& rVal )
+ SbUnoAnyObject( css::uno::Any rVal )
: SbxObject( OUString() )
- , mVal( rVal )
+ , mVal(std::move( rVal ))
{}
const css::uno::Any& getValue() const
diff --git a/basic/source/inc/scanner.hxx b/basic/source/inc/scanner.hxx
index 39dda9fa391c..c10d809055a6 100644
--- a/basic/source/inc/scanner.hxx
+++ b/basic/source/inc/scanner.hxx
@@ -66,7 +66,7 @@ protected:
bool bInStatement;
void GenError( ErrCode );
public:
- SbiScanner( const OUString&, StarBASIC* = nullptr );
+ SbiScanner( OUString , StarBASIC* = nullptr );
void EnableErrors() { bError = false; }
bool IsHash() const { return bHash; }
diff --git a/basic/source/inc/symtbl.hxx b/basic/source/inc/symtbl.hxx
index b8a2f6ebbaad..56f68d4fe882 100644
--- a/basic/source/inc/symtbl.hxx
+++ b/basic/source/inc/symtbl.hxx
@@ -107,7 +107,7 @@ protected:
sal_uInt16 nDefaultId; // Symbol number of default value
short nFixedStringLength; // String length in: Dim foo As String*Length
public:
- SbiSymDef( const OUString& );
+ SbiSymDef( OUString );
virtual ~SbiSymDef();
virtual SbiProcDef* GetProcDef();
virtual SbiConstDef* GetConstDef();
diff --git a/basic/source/runtime/comenumwrapper.hxx b/basic/source/runtime/comenumwrapper.hxx
index 560829b331bb..38dd57f274a6 100644
--- a/basic/source/runtime/comenumwrapper.hxx
+++ b/basic/source/runtime/comenumwrapper.hxx
@@ -23,6 +23,7 @@
#include <com/sun/star/script/XInvocation.hpp>
#include <cppuhelper/implbase.hxx>
+#include <utility>
class ComEnumerationWrapper : public ::cppu::WeakImplHelper<css::container::XEnumeration>
{
@@ -30,8 +31,8 @@ class ComEnumerationWrapper : public ::cppu::WeakImplHelper<css::container::XEnu
sal_Int32 m_nCurInd;
public:
- explicit ComEnumerationWrapper(const css::uno::Reference<css::script::XInvocation>& xInvocation)
- : m_xInvocation(xInvocation)
+ explicit ComEnumerationWrapper(css::uno::Reference<css::script::XInvocation> xInvocation)
+ : m_xInvocation(std::move(xInvocation))
, m_nCurInd(0)
{
}
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 6cdc371d4147..871f1127d8a7 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -38,6 +38,7 @@
#include <tools/wldcrd.hxx>
#include <tools/diagnose_ex.h>
+#include <utility>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
@@ -143,8 +144,8 @@ struct SbiArgv { // Argv stack:
SbxArrayRef refArgv; // Argv
short nArgc; // Argc
- SbiArgv(SbxArrayRef const & refArgv_, short nArgc_) :
- refArgv(refArgv_),
+ SbiArgv(SbxArrayRef refArgv_, short nArgc_) :
+ refArgv(std::move(refArgv_)),
nArgc(nArgc_) {}
};
@@ -1774,10 +1775,10 @@ struct DimAsNewRecoverItem
, m_pClassModule( nullptr )
{}
- DimAsNewRecoverItem( const OUString& rObjClass, const OUString& rObjName,
+ DimAsNewRecoverItem( OUString aObjClass, OUString aObjName,
SbxObject* pObjParent, SbModule* pClassModule )
- : m_aObjClass( rObjClass )
- , m_aObjName( rObjName )
+ : m_aObjClass(std::move( aObjClass ))
+ , m_aObjName(std::move( aObjName ))
, m_pObjParent( pObjParent )
, m_pClassModule( pClassModule )
{}
diff --git a/basic/source/sbx/sbxform.cxx b/basic/source/sbx/sbxform.cxx
index 4bd0c09ac99f..bda6da33e248 100644
--- a/basic/source/sbx/sbxform.cxx
+++ b/basic/source/sbx/sbxform.cxx
@@ -25,6 +25,7 @@
#include <rtl/character.hxx>
#include <o3tl/string_view.hxx>
+#include <utility>
/*
TODO: are there any Star-Basic characteristics unconsidered?
@@ -92,24 +93,24 @@ static double get_number_of_digits( double dNumber )
SbxBasicFormater::SbxBasicFormater( sal_Unicode _cDecPoint, sal_Unicode _cThousandSep,
- const OUString& _sOnStrg,
- const OUString& _sOffStrg,
- const OUString& _sYesStrg,
- const OUString& _sNoStrg,
- const OUString& _sTrueStrg,
- const OUString& _sFalseStrg,
- const OUString& _sCurrencyStrg,
- const OUString& _sCurrencyFormatStrg )
+ OUString _sOnStrg,
+ OUString _sOffStrg,
+ OUString _sYesStrg,
+ OUString _sNoStrg,
+ OUString _sTrueStrg,
+ OUString _sFalseStrg,
+ OUString _sCurrencyStrg,
+ OUString _sCurrencyFormatStrg )
: cDecPoint(_cDecPoint)
, cThousandSep(_cThousandSep)
- , sOnStrg(_sOnStrg)
- , sOffStrg(_sOffStrg)
- , sYesStrg(_sYesStrg)
- , sNoStrg(_sNoStrg)
- , sTrueStrg(_sTrueStrg)
- , sFalseStrg(_sFalseStrg)
- , sCurrencyStrg(_sCurrencyStrg)
- , sCurrencyFormatStrg(_sCurrencyFormatStrg)
+ , sOnStrg(std::move(_sOnStrg))
+ , sOffStrg(std::move(_sOffStrg))
+ , sYesStrg(std::move(_sYesStrg))
+ , sNoStrg(std::move(_sNoStrg))
+ , sTrueStrg(std::move(_sTrueStrg))
+ , sFalseStrg(std::move(_sFalseStrg))
+ , sCurrencyStrg(std::move(_sCurrencyStrg))
+ , sCurrencyFormatStrg(std::move(_sCurrencyFormatStrg))
, dNum(0.0)
, nNumExp(0)
, nExpExp(0)
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index f0d99d7f3654..947b24ff9421 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -34,6 +34,7 @@
#include <unotools/transliterationwrapper.hxx>
#include <com/sun/star/uno/XInterface.hpp>
+#include <utility>
using namespace com::sun::star::uno;
// SbxVariable
@@ -563,8 +564,8 @@ SbxInfo::SbxInfo()
: nHelpId(0)
{}
-SbxInfo::SbxInfo( const OUString& r, sal_uInt32 n )
- : aHelpFile( r ), nHelpId( n )
+SbxInfo::SbxInfo( OUString a, sal_uInt32 n )
+ : aHelpFile(std::move( a )), nHelpId( n )
{}
void SbxVariable::Dump( SvStream& rStrm, bool bFill )
diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx
index 86cedbb47446..974f461b4f37 100644
--- a/basic/source/uno/dlgcont.cxx
+++ b/basic/source/uno/dlgcont.cxx
@@ -34,6 +34,7 @@
#include <comphelper/fileformat.h>
#include <comphelper/processfactory.hxx>
#include <tools/diagnose_ex.h>
+#include <utility>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include <xmlscript/xmldlg_imexp.hxx>
@@ -483,17 +484,17 @@ Sequence< OUString > SAL_CALL SfxDialogLibraryContainer::getSupportedServiceName
// Ctor
SfxDialogLibrary::SfxDialogLibrary( ModifiableHelper& _rModifiable,
- const OUString& aName,
+ OUString aName,
const Reference< XSimpleFileAccess3 >& xSFI,
SfxDialogLibraryContainer* pParent )
: SfxLibrary( _rModifiable, cppu::UnoType<XInputStreamProvider>::get(), xSFI )
, m_pParent( pParent )
- , m_aName( aName )
+ , m_aName(std::move( aName ))
{
}
SfxDialogLibrary::SfxDialogLibrary( ModifiableHelper& _rModifiable,
- const OUString& aName,
+ OUString aName,
const Reference< XSimpleFileAccess3 >& xSFI,
const OUString& aLibInfoFileURL,
const OUString& aStorageURL,
@@ -502,7 +503,7 @@ SfxDialogLibrary::SfxDialogLibrary( ModifiableHelper& _rModifiable,
: SfxLibrary( _rModifiable, cppu::UnoType<XInputStreamProvider>::get(),
xSFI, aLibInfoFileURL, aStorageURL, ReadOnly)
, m_pParent( pParent )
- , m_aName( aName )
+ , m_aName(std::move( aName ))
{
}
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 55058556bcfc..05a1a5b40f97 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -30,6 +30,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/ucb/ContentCreationException.hpp>
#include <com/sun/star/xml/sax/SAXException.hpp>
+#include <utility>
#include <vcl/svapp.hxx>
#include <o3tl/string_view.hxx>
#include <osl/mutex.hxx>
@@ -2950,7 +2951,7 @@ SfxLibrary::SfxLibrary( ModifiableHelper& _rModifiable, const Type& aType,
SfxLibrary::SfxLibrary( ModifiableHelper& _rModifiable, const Type& aType,
const Reference< XSimpleFileAccess3 >& xSFI,
- const OUString& aLibInfoFileURL, const OUString& aStorageURL, bool ReadOnly )
+ OUString aLibInfoFileURL, OUString aStorageURL, bool ReadOnly )
: OComponentHelper( m_aMutex )
, mxSFI( xSFI )
, mrModifiable( _rModifiable )
@@ -2958,8 +2959,8 @@ SfxLibrary::SfxLibrary( ModifiableHelper& _rModifiable, const Type& aType,
, mbLoaded( false )
, mbIsModified( true )
, mbInitialised( false )
- , maLibInfoFileURL( aLibInfoFileURL )
- , maStorageURL( aStorageURL )
+ , maLibInfoFileURL(std::move( aLibInfoFileURL ))
+ , maStorageURL(std::move( aStorageURL ))
, mbLink( true )
, mbReadOnly( false )
, mbReadOnlyLink( ReadOnly )