diff options
author | Noel Grandin <noel@peralex.com> | 2016-01-14 16:31:56 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-01-15 09:36:41 +0200 |
commit | f19e32b101d56ceb7215a6a9d45d39a2cd264189 (patch) | |
tree | 660e03934bc5a036c7538945ab60b2267e7a58c6 /rsc | |
parent | 802765dbe5f79748453c985da08824fb9ddefe11 (diff) |
loplugin:unusedmethods unused return value in rsc
Change-Id: I6301aed80083c21e26851817220de6e135eb4da7
Diffstat (limited to 'rsc')
-rw-r--r-- | rsc/inc/rscclobj.hxx | 4 | ||||
-rw-r--r-- | rsc/inc/rscconst.hxx | 2 | ||||
-rw-r--r-- | rsc/inc/rscdb.hxx | 8 | ||||
-rw-r--r-- | rsc/inc/rscdef.hxx | 4 | ||||
-rw-r--r-- | rsc/inc/rsckey.hxx | 2 | ||||
-rw-r--r-- | rsc/inc/rscrange.hxx | 7 | ||||
-rw-r--r-- | rsc/source/parser/rscdb.cxx | 7 | ||||
-rw-r--r-- | rsc/source/parser/rscibas.cxx | 3 | ||||
-rw-r--r-- | rsc/source/parser/rsckey.cxx | 4 | ||||
-rw-r--r-- | rsc/source/res/rscconst.cxx | 4 | ||||
-rw-r--r-- | rsc/source/res/rscrange.cxx | 8 | ||||
-rw-r--r-- | rsc/source/tools/rscdef.cxx | 13 |
12 files changed, 25 insertions, 41 deletions
diff --git a/rsc/inc/rscclobj.hxx b/rsc/inc/rscclobj.hxx index d7222a6d7e01..46aa38348cfe 100644 --- a/rsc/inc/rscclobj.hxx +++ b/rsc/inc/rscclobj.hxx @@ -70,9 +70,9 @@ public: ObjNode* pObjBiTree; // Zeiger auf Objektbaum RefNode( Atom nTyp ); sal_uInt32 GetId() const override; - bool Insert( RefNode* pTN ) //< insert a new node in the b-tree + void Insert( RefNode* pTN ) //< insert a new node in the b-tree { - return IdNode::Insert( static_cast<IdNode *>(pTN) ); + IdNode::Insert( static_cast<IdNode *>(pTN) ); } bool PutObjNode( ObjNode * pPutObject ); diff --git a/rsc/inc/rscconst.hxx b/rsc/inc/rscconst.hxx index df2b16ff56d5..1ed6b47e3075 100644 --- a/rsc/inc/rscconst.hxx +++ b/rsc/inc/rscconst.hxx @@ -39,7 +39,7 @@ public: virtual ~RscConst(); virtual RSCCLASS_TYPE GetClassType() const override; // sets the allowed values - ERRTYPE SetConstant( Atom nVarName, sal_Int32 lValue ); + void SetConstant( Atom nVarName, sal_Int32 lValue ); bool GetConstValue( Atom nConstId, sal_Int32 * pVal ) const; bool GetValueConst( sal_Int32 nValue, Atom * pConstId ) const; sal_uInt32 GetConstPos( Atom nConstId ); diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx index 1a164cb7ccc4..2c2530175c2d 100644 --- a/rsc/inc/rscdb.hxx +++ b/rsc/inc/rscdb.hxx @@ -151,7 +151,7 @@ class RscTypCont inline void SETCONST( RscConst *p1, const char * p2, ToolBoxItemType p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); } inline void SETCONST( RscConst *p1, const char * p2, ButtonType p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); } inline void SETCONST( RscConst *p1, const char * p2, WindowAlign p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); } - RscEnum * InitLangType(); + void InitLangType(); RscEnum * InitFieldUnitsType(); RscEnum * InitColor(); RscEnum * InitMapUnit(); @@ -263,11 +263,9 @@ public: RSCBYTEORDER_TYPE GetByteOrder() const { return nByteOrder; } rtl_TextEncoding GetSourceCharSet() const { return nSourceCharSet; } - rtl_TextEncoding SetSourceCharSet( rtl_TextEncoding aCharSet ) + void SetSourceCharSet( rtl_TextEncoding aCharSet ) { - rtl_TextEncoding aOld = nSourceCharSet; nSourceCharSet = aCharSet; - return aOld; } OString GetSearchPath() const { return aSearchPath; } void SetSysSearchPath( const OString& rStr ) { aSysSearchPath = rStr; } @@ -285,7 +283,7 @@ public: ERRTYPE WriteRc( WriteRcContext& rContext ); void WriteSrc( FILE * fOutput, sal_uLong nFileIndex, bool bName = true ); - sal_uInt32 PutTranslatorKey( sal_uInt64 nKey ); + void PutTranslatorKey( sal_uInt64 nKey ); void IncFilePos( sal_uLong nOffset ){ nFilePos += nOffset; } }; diff --git a/rsc/inc/rscdef.hxx b/rsc/inc/rscdef.hxx index 60ce424e636b..41e22f659a4d 100644 --- a/rsc/inc/rscdef.hxx +++ b/rsc/inc/rscdef.hxx @@ -143,7 +143,7 @@ protected: public: RscDefine * Search( const char * ); sal_uLong GetFileKey() const { return lFileKey; } - bool Evaluate(); + void Evaluate(); sal_Int32 GetNumber() const { return lId; } OString GetMacro(); }; @@ -215,7 +215,7 @@ public: RscFile(); ~RscFile(); - bool InsertDependFile( sal_uLong lDepFile, size_t lPos ); + void InsertDependFile( sal_uLong lDepFile, size_t lPos ); bool Depend( sal_uLong lDepend, sal_uLong lFree ); void SetIncFlag(){ bIncFile = true; }; bool IsIncFile(){ return bIncFile; }; diff --git a/rsc/inc/rsckey.hxx b/rsc/inc/rsckey.hxx index 79a613e3994a..4ca2812ff69d 100644 --- a/rsc/inc/rsckey.hxx +++ b/rsc/inc/rsckey.hxx @@ -43,7 +43,7 @@ public: Atom Put( Atom nName, sal_uInt32 nTyp, sal_IntPtr nValue ); Atom Put( const char * pName, sal_uInt32 nTyp, sal_IntPtr nValue ); Atom Put( const char * pName, sal_uInt32 nTyp ); - Atom Put( Atom nName, sal_uInt32 nTyp, RscTop * pClass ); + void Put( Atom nName, sal_uInt32 nTyp, RscTop * pClass ); // if true, it was found bool Get( Atom nName, KEY_STRUCT * pEle ); diff --git a/rsc/inc/rscrange.hxx b/rsc/inc/rscrange.hxx index 360edaa63b87..3bcd663df88c 100644 --- a/rsc/inc/rscrange.hxx +++ b/rsc/inc/rscrange.hxx @@ -40,7 +40,7 @@ public: virtual RSCCLASS_TYPE GetClassType() const override; RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, bool ) override; // sets the allowed range - ERRTYPE SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum ); + void SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum ); // returns the class size in bytes sal_uInt32 Size() override { return nSize; } // an assignment to a variable @@ -78,7 +78,7 @@ public: virtual RSCCLASS_TYPE GetClassType() const override; RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, bool ) override; // sets the allowed range - ERRTYPE SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum ); + void SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum ); // returns the class size in bytes sal_uInt32 Size() override { return nSize; } // an assignment to a variable @@ -120,11 +120,10 @@ public: RscIdRange( Atom nId, sal_uInt32 nTypId ); virtual RSCCLASS_TYPE GetClassType() const override; // sets the allowed range - ERRTYPE SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum ) + void SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum ) { nMin = nMinimum; nMax = nMaximum; - return ERR_OK; } RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, bool ) override; void Destroy( const RSCINST & rInst ) override; diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx index d3daab20d5af..c3c34e76c150 100644 --- a/rsc/source/parser/rscdb.cxx +++ b/rsc/source/parser/rscdb.cxx @@ -352,12 +352,11 @@ private: DECL_LINK_TYPED( CallBackWriteRc, const NameNode&, void ); DECL_LINK_TYPED( CallBackWriteSrc, const NameNode&, void ); - ERRTYPE WriteRc( RscTop * pCl, ObjNode * pRoot ) + void WriteRc( RscTop * pCl, ObjNode * pRoot ) { pClass = pCl; if( pRoot ) pRoot->EnumNodes( LINK( this, RscEnumerateObj, CallBackWriteRc ) ); - return aError; } ERRTYPE WriteSrc( RscTop * pCl, ObjNode * pRoot ){ pClass = pCl; @@ -639,10 +638,10 @@ bool MakeConsistent( RscTop * pRscTop ) return bRet; } -sal_uInt32 RscTypCont::PutTranslatorKey( sal_uInt64 nKey ) +void RscTypCont::PutTranslatorKey( sal_uInt64 nKey ) { aIdTranslator[ nKey ] = nFilePos; - return nPMId++; + nPMId++; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/rsc/source/parser/rscibas.cxx b/rsc/source/parser/rscibas.cxx index 0de9953356ef..6c1ee886a2a5 100644 --- a/rsc/source/parser/rscibas.cxx +++ b/rsc/source/parser/rscibas.cxx @@ -165,10 +165,9 @@ Atom RscLangEnum::AddLanguage( const char* pLang, RscNameTable& rNames ) return nResult; } -RscEnum * RscTypCont::InitLangType() +void RscTypCont::InitLangType() { aLangType.Init( aNmTb ); - return &aLangType; } RscEnum * RscTypCont::InitFieldUnitsType() diff --git a/rsc/source/parser/rsckey.cxx b/rsc/source/parser/rsckey.cxx index 0779e13f1934..351b2a456f1e 100644 --- a/rsc/source/parser/rsckey.cxx +++ b/rsc/source/parser/rsckey.cxx @@ -103,9 +103,9 @@ Atom RscNameTable::Put( const char * pName, sal_uInt32 nTyp ) return Put( nId, nTyp, (sal_IntPtr)nId ); }; -Atom RscNameTable::Put( Atom nName, sal_uInt32 nTyp, RscTop * pClass ) +void RscNameTable::Put( Atom nName, sal_uInt32 nTyp, RscTop * pClass ) { - return Put( nName, nTyp, reinterpret_cast<sal_IntPtr>(pClass) ); + Put( nName, nTyp, reinterpret_cast<sal_IntPtr>(pClass) ); }; bool RscNameTable::Get( Atom nName, KEY_STRUCT * pEle ) diff --git a/rsc/source/res/rscconst.cxx b/rsc/source/res/rscconst.cxx index 6e6c54c052cf..a61af44b2a47 100644 --- a/rsc/source/res/rscconst.cxx +++ b/rsc/source/res/rscconst.cxx @@ -44,7 +44,7 @@ RSCCLASS_TYPE RscConst::GetClassType() const return RSCCLASS_CONST; } -ERRTYPE RscConst::SetConstant( Atom nVarName, sal_Int32 lValue ) +void RscConst::SetConstant( Atom nVarName, sal_Int32 lValue ) { if( pVarArray ) pVarArray = static_cast<VarEle *>(rtl_reallocateMemory( static_cast<void *>(pVarArray), @@ -54,8 +54,6 @@ ERRTYPE RscConst::SetConstant( Atom nVarName, sal_Int32 lValue ) pVarArray[ nEntries ].nId = nVarName; pVarArray[ nEntries ].lValue = lValue; nEntries++; - - return ERR_OK; } bool RscConst::GetConstValue( Atom nConst, sal_Int32 * pValue ) const diff --git a/rsc/source/res/rscrange.cxx b/rsc/source/res/rscrange.cxx index 4164bfde30a7..9f7a73087f11 100644 --- a/rsc/source/res/rscrange.cxx +++ b/rsc/source/res/rscrange.cxx @@ -36,7 +36,7 @@ RSCCLASS_TYPE RscRange::GetClassType() const return RSCCLASS_NUMBER; } -ERRTYPE RscRange::SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum ) +void RscRange::SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum ) { if( nMinimum > nMaximum ) { @@ -48,8 +48,6 @@ ERRTYPE RscRange::SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum ) nMax = nMaximum; nMin = nMinimum; } - - return ERR_OK; } bool RscRange::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ) @@ -150,7 +148,7 @@ RSCCLASS_TYPE RscLongRange::GetClassType() const return RSCCLASS_NUMBER; } -ERRTYPE RscLongRange::SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum ) +void RscLongRange::SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum ) { if( nMinimum > nMaximum ) { @@ -162,8 +160,6 @@ ERRTYPE RscLongRange::SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum ) nMax = nMaximum; nMin = nMinimum; } - - return ERR_OK; } bool RscLongRange::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ) diff --git a/rsc/source/tools/rscdef.cxx b/rsc/source/tools/rscdef.cxx index 816fbd8a22d1..155382de4917 100644 --- a/rsc/source/tools/rscdef.cxx +++ b/rsc/source/tools/rscdef.cxx @@ -160,14 +160,10 @@ void RscDefine::DefineToNumber() SetName(OString::number(lId)); } -bool RscDefine::Evaluate() +void RscDefine::Evaluate() { - bool bRet = true; - if( pExp ) - bRet = !pExp->Evaluate( &lId ); - - return bRet; + pExp->Evaluate( &lId ); } RscDefine * RscDefine::Search( const char * pStr ) @@ -408,13 +404,13 @@ bool RscFile::Depend( sal_uLong lDepend, sal_uLong lFree ) return true; } -bool RscFile::InsertDependFile( sal_uLong lIncFile, size_t lPos ) +void RscFile::InsertDependFile( sal_uLong lIncFile, size_t lPos ) { for ( size_t i = 0, n = aDepLst.size(); i < n; ++i ) { RscDepend* pDep = aDepLst[ i ]; if( pDep->GetFileKey() == lIncFile ) - return true; + return; } // current pointer points to last element @@ -429,7 +425,6 @@ bool RscFile::InsertDependFile( sal_uLong lIncFile, size_t lPos ) ::std::advance( it, lPos ); aDepLst.insert( it, new RscDepend( lIncFile ) ); } - return true; } RscDefTree::~RscDefTree() |