loplugin:unusedmethods unused return value in rsc
Change-Id: I6301aed80083c21e26851817220de6e135eb4da7
This commit is contained in:
@@ -70,9 +70,9 @@ public:
|
|||||||
ObjNode* pObjBiTree; // Zeiger auf Objektbaum
|
ObjNode* pObjBiTree; // Zeiger auf Objektbaum
|
||||||
RefNode( Atom nTyp );
|
RefNode( Atom nTyp );
|
||||||
sal_uInt32 GetId() const override;
|
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 );
|
bool PutObjNode( ObjNode * pPutObject );
|
||||||
|
|
||||||
|
@@ -39,7 +39,7 @@ public:
|
|||||||
virtual ~RscConst();
|
virtual ~RscConst();
|
||||||
virtual RSCCLASS_TYPE GetClassType() const override;
|
virtual RSCCLASS_TYPE GetClassType() const override;
|
||||||
// sets the allowed values
|
// 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 GetConstValue( Atom nConstId, sal_Int32 * pVal ) const;
|
||||||
bool GetValueConst( sal_Int32 nValue, Atom * pConstId ) const;
|
bool GetValueConst( sal_Int32 nValue, Atom * pConstId ) const;
|
||||||
sal_uInt32 GetConstPos( Atom nConstId );
|
sal_uInt32 GetConstPos( Atom nConstId );
|
||||||
|
@@ -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, 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, 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)); }
|
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 * InitFieldUnitsType();
|
||||||
RscEnum * InitColor();
|
RscEnum * InitColor();
|
||||||
RscEnum * InitMapUnit();
|
RscEnum * InitMapUnit();
|
||||||
@@ -263,11 +263,9 @@ public:
|
|||||||
|
|
||||||
RSCBYTEORDER_TYPE GetByteOrder() const { return nByteOrder; }
|
RSCBYTEORDER_TYPE GetByteOrder() const { return nByteOrder; }
|
||||||
rtl_TextEncoding GetSourceCharSet() const { return nSourceCharSet; }
|
rtl_TextEncoding GetSourceCharSet() const { return nSourceCharSet; }
|
||||||
rtl_TextEncoding SetSourceCharSet( rtl_TextEncoding aCharSet )
|
void SetSourceCharSet( rtl_TextEncoding aCharSet )
|
||||||
{
|
{
|
||||||
rtl_TextEncoding aOld = nSourceCharSet;
|
|
||||||
nSourceCharSet = aCharSet;
|
nSourceCharSet = aCharSet;
|
||||||
return aOld;
|
|
||||||
}
|
}
|
||||||
OString GetSearchPath() const { return aSearchPath; }
|
OString GetSearchPath() const { return aSearchPath; }
|
||||||
void SetSysSearchPath( const OString& rStr ) { aSysSearchPath = rStr; }
|
void SetSysSearchPath( const OString& rStr ) { aSysSearchPath = rStr; }
|
||||||
@@ -285,7 +283,7 @@ public:
|
|||||||
ERRTYPE WriteRc( WriteRcContext& rContext );
|
ERRTYPE WriteRc( WriteRcContext& rContext );
|
||||||
void WriteSrc( FILE * fOutput, sal_uLong nFileIndex,
|
void WriteSrc( FILE * fOutput, sal_uLong nFileIndex,
|
||||||
bool bName = true );
|
bool bName = true );
|
||||||
sal_uInt32 PutTranslatorKey( sal_uInt64 nKey );
|
void PutTranslatorKey( sal_uInt64 nKey );
|
||||||
void IncFilePos( sal_uLong nOffset ){ nFilePos += nOffset; }
|
void IncFilePos( sal_uLong nOffset ){ nFilePos += nOffset; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -143,7 +143,7 @@ protected:
|
|||||||
public:
|
public:
|
||||||
RscDefine * Search( const char * );
|
RscDefine * Search( const char * );
|
||||||
sal_uLong GetFileKey() const { return lFileKey; }
|
sal_uLong GetFileKey() const { return lFileKey; }
|
||||||
bool Evaluate();
|
void Evaluate();
|
||||||
sal_Int32 GetNumber() const { return lId; }
|
sal_Int32 GetNumber() const { return lId; }
|
||||||
OString GetMacro();
|
OString GetMacro();
|
||||||
};
|
};
|
||||||
@@ -215,7 +215,7 @@ public:
|
|||||||
|
|
||||||
RscFile();
|
RscFile();
|
||||||
~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 );
|
bool Depend( sal_uLong lDepend, sal_uLong lFree );
|
||||||
void SetIncFlag(){ bIncFile = true; };
|
void SetIncFlag(){ bIncFile = true; };
|
||||||
bool IsIncFile(){ return bIncFile; };
|
bool IsIncFile(){ return bIncFile; };
|
||||||
|
@@ -43,7 +43,7 @@ public:
|
|||||||
Atom Put( Atom nName, sal_uInt32 nTyp, sal_IntPtr nValue );
|
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, sal_IntPtr nValue );
|
||||||
Atom Put( const char * pName, sal_uInt32 nTyp );
|
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
|
// if true, it was found
|
||||||
bool Get( Atom nName, KEY_STRUCT * pEle );
|
bool Get( Atom nName, KEY_STRUCT * pEle );
|
||||||
|
@@ -40,7 +40,7 @@ public:
|
|||||||
virtual RSCCLASS_TYPE GetClassType() const override;
|
virtual RSCCLASS_TYPE GetClassType() const override;
|
||||||
RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, bool ) override;
|
RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, bool ) override;
|
||||||
// sets the allowed range
|
// 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
|
// returns the class size in bytes
|
||||||
sal_uInt32 Size() override { return nSize; }
|
sal_uInt32 Size() override { return nSize; }
|
||||||
// an assignment to a variable
|
// an assignment to a variable
|
||||||
@@ -78,7 +78,7 @@ public:
|
|||||||
virtual RSCCLASS_TYPE GetClassType() const override;
|
virtual RSCCLASS_TYPE GetClassType() const override;
|
||||||
RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, bool ) override;
|
RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, bool ) override;
|
||||||
// sets the allowed range
|
// 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
|
// returns the class size in bytes
|
||||||
sal_uInt32 Size() override { return nSize; }
|
sal_uInt32 Size() override { return nSize; }
|
||||||
// an assignment to a variable
|
// an assignment to a variable
|
||||||
@@ -120,11 +120,10 @@ public:
|
|||||||
RscIdRange( Atom nId, sal_uInt32 nTypId );
|
RscIdRange( Atom nId, sal_uInt32 nTypId );
|
||||||
virtual RSCCLASS_TYPE GetClassType() const override;
|
virtual RSCCLASS_TYPE GetClassType() const override;
|
||||||
// sets the allowed range
|
// sets the allowed range
|
||||||
ERRTYPE SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum )
|
void SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum )
|
||||||
{
|
{
|
||||||
nMin = nMinimum;
|
nMin = nMinimum;
|
||||||
nMax = nMaximum;
|
nMax = nMaximum;
|
||||||
return ERR_OK;
|
|
||||||
}
|
}
|
||||||
RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, bool ) override;
|
RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, bool ) override;
|
||||||
void Destroy( const RSCINST & rInst ) override;
|
void Destroy( const RSCINST & rInst ) override;
|
||||||
|
@@ -352,12 +352,11 @@ private:
|
|||||||
DECL_LINK_TYPED( CallBackWriteRc, const NameNode&, void );
|
DECL_LINK_TYPED( CallBackWriteRc, const NameNode&, void );
|
||||||
DECL_LINK_TYPED( CallBackWriteSrc, const NameNode&, void );
|
DECL_LINK_TYPED( CallBackWriteSrc, const NameNode&, void );
|
||||||
|
|
||||||
ERRTYPE WriteRc( RscTop * pCl, ObjNode * pRoot )
|
void WriteRc( RscTop * pCl, ObjNode * pRoot )
|
||||||
{
|
{
|
||||||
pClass = pCl;
|
pClass = pCl;
|
||||||
if( pRoot )
|
if( pRoot )
|
||||||
pRoot->EnumNodes( LINK( this, RscEnumerateObj, CallBackWriteRc ) );
|
pRoot->EnumNodes( LINK( this, RscEnumerateObj, CallBackWriteRc ) );
|
||||||
return aError;
|
|
||||||
}
|
}
|
||||||
ERRTYPE WriteSrc( RscTop * pCl, ObjNode * pRoot ){
|
ERRTYPE WriteSrc( RscTop * pCl, ObjNode * pRoot ){
|
||||||
pClass = pCl;
|
pClass = pCl;
|
||||||
@@ -639,10 +638,10 @@ bool MakeConsistent( RscTop * pRscTop )
|
|||||||
return bRet;
|
return bRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
sal_uInt32 RscTypCont::PutTranslatorKey( sal_uInt64 nKey )
|
void RscTypCont::PutTranslatorKey( sal_uInt64 nKey )
|
||||||
{
|
{
|
||||||
aIdTranslator[ nKey ] = nFilePos;
|
aIdTranslator[ nKey ] = nFilePos;
|
||||||
return nPMId++;
|
nPMId++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@@ -165,10 +165,9 @@ Atom RscLangEnum::AddLanguage( const char* pLang, RscNameTable& rNames )
|
|||||||
return nResult;
|
return nResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
RscEnum * RscTypCont::InitLangType()
|
void RscTypCont::InitLangType()
|
||||||
{
|
{
|
||||||
aLangType.Init( aNmTb );
|
aLangType.Init( aNmTb );
|
||||||
return &aLangType;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RscEnum * RscTypCont::InitFieldUnitsType()
|
RscEnum * RscTypCont::InitFieldUnitsType()
|
||||||
|
@@ -103,9 +103,9 @@ Atom RscNameTable::Put( const char * pName, sal_uInt32 nTyp )
|
|||||||
return Put( nId, nTyp, (sal_IntPtr)nId );
|
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 )
|
bool RscNameTable::Get( Atom nName, KEY_STRUCT * pEle )
|
||||||
|
@@ -44,7 +44,7 @@ RSCCLASS_TYPE RscConst::GetClassType() const
|
|||||||
return RSCCLASS_CONST;
|
return RSCCLASS_CONST;
|
||||||
}
|
}
|
||||||
|
|
||||||
ERRTYPE RscConst::SetConstant( Atom nVarName, sal_Int32 lValue )
|
void RscConst::SetConstant( Atom nVarName, sal_Int32 lValue )
|
||||||
{
|
{
|
||||||
if( pVarArray )
|
if( pVarArray )
|
||||||
pVarArray = static_cast<VarEle *>(rtl_reallocateMemory( static_cast<void *>(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 ].nId = nVarName;
|
||||||
pVarArray[ nEntries ].lValue = lValue;
|
pVarArray[ nEntries ].lValue = lValue;
|
||||||
nEntries++;
|
nEntries++;
|
||||||
|
|
||||||
return ERR_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RscConst::GetConstValue( Atom nConst, sal_Int32 * pValue ) const
|
bool RscConst::GetConstValue( Atom nConst, sal_Int32 * pValue ) const
|
||||||
|
@@ -36,7 +36,7 @@ RSCCLASS_TYPE RscRange::GetClassType() const
|
|||||||
return RSCCLASS_NUMBER;
|
return RSCCLASS_NUMBER;
|
||||||
}
|
}
|
||||||
|
|
||||||
ERRTYPE RscRange::SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum )
|
void RscRange::SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum )
|
||||||
{
|
{
|
||||||
if( nMinimum > nMaximum )
|
if( nMinimum > nMaximum )
|
||||||
{
|
{
|
||||||
@@ -48,8 +48,6 @@ ERRTYPE RscRange::SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum )
|
|||||||
nMax = nMaximum;
|
nMax = nMaximum;
|
||||||
nMin = nMinimum;
|
nMin = nMinimum;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ERR_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RscRange::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef )
|
bool RscRange::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef )
|
||||||
@@ -150,7 +148,7 @@ RSCCLASS_TYPE RscLongRange::GetClassType() const
|
|||||||
return RSCCLASS_NUMBER;
|
return RSCCLASS_NUMBER;
|
||||||
}
|
}
|
||||||
|
|
||||||
ERRTYPE RscLongRange::SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum )
|
void RscLongRange::SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum )
|
||||||
{
|
{
|
||||||
if( nMinimum > nMaximum )
|
if( nMinimum > nMaximum )
|
||||||
{
|
{
|
||||||
@@ -162,8 +160,6 @@ ERRTYPE RscLongRange::SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum )
|
|||||||
nMax = nMaximum;
|
nMax = nMaximum;
|
||||||
nMin = nMinimum;
|
nMin = nMinimum;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ERR_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RscLongRange::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef )
|
bool RscLongRange::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef )
|
||||||
|
@@ -160,14 +160,10 @@ void RscDefine::DefineToNumber()
|
|||||||
SetName(OString::number(lId));
|
SetName(OString::number(lId));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RscDefine::Evaluate()
|
void RscDefine::Evaluate()
|
||||||
{
|
{
|
||||||
bool bRet = true;
|
|
||||||
|
|
||||||
if( pExp )
|
if( pExp )
|
||||||
bRet = !pExp->Evaluate( &lId );
|
pExp->Evaluate( &lId );
|
||||||
|
|
||||||
return bRet;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RscDefine * RscDefine::Search( const char * pStr )
|
RscDefine * RscDefine::Search( const char * pStr )
|
||||||
@@ -408,13 +404,13 @@ bool RscFile::Depend( sal_uLong lDepend, sal_uLong lFree )
|
|||||||
return true;
|
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 )
|
for ( size_t i = 0, n = aDepLst.size(); i < n; ++i )
|
||||||
{
|
{
|
||||||
RscDepend* pDep = aDepLst[ i ];
|
RscDepend* pDep = aDepLst[ i ];
|
||||||
if( pDep->GetFileKey() == lIncFile )
|
if( pDep->GetFileKey() == lIncFile )
|
||||||
return true;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// current pointer points to last element
|
// current pointer points to last element
|
||||||
@@ -429,7 +425,6 @@ bool RscFile::InsertDependFile( sal_uLong lIncFile, size_t lPos )
|
|||||||
::std::advance( it, lPos );
|
::std::advance( it, lPos );
|
||||||
aDepLst.insert( it, new RscDepend( lIncFile ) );
|
aDepLst.insert( it, new RscDepend( lIncFile ) );
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RscDefTree::~RscDefTree()
|
RscDefTree::~RscDefTree()
|
||||||
|
@@ -39,10 +39,10 @@ public:
|
|||||||
virtual ~TimerManager();
|
virtual ~TimerManager();
|
||||||
|
|
||||||
/// register timer
|
/// register timer
|
||||||
bool SAL_CALL registerTimer(salhelper::Timer* pTimer);
|
void SAL_CALL registerTimer(salhelper::Timer* pTimer);
|
||||||
|
|
||||||
/// unregister timer
|
/// unregister timer
|
||||||
bool SAL_CALL unregisterTimer(salhelper::Timer* pTimer);
|
void SAL_CALL unregisterTimer(salhelper::Timer* pTimer);
|
||||||
|
|
||||||
/// lookup timer
|
/// lookup timer
|
||||||
bool SAL_CALL lookupTimer(const salhelper::Timer* pTimer);
|
bool SAL_CALL lookupTimer(const salhelper::Timer* pTimer);
|
||||||
@@ -283,13 +283,13 @@ TimerManager* TimerManager::getTimerManager()
|
|||||||
return m_pManager;
|
return m_pManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TimerManager::registerTimer(Timer* pTimer)
|
void TimerManager::registerTimer(Timer* pTimer)
|
||||||
{
|
{
|
||||||
OSL_ASSERT(pTimer);
|
OSL_ASSERT(pTimer);
|
||||||
|
|
||||||
if ( pTimer == nullptr )
|
if ( pTimer == nullptr )
|
||||||
{
|
{
|
||||||
return false;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
osl::MutexGuard Guard(m_Lock);
|
osl::MutexGuard Guard(m_Lock);
|
||||||
@@ -320,17 +320,15 @@ bool TimerManager::registerTimer(Timer* pTimer)
|
|||||||
// signal it to TimerManager Thread
|
// signal it to TimerManager Thread
|
||||||
m_notEmpty.set();
|
m_notEmpty.set();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TimerManager::unregisterTimer(Timer* pTimer)
|
void TimerManager::unregisterTimer(Timer* pTimer)
|
||||||
{
|
{
|
||||||
OSL_ASSERT(pTimer);
|
OSL_ASSERT(pTimer);
|
||||||
|
|
||||||
if ( pTimer == nullptr )
|
if ( pTimer == nullptr )
|
||||||
{
|
{
|
||||||
return false;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// lock access
|
// lock access
|
||||||
@@ -344,12 +342,10 @@ bool TimerManager::unregisterTimer(Timer* pTimer)
|
|||||||
{
|
{
|
||||||
// remove timer from list
|
// remove timer from list
|
||||||
*ppIter = (*ppIter)->m_pNext;
|
*ppIter = (*ppIter)->m_pNext;
|
||||||
return true;
|
return;
|
||||||
}
|
}
|
||||||
ppIter= &((*ppIter)->m_pNext);
|
ppIter= &((*ppIter)->m_pNext);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TimerManager::lookupTimer(const Timer* pTimer)
|
bool TimerManager::lookupTimer(const Timer* pTimer)
|
||||||
|
Reference in New Issue
Block a user