diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-26 08:32:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-26 19:56:02 +0100 |
commit | 2a421b26c0100b35d28b86a5d79afa15af9580dd (patch) | |
tree | 064240373eeec9600054ebb8493bb0e1fbd8576d /basic/source | |
parent | 2bf1cc7372088ec31ac5f0fb60de57feda59d3b7 (diff) |
loplugin:passstuffbyref improved return in basic,framework
Change-Id: Ib19836febb59f4e2bb07dc874cfc6baabc653237
Reviewed-on: https://gerrit.libreoffice.org/47065
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic/source')
-rw-r--r-- | basic/source/classes/sb.cxx | 4 | ||||
-rw-r--r-- | basic/source/inc/iosys.hxx | 6 | ||||
-rw-r--r-- | basic/source/inc/runtime.hxx | 4 | ||||
-rw-r--r-- | basic/source/runtime/iosys.cxx | 6 | ||||
-rw-r--r-- | basic/source/runtime/runtime.cxx | 2 | ||||
-rw-r--r-- | basic/source/sbx/sbxbase.cxx | 2 |
6 files changed, 12 insertions, 12 deletions
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 294f7ee5744c..1be75c333424 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -1448,7 +1448,7 @@ sal_uInt16 StarBASIC::GetCol1() { return GetSbData()->nCol1; } sal_uInt16 StarBASIC::GetCol2() { return GetSbData()->nCol2; } // Specific to error handler -ErrCode StarBASIC::GetErrorCode() { return GetSbData()->nCode; } +ErrCode const & StarBASIC::GetErrorCode() { return GetSbData()->nCode; } const OUString& StarBASIC::GetErrorText() { return GetSbData()->aErrMsg; } // From 1996-03-29: @@ -1763,7 +1763,7 @@ bool StarBASIC::ErrorHdl() return aErrorHdl.Call( this ); } -Link<StarBASIC*,bool> StarBASIC::GetGlobalErrorHdl() +Link<StarBASIC*,bool> const & StarBASIC::GetGlobalErrorHdl() { return GetSbData()->aErrHdl; } diff --git a/basic/source/inc/iosys.hxx b/basic/source/inc/iosys.hxx index 7d7e9e832633..9e1b4fe80778 100644 --- a/basic/source/inc/iosys.hxx +++ b/basic/source/inc/iosys.hxx @@ -60,10 +60,10 @@ class SbiStream public: SbiStream(); ~SbiStream(); - ErrCode Open( const OString&, StreamMode, SbiStreamFlags, short ); - ErrCode Close(); + ErrCode const & Open( const OString&, StreamMode, SbiStreamFlags, short ); + ErrCode const & Close(); ErrCode Read(OString&, sal_uInt16 = 0, bool bForceReadingPerByte=false); - ErrCode Read( char& ); + ErrCode const & Read( char& ); ErrCode Write( const OString& ); bool IsText() const { return !bool(nMode & SbiStreamFlags::Binary); } diff --git a/basic/source/inc/runtime.hxx b/basic/source/inc/runtime.hxx index 86baec31ac53..d566276922dc 100644 --- a/basic/source/inc/runtime.hxx +++ b/basic/source/inc/runtime.hxx @@ -167,7 +167,7 @@ public: void Abort(); // with current error code void Stop(); - ErrCode GetErr() { return nErr; } + ErrCode const & GetErr() { return nErr; } const OUString& GetErrorMsg() { return aErrorMsg; } sal_Int32 GetErl() { return nErl; } void EnableReschedule( bool bEnable ) { bReschedule = bEnable; } @@ -186,7 +186,7 @@ public: SbiDllMgr* GetDllMgr(); SbiRTLData* GetRTLData() const { return const_cast<SbiRTLData*>(&aRTLData); } - std::shared_ptr<SvNumberFormatter> GetNumberFormatter(); + std::shared_ptr<SvNumberFormatter> const & GetNumberFormatter(); sal_uInt32 GetStdDateIdx() const { return nStdDateIdx; } sal_uInt32 GetStdTimeIdx() const { return nStdTimeIdx; } sal_uInt32 GetStdDateTimeIdx() const { return nStdDateTimeIdx; } diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index 34ad8c28936b..49932c9e8316 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -445,7 +445,7 @@ void UCBStream::SetSize( sal_uInt64 ) } -ErrCode SbiStream::Open +ErrCode const & SbiStream::Open ( const OString& rName, StreamMode nStrmMode, SbiStreamFlags nFlags, short nL ) { nMode = nFlags; @@ -511,7 +511,7 @@ ErrCode SbiStream::Open return nError; } -ErrCode SbiStream::Close() +ErrCode const & SbiStream::Close() { if( pStrm ) { @@ -553,7 +553,7 @@ ErrCode SbiStream::Read(OString& rBuf, sal_uInt16 n, bool bForceReadingPerByte) return nError; } -ErrCode SbiStream::Read( char& ch ) +ErrCode const & SbiStream::Read( char& ch ) { nExpandOnWriteTo = 0; if (aLine.isEmpty()) diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 2b81778917e0..e4353dba40c5 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -357,7 +357,7 @@ SbiDllMgr* SbiInstance::GetDllMgr() } // #39629 create NumberFormatter with the help of a static method now -std::shared_ptr<SvNumberFormatter> SbiInstance::GetNumberFormatter() +std::shared_ptr<SvNumberFormatter> const & SbiInstance::GetNumberFormatter() { LanguageType eLangType = Application::GetSettings().GetLanguageTag().getLanguageType(); SvtSysLocale aSysLocale; diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx index 616d6edf556e..1b5a6b8eb228 100644 --- a/basic/source/sbx/sbxbase.cxx +++ b/basic/source/sbx/sbxbase.cxx @@ -94,7 +94,7 @@ void SbxBase::SetModified( bool b ) ResetFlag( SbxFlagBits::Modified ); } -ErrCode SbxBase::GetError() +ErrCode const & SbxBase::GetError() { return GetSbxData_Impl().eErrCode; } |