diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-10 11:07:36 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-04-13 09:37:12 +0200 |
commit | ee094bd46f55118993c72af719dc046476f9f311 (patch) | |
tree | d4658be34517150ec7881e7929e38f533ff0b393 /basic | |
parent | 26ec80f47df1b32c5e1ae8c96d597ef8c90fee86 (diff) |
loplugin:staticmethods
Change-Id: If97f01a05294fa7efd59a8934c7b6f65cda5084a
Diffstat (limited to 'basic')
-rw-r--r-- | basic/inc/sbstdobj.hxx | 12 | ||||
-rw-r--r-- | basic/qa/cppunit/basictest.hxx | 2 | ||||
-rw-r--r-- | basic/source/basmgr/basicmanagerrepository.cxx | 6 | ||||
-rw-r--r-- | basic/source/basmgr/basmgr.cxx | 6 | ||||
-rw-r--r-- | basic/source/classes/sbxmod.cxx | 4 | ||||
-rw-r--r-- | basic/source/comp/codegen.cxx | 2 | ||||
-rw-r--r-- | basic/source/inc/basiccharclass.hxx | 2 | ||||
-rw-r--r-- | basic/source/inc/namecont.hxx | 11 | ||||
-rw-r--r-- | basic/source/inc/parser.hxx | 2 | ||||
-rw-r--r-- | basic/source/inc/runtime.hxx | 4 | ||||
-rw-r--r-- | basic/source/inc/stdobj.hxx | 4 | ||||
-rw-r--r-- | basic/source/runtime/ddectrl.hxx | 2 |
12 files changed, 27 insertions, 30 deletions
diff --git a/basic/inc/sbstdobj.hxx b/basic/inc/sbstdobj.hxx index ae7ab2dc7368..40cd961400de 100644 --- a/basic/inc/sbstdobj.hxx +++ b/basic/inc/sbstdobj.hxx @@ -109,12 +109,12 @@ protected: virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType ) SAL_OVERRIDE; - void MethClear( SbxVariable* pVar, SbxArray* pPar_, bool bWrite ); - void MethGetData( SbxVariable* pVar, SbxArray* pPar_, bool bWrite ); - void MethGetFormat( SbxVariable* pVar, SbxArray* pPar_, bool bWrite ); - void MethGetText( SbxVariable* pVar, SbxArray* pPar_, bool bWrite ); - void MethSetData( SbxVariable* pVar, SbxArray* pPar_, bool bWrite ); - void MethSetText( SbxVariable* pVar, SbxArray* pPar_, bool bWrite ); + static void MethClear( SbxVariable* pVar, SbxArray* pPar_, bool bWrite ); + static void MethGetData( SbxVariable* pVar, SbxArray* pPar_, bool bWrite ); + static void MethGetFormat( SbxVariable* pVar, SbxArray* pPar_, bool bWrite ); + static void MethGetText( SbxVariable* pVar, SbxArray* pPar_, bool bWrite ); + static void MethSetData( SbxVariable* pVar, SbxArray* pPar_, bool bWrite ); + static void MethSetText( SbxVariable* pVar, SbxArray* pPar_, bool bWrite ); public: TYPEINFO_OVERRIDE(); diff --git a/basic/qa/cppunit/basictest.hxx b/basic/qa/cppunit/basictest.hxx index 684da80cdc90..8bb5992705dc 100644 --- a/basic/qa/cppunit/basictest.hxx +++ b/basic/qa/cppunit/basictest.hxx @@ -126,7 +126,7 @@ class MacroSnippet DECL_LINK( BasicErrorHdl, StarBASIC * ); - ErrorDetail GetError() + static ErrorDetail GetError() { ErrorDetail aErr; aErr.sErrorText = StarBASIC::GetErrorText(); diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx index 45b63f2fcaa3..9da674b4c603 100644 --- a/basic/source/basmgr/basicmanagerrepository.cxx +++ b/basic/source/basmgr/basicmanagerrepository.cxx @@ -148,7 +148,7 @@ namespace basic <arg>_out_rStorage</arg> might or might not be <NULL/>), <FALSE/> otherwise. In the latter case, processing this document should stop. */ - bool impl_getDocumentStorage_nothrow( const Reference< XModel >& _rxDocument, Reference< XStorage >& _out_rStorage ); + static bool impl_getDocumentStorage_nothrow( const Reference< XModel >& _rxDocument, Reference< XStorage >& _out_rStorage ); /** retrieves the containers for Basic and Dialog libraries for a given document @@ -164,7 +164,7 @@ namespace basic @return <TRUE/> if and only if both containers exist, and could successfully be retrieved */ - bool impl_getDocumentLibraryContainers_nothrow( + static bool impl_getDocumentLibraryContainers_nothrow( const Reference< XModel >& _rxDocument, Reference< XPersistentLibraryContainer >& _out_rxBasicLibraries, Reference< XPersistentLibraryContainer >& _out_rxDialogLibraries @@ -172,7 +172,7 @@ namespace basic /** initializes the given library containers, which belong to a document */ - void impl_initDocLibraryContainers_nothrow( + static void impl_initDocLibraryContainers_nothrow( const Reference< XPersistentLibraryContainer >& _rxBasicLibraries, const Reference< XPersistentLibraryContainer >& _rxDialogLibraries ); diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index 6d491e3f394e..795b97207ef4 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -1059,7 +1059,7 @@ bool BasicManager::ImpLoadLibrary( BasicLibInfo* pLibInfo, SotStorage* pCurStora return false; } -bool BasicManager::ImplEncryptStream( SvStream& rStrm ) const +bool BasicManager::ImplEncryptStream( SvStream& rStrm ) { sal_Size nPos = rStrm.Tell(); sal_uInt32 nCreator; @@ -1114,7 +1114,7 @@ bool BasicManager::ImplLoadBasic( SvStream& rStrm, StarBASICRef& rOldBasic ) con return bLoaded; } -void BasicManager::CheckModules( StarBASIC* pLib, bool bReference ) const +void BasicManager::CheckModules( StarBASIC* pLib, bool bReference ) { if ( !pLib ) { @@ -1128,7 +1128,7 @@ void BasicManager::CheckModules( StarBASIC* pLib, bool bReference ) const DBG_ASSERT( pModule, "Module not received!" ); if ( !pModule->IsCompiled() && !StarBASIC::GetErrorCode() ) { - pLib->Compile( pModule ); + StarBASIC::Compile( pModule ); } } diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index c2b0e793df8a..36c852042847 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -466,7 +466,7 @@ public: return dInst; } - void QuitApplication() + static void QuitApplication() { uno::Reference< frame::XDesktop2 > xDeskTop = frame::Desktop::create( comphelper::getProcessComponentContext() ); xDeskTop->terminate(); @@ -1784,7 +1784,7 @@ void SbModule::GetCodeCompleteDataFromParse(CodeCompleteDataCache& aCache) } -OUString SbModule::GetKeywordCase( const OUString& sKeyword ) const +OUString SbModule::GetKeywordCase( const OUString& sKeyword ) { return SbiParser::GetKeywordCase( sKeyword ); } diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx index 8b199c4faa4d..691fd9a79e64 100644 --- a/basic/source/comp/codegen.cxx +++ b/basic/source/comp/codegen.cxx @@ -408,7 +408,7 @@ class PCodeBufferWalker private: T m_nBytes; sal_uInt8* m_pCode; - T readParam( sal_uInt8*& pCode ) + static T readParam( sal_uInt8*& pCode ) { short nBytes = sizeof( T ); T nOp1=0; diff --git a/basic/source/inc/basiccharclass.hxx b/basic/source/inc/basiccharclass.hxx index e6fea6545eee..d625ae312b37 100644 --- a/basic/source/inc/basiccharclass.hxx +++ b/basic/source/inc/basiccharclass.hxx @@ -33,7 +33,7 @@ public: BasicCharClass(); bool isLetter( sal_Unicode c ); - bool isLetterUnicode( sal_Unicode c ); + static bool isLetterUnicode( sal_Unicode c ); bool isAlpha( sal_Unicode c, bool bCompatible ); bool isAlphaNumeric( sal_Unicode c, bool bCompatible ); static bool isWhitespace( sal_Unicode c ); diff --git a/basic/source/inc/namecont.hxx b/basic/source/inc/namecont.hxx index c7258f5337fb..9e20a0865363 100644 --- a/basic/source/inc/namecont.hxx +++ b/basic/source/inc/namecont.hxx @@ -389,7 +389,7 @@ public: } void enterMethod(); - void leaveMethod(); + static void leaveMethod(); bool isDisposed() const { return rBHelper.bInDispose || rBHelper.bDisposed; } void checkDisposed() const; @@ -540,18 +540,15 @@ public: class LibraryContainerMethodGuard { -private: - SfxLibraryContainer& m_rContainer; public: LibraryContainerMethodGuard( SfxLibraryContainer& _rContainer ) - :m_rContainer( _rContainer ) { - m_rContainer.enterMethod(); + _rContainer.enterMethod(); } ~LibraryContainerMethodGuard() { - m_rContainer.leaveMethod(); + basic::SfxLibraryContainer::leaveMethod(); } }; @@ -732,7 +729,7 @@ class ScriptSubPackageIterator sal_Int32 m_nSubPkgCount; sal_Int32 m_iNextSubPkg; - com::sun::star::uno::Reference< com::sun::star::deployment::XPackage > + static com::sun::star::uno::Reference< com::sun::star::deployment::XPackage > implDetectScriptPackage( const com::sun::star::uno::Reference < com::sun::star::deployment::XPackage >& rPackage, bool& rbPureDialogLib ); diff --git a/basic/source/inc/parser.hxx b/basic/source/inc/parser.hxx index 0e39423b48c4..018b8955a2e2 100644 --- a/basic/source/inc/parser.hxx +++ b/basic/source/inc/parser.hxx @@ -58,7 +58,7 @@ class SbiParser : public SbiTokenizer void DefEnum( bool bPrivate ); // Parse enum declaration void DefDeclare( bool bPrivate ); void EnableCompatibility(); - bool IsUnoInterface( const OUString& sTypeName ); + static bool IsUnoInterface( const OUString& sTypeName ); public: SbxArrayRef rTypeArray; SbxArrayRef rEnumArray; diff --git a/basic/source/inc/runtime.hxx b/basic/source/inc/runtime.hxx index 4c8e99df7458..33758e30d252 100644 --- a/basic/source/inc/runtime.hxx +++ b/basic/source/inc/runtime.hxx @@ -330,7 +330,7 @@ class SbiRuntime // #56204 swap out DIM-functionality into help method (step0.cxx) void DimImpl( SbxVariableRef refVar ); - bool implIsClass( SbxObject* pObj, const OUString& aClass ); + static bool implIsClass( SbxObject* pObj, const OUString& aClass ); void StepSETCLASS_impl( sal_uInt32 nOp1, bool bHandleDflt = false ); @@ -380,7 +380,7 @@ class SbiRuntime void StepDCREATE_REDIMP(sal_uInt32,sal_uInt32), StepDCREATE_IMPL(sal_uInt32,sal_uInt32); void StepFIND_CM( sal_uInt32, sal_uInt32 ); void StepFIND_STATIC( sal_uInt32, sal_uInt32 ); - void implHandleSbxFlags( SbxVariable* pVar, SbxDataType t, sal_uInt32 nOp2 ); + static void implHandleSbxFlags( SbxVariable* pVar, SbxDataType t, sal_uInt32 nOp2 ); public: void SetVBAEnabled( bool bEnabled ); bool IsImageFlag( SbiImageFlags n ) const; diff --git a/basic/source/inc/stdobj.hxx b/basic/source/inc/stdobj.hxx index 52b144196607..ccd4d70f4ca2 100644 --- a/basic/source/inc/stdobj.hxx +++ b/basic/source/inc/stdobj.hxx @@ -29,9 +29,9 @@ class SbiStdObject : public SbxObject { SbStdFactory* pStdFactory; - virtual ~SbiStdObject(); + virtual ~SbiStdObject(); using SbxVariable::GetInfo; - SbxInfo* GetInfo( short ); + static SbxInfo* GetInfo( short ); virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType ) SAL_OVERRIDE; public: diff --git a/basic/source/runtime/ddectrl.hxx b/basic/source/runtime/ddectrl.hxx index 1f0a9624cb24..0bcfd32d94d5 100644 --- a/basic/source/runtime/ddectrl.hxx +++ b/basic/source/runtime/ddectrl.hxx @@ -30,7 +30,7 @@ class SbiDdeControl { private: DECL_LINK( Data, DdeData* ); - SbError GetLastErr( DdeConnection* ); + static SbError GetLastErr( DdeConnection* ); size_t GetFreeChannel(); std::vector<DdeConnection*> aConvList; OUString aData; |