diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-13 09:32:53 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-04-13 13:27:51 +0200 |
commit | 311bc1fc8b39d7f2168a04437034fb5b29c2c8b2 (patch) | |
tree | 6fc2f7582e7a4f6f9a3cff1153e0d2c4633c26fe /basic | |
parent | 2d72addff24ddab4842e2660062a58ccfd9cd0d3 (diff) |
loplugin:passstuffbyref in basic
Change-Id: Ie93b33502325f00ba95ab168a445a347148f9edd
Diffstat (limited to 'basic')
-rw-r--r-- | basic/inc/sbstdobj.hxx | 4 | ||||
-rw-r--r-- | basic/source/basmgr/basmgr.cxx | 2 | ||||
-rw-r--r-- | basic/source/inc/dlgcont.hxx | 4 | ||||
-rw-r--r-- | basic/source/inc/image.hxx | 2 | ||||
-rw-r--r-- | basic/source/inc/runtime.hxx | 2 | ||||
-rw-r--r-- | basic/source/inc/sbunoobj.hxx | 10 |
6 files changed, 12 insertions, 12 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; } }; |