summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-13 09:32:53 +0200
committerNoel Grandin <noel@peralex.com>2016-04-13 13:27:51 +0200
commit311bc1fc8b39d7f2168a04437034fb5b29c2c8b2 (patch)
tree6fc2f7582e7a4f6f9a3cff1153e0d2c4633c26fe
parent2d72addff24ddab4842e2660062a58ccfd9cd0d3 (diff)
loplugin:passstuffbyref in basic
Change-Id: Ie93b33502325f00ba95ab168a445a347148f9edd
-rw-r--r--basic/inc/sbstdobj.hxx4
-rw-r--r--basic/source/basmgr/basmgr.cxx2
-rw-r--r--basic/source/inc/dlgcont.hxx4
-rw-r--r--basic/source/inc/image.hxx2
-rw-r--r--basic/source/inc/runtime.hxx2
-rw-r--r--basic/source/inc/sbunoobj.hxx10
-rw-r--r--include/basic/basmgr.hxx4
-rw-r--r--include/basic/sbmod.hxx2
-rw-r--r--include/basic/sbstar.hxx2
9 files changed, 16 insertions, 16 deletions
diff --git a/basic/inc/sbstdobj.hxx b/basic/inc/sbstdobj.hxx
index 100657ccf8eb..2b3bf05ebbfb 100644
--- a/basic/inc/sbstdobj.hxx
+++ b/basic/inc/sbstdobj.hxx
@@ -52,7 +52,7 @@ public:
SbStdPicture();
virtual SbxVariable* Find( const OUString&, SbxClassType ) override;
- Graphic GetGraphic() const { return aGraphic; }
+ const Graphic& GetGraphic() const { return aGraphic; }
void SetGraphic( const Graphic& rGrf ) { aGraphic = rGrf; }
};
@@ -93,7 +93,7 @@ public:
void SetSize( sal_uInt16 nS ) { nSize = nS; }
sal_uInt16 GetSize() const { return nSize; }
void SetFontName( const OUString& rName ) { aName = rName; }
- OUString GetFontName() const { return aName; }
+ const OUString& GetFontName() const { return aName; }
};
// class SbStdClipboard
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 627846263112..65b836d4fa13 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -413,7 +413,7 @@ public:
static BasicLibInfo* Create( SotStorageStream& rSStream );
- uno::Reference< script::XLibraryContainer > GetLibraryContainer()
+ const uno::Reference< script::XLibraryContainer >& GetLibraryContainer()
{ return mxScriptCont; }
void SetLibraryContainer( const uno::Reference< script::XLibraryContainer >& xScriptCont )
{ mxScriptCont = xScriptCont; }
diff --git a/basic/source/inc/dlgcont.hxx b/basic/source/inc/dlgcont.hxx
index 1a5354898a80..2955c5c2490c 100644
--- a/basic/source/inc/dlgcont.hxx
+++ b/basic/source/inc/dlgcont.hxx
@@ -137,10 +137,10 @@ public:
virtual css::uno::Reference< css::resource::XStringResourceResolver >
SAL_CALL getStringResource( ) throw (css::uno::RuntimeException, std::exception) override;
- OUString getName()
+ const OUString& getName()
{ return m_aName; }
- css::uno::Reference< css::resource::XStringResourcePersistence >
+ const css::uno::Reference< css::resource::XStringResourcePersistence >&
getStringResourcePersistence()
{
return m_xStringResourcePersistence;
diff --git a/basic/source/inc/image.hxx b/basic/source/inc/image.hxx
index cc4b7de10c9e..5e46c8dace48 100644
--- a/basic/source/inc/image.hxx
+++ b/basic/source/inc/image.hxx
@@ -90,7 +90,7 @@ public:
OUString GetString( short nId ) const;
const SbxObject* FindType (const OUString& aTypeName) const;
- SbxArrayRef GetEnums() { return rEnums; }
+ const SbxArrayRef& GetEnums() { return rEnums; }
void SetFlag( SbiImageFlags n ) { nFlags |= n; }
bool IsFlag( SbiImageFlags n ) const { return bool(nFlags & n); }
diff --git a/basic/source/inc/runtime.hxx b/basic/source/inc/runtime.hxx
index 50dbb5b1170e..d7ce4a310813 100644
--- a/basic/source/inc/runtime.hxx
+++ b/basic/source/inc/runtime.hxx
@@ -175,7 +175,7 @@ public:
void Stop();
SbError GetErr() { return nErr; }
- OUString GetErrorMsg() { return aErrorMsg; }
+ const OUString& GetErrorMsg() { return aErrorMsg; }
sal_Int32 GetErl() { return nErl; }
void EnableReschedule( bool bEnable ) { bReschedule = bEnable; }
bool IsReschedule() { return bReschedule; }
diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx
index cbc3c6f57499..296940da4a8b 100644
--- a/basic/source/inc/sbunoobj.hxx
+++ b/basic/source/inc/sbunoobj.hxx
@@ -49,7 +49,7 @@ public:
StructRefInfo( css::uno::Any& aAny, css::uno::Type const & rType, sal_Int32 nPos ) : maAny( aAny ), maType( rType ), mnPos( nPos ) {}
sal_Int32 getPos() const { return mnPos; }
- css::uno::Type getType() const { return maType; }
+ const css::uno::Type& getType() const { return maType; }
OUString getTypeName() const;
css::uno::Any& getRootAnyRef() { return maAny; };
@@ -82,7 +82,7 @@ class SbUnoStructRefObject: public SbxObject
OUString getDbgObjectName();
public:
StructRefInfo getStructMember( const OUString& rMember );
- StructRefInfo getStructInfo() { return maMemberInfo; }
+ const StructRefInfo& getStructInfo() { return maMemberInfo; }
SbUnoStructRefObject( const OUString& aName_, const StructRefInfo& rMemberInfo );
virtual ~SbUnoStructRefObject();
@@ -133,8 +133,8 @@ public:
// give out value
css::uno::Any getUnoAny();
- css::uno::Reference< css::beans::XIntrospectionAccess > getIntrospectionAccess() { return mxUnoAccess; }
- css::uno::Reference< css::script::XInvocation > getInvocation() { return mxInvocation; }
+ const css::uno::Reference< css::beans::XIntrospectionAccess >& getIntrospectionAccess() { return mxUnoAccess; }
+ const css::uno::Reference< css::script::XInvocation >& getInvocation() { return mxInvocation; }
void Notify( SfxBroadcaster&, const SfxHint& rHint ) override;
@@ -276,7 +276,7 @@ public:
virtual ~SbUnoServiceCtor();
virtual SbxInfo* GetInfo() override;
- css::uno::Reference< css::reflection::XServiceConstructorDescription > getServiceCtorDesc()
+ const css::uno::Reference< css::reflection::XServiceConstructorDescription >& getServiceCtorDesc()
{ return m_xServiceCtorDesc; }
};
diff --git a/include/basic/basmgr.hxx b/include/basic/basmgr.hxx
index 8b65beff4e27..9f493873f930 100644
--- a/include/basic/basmgr.hxx
+++ b/include/basic/basmgr.hxx
@@ -147,9 +147,9 @@ public:
static void LegacyDeleteBasicManager( BasicManager*& _rpManager );
void SetStorageName( const OUString& rName ) { maStorageName = rName; }
- OUString GetStorageName() const { return maStorageName; }
+ const OUString& GetStorageName() const { return maStorageName; }
void SetName( const OUString& rName ) { aName = rName; }
- OUString GetName() const { return aName; }
+ const OUString& GetName() const { return aName; }
sal_uInt16 GetLibCount() const;
diff --git a/include/basic/sbmod.hxx b/include/basic/sbmod.hxx
index dc07ba7cf2c1..23ef22009671 100644
--- a/include/basic/sbmod.hxx
+++ b/include/basic/sbmod.hxx
@@ -131,7 +131,7 @@ public:
css::uno::Reference< css::script::XInvocation > GetUnoModule();
bool createCOMWrapperForIface( css::uno::Any& o_rRetAny, SbClassModuleObject* pProxyClassModuleObject );
void GetCodeCompleteDataFromParse(CodeCompleteDataCache& aCache);
- SbxArrayRef GetMethods() { return pMethods;}
+ const SbxArrayRef& GetMethods() { return pMethods;}
static OUString GetKeywordCase( const OUString& sKeyword );
};
diff --git a/include/basic/sbstar.hxx b/include/basic/sbstar.hxx
index a0e23453ba8a..1fda1b5310a3 100644
--- a/include/basic/sbstar.hxx
+++ b/include/basic/sbstar.hxx
@@ -152,7 +152,7 @@ public:
void SetVBAEnabled( bool bEnabled );
bool isVBAEnabled();
- SbxObjectRef getRTL() { return pRtl; }
+ const SbxObjectRef& getRTL() { return pRtl; }
bool IsDocBasic() { return bDocBasic; }
SbxVariable* VBAFind( const OUString& rName, SbxClassType t );
bool GetUNOConstant( const OUString& rName, css::uno::Any& aOut );