summaryrefslogtreecommitdiff
path: root/scripting/source/basprov
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-06-23 15:09:08 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-06-23 18:24:07 +0200
commitc7c2f6b37a834a3135e3683f1fc27f3ec938640c (patch)
tree5f2e849fa01674918760872259db95bc436fe427 /scripting/source/basprov
parent5bb5763e2f208cddd114fe96466bdfa2ed3bdbf3 (diff)
clang-tidy modernize-pass-by-value in scripting
Change-Id: I95e2a391a984905cac5cbf3f1bb640e1157fafd5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136338 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'scripting/source/basprov')
-rw-r--r--scripting/source/basprov/baslibnode.cxx9
-rw-r--r--scripting/source/basprov/baslibnode.hxx4
-rw-r--r--scripting/source/basprov/basmethnode.cxx5
-rw-r--r--scripting/source/basprov/basmethnode.hxx2
-rw-r--r--scripting/source/basprov/basmodnode.cxx5
-rw-r--r--scripting/source/basprov/basmodnode.hxx2
-rw-r--r--scripting/source/basprov/basscript.cxx13
-rw-r--r--scripting/source/basprov/basscript.hxx8
8 files changed, 26 insertions, 22 deletions
diff --git a/scripting/source/basprov/baslibnode.cxx b/scripting/source/basprov/baslibnode.cxx
index 33942c6b206c..9d6511dfcac3 100644
--- a/scripting/source/basprov/baslibnode.cxx
+++ b/scripting/source/basprov/baslibnode.cxx
@@ -21,6 +21,7 @@
#include "basmodnode.hxx"
#include <com/sun/star/script/browse/BrowseNodeTypes.hpp>
#include <comphelper/sequence.hxx>
+#include <utility>
#include <vcl/svapp.hxx>
#include <basic/basmgr.hxx>
#include <basic/sbstar.hxx>
@@ -40,13 +41,13 @@ namespace basprov
BasicLibraryNodeImpl::BasicLibraryNodeImpl( const Reference< XComponentContext >& rxContext,
- const OUString& sScriptingContext, BasicManager* pBasicManager,
- const Reference< script::XLibraryContainer >& xLibContainer, const OUString& sLibName, bool isAppScript )
+ OUString sScriptingContext, BasicManager* pBasicManager,
+ const Reference< script::XLibraryContainer >& xLibContainer, OUString sLibName, bool isAppScript )
:m_xContext( rxContext )
- ,m_sScriptingContext( sScriptingContext )
+ ,m_sScriptingContext(std::move( sScriptingContext ))
,m_pBasicManager( pBasicManager )
,m_xLibContainer( xLibContainer )
- ,m_sLibName( sLibName )
+ ,m_sLibName(std::move( sLibName ))
,m_bIsAppScript( isAppScript )
{
if ( m_xLibContainer.is() )
diff --git a/scripting/source/basprov/baslibnode.hxx b/scripting/source/basprov/baslibnode.hxx
index 46d31aae58e5..929ad05b9354 100644
--- a/scripting/source/basprov/baslibnode.hxx
+++ b/scripting/source/basprov/baslibnode.hxx
@@ -50,10 +50,10 @@ namespace basprov
public:
BasicLibraryNodeImpl( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
- const OUString& sScriptingContext,
+ OUString sScriptingContext,
BasicManager* pBasicManager,
const css::uno::Reference< css::script::XLibraryContainer >& xLibContainer,
- const OUString& sLibName, bool isAppScript );
+ OUString sLibName, bool isAppScript );
virtual ~BasicLibraryNodeImpl() override;
// XBrowseNode
diff --git a/scripting/source/basprov/basmethnode.cxx b/scripting/source/basprov/basmethnode.cxx
index fca2cafe8d72..168d297e48de 100644
--- a/scripting/source/basprov/basmethnode.cxx
+++ b/scripting/source/basprov/basmethnode.cxx
@@ -25,6 +25,7 @@
#include <com/sun/star/script/browse/BrowseNodeTypes.hpp>
#include <comphelper/propertyvalue.hxx>
+#include <utility>
#include <vcl/svapp.hxx>
#include <basic/sbstar.hxx>
#include <basic/sbmeth.hxx>
@@ -57,11 +58,11 @@ namespace basprov
BasicMethodNodeImpl::BasicMethodNodeImpl( const Reference< XComponentContext >& rxContext,
- const OUString& sScriptingContext, SbMethod* pMethod, bool isAppScript )
+ OUString sScriptingContext, SbMethod* pMethod, bool isAppScript )
: ::scripting_helper::OBroadcastHelperHolder( m_aMutex )
,OPropertyContainer( GetBroadcastHelper() )
,m_xContext( rxContext )
- ,m_sScriptingContext( sScriptingContext )
+ ,m_sScriptingContext(std::move( sScriptingContext ))
,m_pMethod( pMethod )
,m_bIsAppScript( isAppScript )
,m_bEditable( true )
diff --git a/scripting/source/basprov/basmethnode.hxx b/scripting/source/basprov/basmethnode.hxx
index d1eddada026b..d1b08d837a90 100644
--- a/scripting/source/basprov/basmethnode.hxx
+++ b/scripting/source/basprov/basmethnode.hxx
@@ -69,7 +69,7 @@ namespace basprov
public:
BasicMethodNodeImpl( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
- const OUString& sScriptingContext,
+ OUString sScriptingContext,
SbMethod* pMethod, bool isAppScript );
virtual ~BasicMethodNodeImpl() override;
diff --git a/scripting/source/basprov/basmodnode.cxx b/scripting/source/basprov/basmodnode.cxx
index 986e3062d5cd..0ed8e91a9f97 100644
--- a/scripting/source/basprov/basmodnode.cxx
+++ b/scripting/source/basprov/basmodnode.cxx
@@ -20,6 +20,7 @@
#include "basmodnode.hxx"
#include "basmethnode.hxx"
#include <com/sun/star/script/browse/BrowseNodeTypes.hpp>
+#include <utility>
#include <vcl/svapp.hxx>
#include <basic/sbx.hxx>
#include <basic/sbmod.hxx>
@@ -40,9 +41,9 @@ namespace basprov
BasicModuleNodeImpl::BasicModuleNodeImpl( const Reference< XComponentContext >& rxContext,
- const OUString& sScriptingContext, SbModule* pModule, bool isAppScript )
+ OUString sScriptingContext, SbModule* pModule, bool isAppScript )
:m_xContext( rxContext )
- ,m_sScriptingContext( sScriptingContext )
+ ,m_sScriptingContext(std::move( sScriptingContext ))
,m_pModule( pModule )
,m_bIsAppScript( isAppScript )
{
diff --git a/scripting/source/basprov/basmodnode.hxx b/scripting/source/basprov/basmodnode.hxx
index ebf0957ef044..d34e709b2884 100644
--- a/scripting/source/basprov/basmodnode.hxx
+++ b/scripting/source/basprov/basmodnode.hxx
@@ -46,7 +46,7 @@ namespace basprov
public:
BasicModuleNodeImpl( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
- const OUString& sScriptingContext,
+ OUString sScriptingContext,
SbModule* pModule, bool isAppScript );
virtual ~BasicModuleNodeImpl() override;
diff --git a/scripting/source/basprov/basscript.cxx b/scripting/source/basprov/basscript.cxx
index b5a3f6136534..f3ab8d2dd224 100644
--- a/scripting/source/basprov/basscript.cxx
+++ b/scripting/source/basprov/basscript.cxx
@@ -18,6 +18,7 @@
*/
#include "basscript.hxx"
+#include <utility>
#include <vcl/svapp.hxx>
#include <basic/sbx.hxx>
#include <basic/sbmod.hxx>
@@ -54,11 +55,11 @@ constexpr OUStringLiteral BASSCRIPT_PROPERTY_CALLER = u"Caller";
// BasicScriptImpl
- BasicScriptImpl::BasicScriptImpl( const OUString& funcName, SbMethodRef const & xMethod )
+ BasicScriptImpl::BasicScriptImpl( OUString funcName, SbMethodRef xMethod )
: ::scripting_helper::OBroadcastHelperHolder( m_aMutex )
,OPropertyContainer( GetBroadcastHelper() )
- ,m_xMethod( xMethod )
- ,m_funcName( funcName )
+ ,m_xMethod(std::move( xMethod ))
+ ,m_funcName(std::move( funcName ))
,m_documentBasicManager( nullptr )
,m_xDocumentScriptContext()
{
@@ -66,11 +67,11 @@ constexpr OUStringLiteral BASSCRIPT_PROPERTY_CALLER = u"Caller";
}
- BasicScriptImpl::BasicScriptImpl( const OUString& funcName, SbMethodRef const & xMethod,
+ BasicScriptImpl::BasicScriptImpl( OUString funcName, SbMethodRef xMethod,
BasicManager& documentBasicManager, const Reference< XScriptInvocationContext >& documentScriptContext ) : ::scripting_helper::OBroadcastHelperHolder( m_aMutex )
,OPropertyContainer( GetBroadcastHelper() )
- ,m_xMethod( xMethod )
- ,m_funcName( funcName )
+ ,m_xMethod(std::move( xMethod ))
+ ,m_funcName(std::move( funcName ))
,m_documentBasicManager( &documentBasicManager )
,m_xDocumentScriptContext( documentScriptContext )
{
diff --git a/scripting/source/basprov/basscript.hxx b/scripting/source/basprov/basscript.hxx
index d0f9e6e7af85..e7a94d706ee7 100644
--- a/scripting/source/basprov/basscript.hxx
+++ b/scripting/source/basprov/basscript.hxx
@@ -67,12 +67,12 @@ namespace basprov
public:
BasicScriptImpl(
- const OUString& funcName,
- SbMethodRef const & xMethod
+ OUString funcName,
+ SbMethodRef xMethod
);
BasicScriptImpl(
- const OUString& funcName,
- SbMethodRef const & xMethod,
+ OUString funcName,
+ SbMethodRef xMethod,
BasicManager& documentBasicManager,
const css::uno::Reference< css::document::XScriptInvocationContext >& documentScriptContext
);