From a45827b2308febc7369db27fb489a6d1389534e1 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 28 Jul 2015 08:39:57 +0200 Subject: loplugin:unusedmethods Change-Id: Ib4d77ee01e7362f5951f81fceeca3c489872d971 Reviewed-on: https://gerrit.libreoffice.org/17378 Tested-by: Jenkins Reviewed-by: Noel Grandin --- idl/inc/basobj.hxx | 7 ------- idl/inc/bastype.hxx | 3 --- idl/inc/database.hxx | 18 ++++-------------- idl/inc/hash.hxx | 1 - idl/inc/lex.hxx | 18 ------------------ idl/inc/module.hxx | 13 +------------ idl/inc/object.hxx | 12 ------------ idl/inc/slot.hxx | 27 ++------------------------- idl/inc/types.hxx | 24 ------------------------ 9 files changed, 7 insertions(+), 116 deletions(-) (limited to 'idl') diff --git a/idl/inc/basobj.hxx b/idl/inc/basobj.hxx index c601fb1964ca..81194182db3c 100644 --- a/idl/inc/basobj.hxx +++ b/idl/inc/basobj.hxx @@ -59,10 +59,6 @@ public: void Push( SvMetaObject * pObj ) { aList.push_back( pObj ); } SvMetaObject * Pop() { return aList.pop_back(); } - SvMetaObject * Top() const { return aList.back(); } - void Clear() { aList.clear(); } - sal_uLong Count() const { return aList.size(); } - SvMetaObject * Get( TypeId nType ) { for( SvMetaObjectMemberList::reverse_iterator it = aList.rbegin(); it != aList.rend(); ++it ) @@ -92,8 +88,6 @@ public: SvMetaName(); virtual bool SetName( const OString& rName, SvIdlDataBase * = NULL ); - void SetDescription( const OString& rText ) - { aDescription.setString(rText); } const SvHelpContext& GetHelpContext() const { return aHelpContext; } virtual const SvString & GetName() const { return aName; } virtual const SvString & GetHelpText() const { return aHelpText; } @@ -171,7 +165,6 @@ public: SvMetaModule * GetModule() const; const SvGlobalName &GetUUId() const; - const SvVersion & GetVersion() const { return aVersion; } void SetModule( SvIdlDataBase & rBase ); virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE; diff --git a/idl/inc/bastype.hxx b/idl/inc/bastype.hxx index 62052c0c7c4a..1b87c11589b4 100644 --- a/idl/inc/bastype.hxx +++ b/idl/inc/bastype.hxx @@ -55,7 +55,6 @@ public: SvBOOL & operator = ( bool n ) { nVal = n; bSet = true; return *this; } operator bool() const { return nVal; } - bool Is() const { return nVal; } bool IsSet() const { return bSet; } friend SvStream& WriteSvBOOL(SvStream &, const SvBOOL &); @@ -93,8 +92,6 @@ public: class SvNumberIdentifier : public SvIdentifier { sal_uInt32 nValue; - // must not be used - bool ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ); public: SvNumberIdentifier() : nValue( 0 ) {}; bool IsSet() const diff --git a/idl/inc/database.hxx b/idl/inc/database.hxx index 050f44ca8586..087356b7e904 100644 --- a/idl/inc/database.hxx +++ b/idl/inc/database.hxx @@ -85,11 +85,10 @@ public: ~SvIdlDataBase(); SvMetaAttributeMemberList& GetAttrList() { return aAttrList; } - SvStringHashTable * GetIdTable() { return pIdTable; } - SvMetaTypeMemberList & GetTypeList(); - SvMetaClassMemberList & GetClassList() { return aClassList; } - SvMetaModuleMemberList & GetModuleList() { return aModuleList; } - SvMetaModule * GetModule( const OString& rName ); + SvMetaTypeMemberList & GetTypeList(); + SvMetaClassMemberList & GetClassList() { return aClassList; } + SvMetaModuleMemberList & GetModuleList() { return aModuleList; } + SvMetaModule * GetModule( const OString& rName ); // list of used types while writing SvMetaTypeMemberList aUsedTypes; @@ -115,15 +114,6 @@ public: void WriteError( SvTokenStream & rInStm ); void SetError( const OString& rError, SvToken& rTok ); void Push( SvMetaObject * pObj ); - bool Pop( bool bOk, SvTokenStream & rInStm, sal_uInt32 nTokPos ) - { - GetStack().Pop(); - if( bOk ) - aError.Clear(); - else - rInStm.Seek( nTokPos ); - return bOk; - } sal_uInt32 GetUniqueId() { return ++nUniqueId; } bool FindId( const OString& rIdName, sal_uLong * pVal ); bool InsertId( const OString& rIdName, sal_uLong nVal ); diff --git a/idl/inc/hash.hxx b/idl/inc/hash.hxx index a0450dbe109c..fc7258bdfb6e 100644 --- a/idl/inc/hash.hxx +++ b/idl/inc/hash.hxx @@ -73,7 +73,6 @@ public: const OString& GetName() const { return aName; } bool HasId() const { return bHasId; } - sal_uInt32 GetId() const { return nHashId; } void SetValue( sal_uLong n ) { nValue = n; } sal_uLong GetValue() const { return nValue; } diff --git a/idl/inc/lex.hxx b/idl/inc/lex.hxx index 5f5b18908814..ffcb0c91ee30 100644 --- a/idl/inc/lex.hxx +++ b/idl/inc/lex.hxx @@ -57,7 +57,6 @@ public: SvToken & operator = ( const SvToken & rObj ); OString GetTokenAsString() const; - SVTOKEN_ENUM GetType() const { return nType; } void SetLine( sal_uLong nLineP ) { nLine = nLineP; } sal_uLong GetLine() const { return nLine; } @@ -78,7 +77,6 @@ public: || nType == SVTOKEN_HASHID; } bool IsChar() const { return nType == SVTOKEN_CHAR; } - bool IsRttiBase() const { return nType == SVTOKEN_RTTIBASE; } bool IsEof() const { return nType == SVTOKEN_EOF; } const OString& GetString() const @@ -95,7 +93,6 @@ public: { pHash = pHashP; nType = SVTOKEN_HASHID; } bool HasHash() const { return nType == SVTOKEN_HASHID; } - SvStringHashEntry * GetHash() const { return pHash; } bool Is( SvStringHashEntry * pEntry ) const { return IsIdentifierHash() && pHash == pEntry; } }; @@ -179,10 +176,6 @@ public: const OUString & GetFileName() const { return aFileName; } SvStream & GetStream() { return rInStream; } - void SetTabSize( sal_uInt16 nTabSizeP ) - { nTabSize = nTabSizeP; } - sal_uInt16 GetTabSize() const { return nTabSize; } - SvToken* GetToken_PrevAll() { boost::ptr_vector::iterator pRetToken = pCurToken; @@ -244,17 +237,6 @@ public: SetMax(); } - void SeekRel( sal_uInt32 nRelPos ) - { - sal_uInt32 relIdx = Tell() + nRelPos; - - if ( relIdx < aTokList.size()) - { - pCurToken = aTokList.begin()+ (Tell() + nRelPos ); - SetMax(); - } - } - void SeekEnd() { pCurToken = aTokList.begin()+nMaxPos; diff --git a/idl/inc/module.hxx b/idl/inc/module.hxx index a9e800b78ab5..c8d1c40afc8a 100644 --- a/idl/inc/module.hxx +++ b/idl/inc/module.hxx @@ -55,24 +55,13 @@ protected: public: TYPEINFO_OVERRIDE(); - const OUString & GetIdlFileName() const { return aIdlFileName; } - const OString& GetModulePrefix() const { return aModulePrefix.getString(); } - - virtual bool SetName( const OString& rName, SvIdlDataBase * = NULL ) SAL_OVERRIDE; - - const OString& GetHelpFileName() const { return aHelpFileName.getString(); } - const OString& GetTypeLibFileName() const { return aTypeLibFile.getString(); } - - const SvMetaAttributeMemberList & GetAttrList() const { return aAttrList; } - const SvMetaTypeMemberList & GetTypeList() const { return aTypeList; } - const SvMetaClassMemberList & GetClassList() const { return aClassList; } + virtual bool SetName( const OString& rName, SvIdlDataBase * = NULL ) SAL_OVERRIDE; SvMetaModule( const OUString & rIdlFileName, bool bImported ); bool FillNextName( SvGlobalName * ); bool IsImported() const { return bImported; } - bool IsModified() const { return bIsModified; } virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE; diff --git a/idl/inc/object.hxx b/idl/inc/object.hxx index 1f0a0721f2c7..37788d372ad1 100644 --- a/idl/inc/object.hxx +++ b/idl/inc/object.hxx @@ -56,9 +56,6 @@ public: void SetAutomation( bool rAutomation ) { aAutomation = rAutomation; } - bool GetAutomation() const - { return aAutomation; } - void SetClass( SvMetaClass * pClass ) { xClass = pClass; } SvMetaClass * GetClass() const @@ -106,17 +103,8 @@ public: TYPEINFO_OVERRIDE(); SvMetaClass(); - bool GetAutomation() const - { return aAutomation; } - SvMetaClass * GetSuperClass() const - { return aSuperClass; } - void FillClasses( SvMetaClassList & rList ); - const SvClassElementMemberList& - GetClassList() const - { return aClassList; } - virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE; virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) SAL_OVERRIDE; }; diff --git a/idl/inc/slot.hxx b/idl/inc/slot.hxx index 3014d327b8e4..eee879b817bf 100644 --- a/idl/inc/slot.hxx +++ b/idl/inc/slot.hxx @@ -137,16 +137,6 @@ protected: } void SetRecordAbsolute( bool bSet ) { aRecordAbsolute = bSet; } - void SetHasDialog( bool bSet ) - { aHasDialog = bSet; } - void SetMenuConfig( bool bSet ) - { aMenuConfig = bSet; } - void SetToolBoxConfig( bool bSet ) - { aToolBoxConfig = bSet; } - void SetStatusBarConfig( bool bSet ) - { aStatusBarConfig = bSet; } - void SetAccelConfig( bool bSet ) - { aAccelConfig = bSet; } void SetAllConfig( bool bSet ) { aMenuConfig = bSet; @@ -154,14 +144,6 @@ protected: aStatusBarConfig = bSet; aAccelConfig = bSet; } - void SetFastCall( bool bSet ) - { aFastCall = bSet; } - void SetContainer( bool bSet ) - { aContainer = bSet; } - void SetImageRotation( bool bSet ) - { aImageRotation = bSet; } - void SetImageReflection( bool bSet ) - { aImageReflection = bSet; } public: TYPEINFO_OVERRIDE(); @@ -210,19 +192,14 @@ public: bool GetContainer() const; bool GetImageRotation() const; bool GetImageReflection() const; - SvMetaSlot* GetLinkedSlot() const - { return pLinkedSlot; } - SvMetaSlot* GetNextSlot() const - { return pNextSlot; } - sal_uLong GetListPos() const + + sal_uLong GetListPos() const { return nListPos; } void SetListPos(sal_uLong n) { nListPos = n; } void ResetSlotPointer() { pNextSlot = pLinkedSlot = 0; } - SvMetaEnumValue* GetEnumValue() const - { return pEnumValue; } virtual bool Test( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE; virtual void ReadAttributesSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) SAL_OVERRIDE; diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx index aa701f412847..79b976d5d4b1 100644 --- a/idl/inc/types.hxx +++ b/idl/inc/types.hxx @@ -54,34 +54,15 @@ public: void SetNewAttribute( bool bNew ) { bNewAttr = bNew; } - bool IsNewAttribute() const - { return bNewAttr; } bool GetReadonly() const; - void SetSlotId( const SvNumberIdentifier & rId ) { aSlotId = rId; } const SvNumberIdentifier & GetSlotId() const; - - void SetExport( bool bSet ) - { aExport = bSet; } bool GetExport() const; - - void SetHidden( bool bSet ) - { aHidden = bSet; } bool GetHidden() const; - - void SetAutomation( bool bSet ) - { aAutomation = bSet; } bool GetAutomation() const; - - void SetIsCollection( bool bSet ) - { aIsCollection = bSet; } bool GetIsCollection() const; - void SetReadOnlyDoc( bool bSet ) - { aReadOnlyDoc = bSet; } bool GetReadOnlyDoc() const; - - void SetType( SvMetaType * pT ) { aType = pT; } SvMetaType * GetType() const; virtual bool IsMethod() const; @@ -148,10 +129,6 @@ public: { return pAttrList ? pAttrList->size() : 0L; } - void AppendAttr( SvMetaAttribute * pAttr ) - { - GetAttrList().push_back( pAttr ); - } void SetType( int nT ); int GetType() const { return nType; } @@ -227,7 +204,6 @@ public: TYPEINFO_OVERRIDE(); SvMetaTypeEnum(); - sal_uInt16 GetMaxValue() const; sal_uLong Count() const { return aEnumValueList.size(); } const OString& GetPrefix() const { return aPrefix; } SvMetaEnumValue * GetObject( sal_uLong n ) const -- cgit