callcatcher: unused code
This commit is contained in:
@@ -118,15 +118,6 @@ public:
|
||||
RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
|
||||
};
|
||||
|
||||
class RscFirstSysDepend : public RscSysDepend
|
||||
{
|
||||
public:
|
||||
RscFirstSysDepend( Atom nId, sal_uInt32 nTypId,
|
||||
RscTop * pSuper );
|
||||
ERRTYPE WriteRc( const RSCINST &, RscWriteRc & aMem,
|
||||
RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
|
||||
};
|
||||
|
||||
class RscTupel : public RscClass
|
||||
{
|
||||
public:
|
||||
|
@@ -337,8 +337,6 @@ public:
|
||||
}
|
||||
RscTop * SearchType( Atom nTypId );
|
||||
RscTop * Search( Atom typ );
|
||||
CLASS_DATA Search( Atom typ, const RscId & rId );
|
||||
void Delete( Atom typ, const RscId & rId );
|
||||
// loescht alle Resourceobjekte diese Datei
|
||||
void Delete( sal_uLong lFileKey );
|
||||
RscTop * GetRoot() { return( pRoot ); };
|
||||
@@ -353,8 +351,6 @@ public:
|
||||
const ByteString & rHxxName );
|
||||
void WriteSyntax( FILE * fOutput );
|
||||
void WriteRcCtor( FILE * fOutput );
|
||||
void FillNameIdList( REResourceList * pList, sal_uLong lFileKey );
|
||||
sal_Bool MakeConsistent();
|
||||
sal_uInt32 PutTranslatorKey( sal_uInt64 nKey );
|
||||
void IncFilePos( sal_uLong nOffset ){ nFilePos += nOffset; }
|
||||
};
|
||||
|
@@ -103,11 +103,9 @@ public:
|
||||
|
||||
RscId& operator = ( const RscId& rRscId );
|
||||
|
||||
static sal_Bool IsSetNames();
|
||||
static void SetNames( sal_Bool bSet = sal_True );
|
||||
operator sal_Int32() const; // Gibt Nummer zurueck
|
||||
ByteString GetName() const; // Gibt den Namen des Defines zurueck
|
||||
ByteString GetMacro() const; // Gibt das Macro zurueck
|
||||
sal_Bool operator < ( const RscId& rRscId ) const;
|
||||
sal_Bool operator > ( const RscId& rRscId ) const;
|
||||
sal_Bool operator == ( const RscId& rRscId ) const;
|
||||
@@ -166,9 +164,7 @@ private:
|
||||
sal_Int32 lDefId, size_t lPos );
|
||||
RscDefine * New( sal_uLong lFileKey, const ByteString & rDefName,
|
||||
RscExpression * pExpression, size_t lPos );
|
||||
sal_Bool Befor( const RscDefine * pFree, const RscDefine * pDepend );
|
||||
sal_Bool Remove( RscDefine * pDef );
|
||||
sal_Bool Remove( size_t nIndex );
|
||||
sal_Bool Remove();
|
||||
size_t GetPos( RscDefine* item ) {
|
||||
for ( size_t i = 0, n = maList.size(); i < n; ++i )
|
||||
@@ -265,15 +261,8 @@ public:
|
||||
RscDefine * NewDef( sal_uLong lKey, const ByteString & rDefName,
|
||||
RscExpression *, sal_uLong lPos );
|
||||
|
||||
sal_Bool ChangeDef( const ByteString & rDefName, sal_Int32 lId );
|
||||
sal_Bool ChangeDef( const ByteString & rDefName, RscExpression * );
|
||||
|
||||
sal_Bool IsDefUsed( const ByteString & );
|
||||
void DeleteDef( const ByteString & );
|
||||
|
||||
// Alle Defines die in dieser Datei Definiert sind loeschen
|
||||
void DeleteFileContext( sal_uLong lKey );
|
||||
void DeleteFile( sal_uLong lKey );
|
||||
sal_uLong NewCodeFile( const ByteString & rName );
|
||||
sal_uLong NewIncFile( const ByteString & rName, const ByteString & rPath );
|
||||
RscFile * GetFile( sal_uLong lFileKey ){ return Get( lFileKey ); }
|
||||
|
@@ -48,11 +48,9 @@ public:
|
||||
~RscNameTable();
|
||||
void SetSort( sal_Bool bSorted = sal_True );
|
||||
Atom Put( Atom nName, sal_uInt32 nTyp, long nValue );
|
||||
Atom Put( Atom nName, sal_uInt32 nTyp );
|
||||
Atom Put( const char * pName, sal_uInt32 nTyp, long nValue );
|
||||
Atom Put( const char * pName, sal_uInt32 nTyp );
|
||||
Atom Put( Atom nName, sal_uInt32 nTyp, RscTop * pClass );
|
||||
Atom Put( const char * pName, sal_uInt32 nTyp, RscTop * pClass );
|
||||
|
||||
// sal_True, wurde gefunden
|
||||
sal_Bool Get( Atom nName, KEY_STRUCT * pEle );
|
||||
|
@@ -76,12 +76,10 @@ public:
|
||||
std::list<OutputFile> m_aOutputFiles;
|
||||
std::list< std::pair< rtl::OString, rtl::OString > > m_aReplacements;
|
||||
|
||||
RscCmdLine( int argc, char ** argv, RscError * pEH );
|
||||
RscCmdLine();
|
||||
RscCmdLine( int argc, char ** argv, RscError * pEH );
|
||||
~RscCmdLine();
|
||||
|
||||
~RscCmdLine();
|
||||
|
||||
::rtl::OString substitutePaths( const ::rtl::OString& rIn );
|
||||
::rtl::OString substitutePaths( const ::rtl::OString& rIn );
|
||||
};
|
||||
/****************** R s c ************************************************/
|
||||
|
||||
@@ -97,7 +95,6 @@ private:
|
||||
|
||||
void CreateResFile( const char * pRc );
|
||||
void Append( const ByteString& rOutputSrs, const ByteString& rTmpFile );
|
||||
void OpenInput( const ByteString& rInput );
|
||||
|
||||
bool GetImageFilePath( const RscCmdLine::OutputFile& rOutputFile,
|
||||
const WriteRcContext& rContext,
|
||||
@@ -119,7 +116,6 @@ public:
|
||||
~RscCompiler();
|
||||
|
||||
ERRTYPE Start();
|
||||
ByteString GetTmpFileName(); // Die Dateien werden geloescht
|
||||
|
||||
// Include Statements lesen
|
||||
ERRTYPE IncludeParser( sal_uLong lFileKey );
|
||||
|
@@ -37,11 +37,6 @@
|
||||
#include <rsctop.hxx>
|
||||
#include "rsclst.hxx"
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* RscTypCont::FillNameIdList()
|
||||
|*
|
||||
*************************************************************************/
|
||||
REResourceList * InsertList( Atom nClassName, const RscId& rId,
|
||||
REResourceList * pList ) {
|
||||
REResourceList * pSubList;
|
||||
@@ -110,8 +105,4 @@ void FillList( RscTop * pRscTop, REResourceList * pList, sal_uLong lFileKey ){
|
||||
};
|
||||
}
|
||||
|
||||
void RscTypCont::FillNameIdList( REResourceList * pList, sal_uLong lFileKey ){
|
||||
FillList( pRoot, pList, lFileKey );
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@@ -322,47 +322,6 @@ RscTop * RscTypCont :: Search( Atom nRT ){
|
||||
return( (RscTop *)pRoot->Search( nRT ) );
|
||||
}
|
||||
|
||||
CLASS_DATA RscTypCont :: Search( Atom nRT, const RscId & rId ){
|
||||
ObjNode *pObjNode;
|
||||
RscTop *pRscTop;
|
||||
|
||||
if( NULL != (pRscTop = Search( nRT )) ){
|
||||
if( NULL != (pObjNode = pRscTop->GetObjNode( rId )) ){
|
||||
return( pObjNode->GetRscObj() );
|
||||
}
|
||||
}
|
||||
return( (CLASS_DATA)0 );
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* RscTypCont :: Delete()
|
||||
|*
|
||||
*************************************************************************/
|
||||
void RscTypCont :: Delete( Atom nRT, const RscId & rId ){
|
||||
ObjNode * pObjNode;
|
||||
RscTop * pRscTop;
|
||||
|
||||
if( NULL != (pRscTop = Search( nRT )) ){
|
||||
if( NULL != (pObjNode = pRscTop->GetObjNode()) ){
|
||||
pObjNode = pObjNode->Search( rId );
|
||||
|
||||
if( pObjNode ){
|
||||
//Objekt aus Baum entfernen
|
||||
pRscTop->pObjBiTree =
|
||||
(ObjNode *)pRscTop->pObjBiTree->Remove( pObjNode );
|
||||
|
||||
if( pObjNode->GetRscObj() ){
|
||||
pRscTop->Destroy( RSCINST( pRscTop,
|
||||
pObjNode->GetRscObj() ) );
|
||||
rtl_freeMemory( pObjNode->GetRscObj() );
|
||||
}
|
||||
delete pObjNode;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* RscTypCont :: PutSysName()
|
||||
@@ -969,11 +928,6 @@ void RscTypCont :: Delete( sal_uLong lFileKey ){
|
||||
aFileTab.DeleteFileContext( lFileKey );
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* RscTypCont :: MakeConsistent()
|
||||
|*
|
||||
*************************************************************************/
|
||||
sal_Bool IsInstConsistent( ObjNode * pObjNode, RscTop * pRscTop )
|
||||
{
|
||||
sal_Bool bRet = sal_True;
|
||||
@@ -1021,10 +975,6 @@ sal_Bool MakeConsistent( RscTop * pRscTop )
|
||||
return bRet;
|
||||
}
|
||||
|
||||
sal_Bool RscTypCont :: MakeConsistent(){
|
||||
return( ::MakeConsistent( pRoot ) );
|
||||
}
|
||||
|
||||
sal_uInt32 RscTypCont::PutTranslatorKey( sal_uInt64 nKey )
|
||||
{
|
||||
aIdTranslator[ nKey ] = nFilePos;
|
||||
|
@@ -122,11 +122,6 @@ Atom RscNameTable::Put( const char * pName, sal_uInt32 nTyp, long nValue )
|
||||
return( Put( pHS->getID( pName ), nTyp, nValue ) );
|
||||
};
|
||||
|
||||
Atom RscNameTable::Put( Atom nName, sal_uInt32 nTyp )
|
||||
{
|
||||
return( Put( nName, nTyp, (long)nName ) );
|
||||
};
|
||||
|
||||
Atom RscNameTable::Put( const char * pName, sal_uInt32 nTyp )
|
||||
{
|
||||
Atom nId;
|
||||
@@ -140,11 +135,6 @@ Atom RscNameTable::Put( Atom nName, sal_uInt32 nTyp, RscTop * pClass )
|
||||
return( Put( nName, nTyp, (long)pClass ) );
|
||||
};
|
||||
|
||||
Atom RscNameTable::Put( const char * pName, sal_uInt32 nTyp, RscTop * pClass )
|
||||
{
|
||||
return( Put( pHS->getID( pName ), nTyp, (long)pClass ) );
|
||||
};
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* RscNameTable::Get()
|
||||
|
@@ -1122,33 +1122,6 @@ ERRTYPE RscSysDepend::WriteRc( const RSCINST & rInst, RscWriteRc & rMem,
|
||||
return aError;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* RscFirstSysDepend::RscFirstSysDepend()
|
||||
|*
|
||||
|* Beschreibung
|
||||
|*
|
||||
*************************************************************************/
|
||||
RscFirstSysDepend::RscFirstSysDepend( Atom nId, sal_uInt32 nTypeId,
|
||||
RscTop * pSuper )
|
||||
: RscSysDepend( nId, nTypeId, pSuper )
|
||||
{}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* RscFirstSysDepend::WriteRc()
|
||||
|*
|
||||
|* Beschreibung
|
||||
|*
|
||||
*************************************************************************/
|
||||
ERRTYPE RscFirstSysDepend::WriteRc( const RSCINST & rInst, RscWriteRc & rMem,
|
||||
RscTypCont * pTC, sal_uInt32 nDeep, sal_Bool bExtra )
|
||||
{
|
||||
ERRTYPE aError = RscClass::WriteRc( rInst, rMem, pTC, nDeep, bExtra );
|
||||
aError = WriteSysDependRc( rInst, rMem, pTC, nDeep, bExtra, sal_True );
|
||||
return aError;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* RscTupel::RscTupel()
|
||||
|
@@ -106,18 +106,6 @@ void RscCmdLine::Init()
|
||||
m_aOutputFiles.push_back( OutputFile() );
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* RscCmdLine::RscCmdLine()
|
||||
|*
|
||||
|* Beschreibung Kommandozeile interpretierten
|
||||
|*
|
||||
*************************************************************************/
|
||||
RscCmdLine::RscCmdLine()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* RscCmdLine::RscCmdLine()
|
||||
@@ -1048,39 +1036,6 @@ void RscCompiler::Append( const ByteString& rOutputSrs,
|
||||
}
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
/* */
|
||||
/* Function : GetTmpFileName() */
|
||||
/* */
|
||||
/* Description : Packt einen Dateinamen in Tmp-Dateiliste. */
|
||||
/* */
|
||||
/********************************************************************/
|
||||
ByteString RscCompiler::GetTmpFileName()
|
||||
{
|
||||
ByteString aFileName;
|
||||
|
||||
aFileName = ::GetTmpFileName();
|
||||
return( aFileName );
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
/* */
|
||||
/* Function : sal_Bool openinput() */
|
||||
/* */
|
||||
/* Description : Check to see if the input file exists and can */
|
||||
/* be opened for reading. */
|
||||
/********************************************************************/
|
||||
|
||||
void RscCompiler::OpenInput( const ByteString& rInput )
|
||||
{
|
||||
FILE *fp;
|
||||
/* try to open the input file */
|
||||
if( NULL == (fp = fopen( rInput.GetBuffer(), "r")))
|
||||
pTC->pEH->FatalError( ERR_OPENFILE, RscId(), rInput.GetBuffer() );
|
||||
|
||||
fclose( fp );
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* GetImageFilePath()
|
||||
|
@@ -44,7 +44,6 @@ sal_Bool RscId::bNames = sal_True;
|
||||
|*
|
||||
*************************************************************************/
|
||||
void RscId::SetNames( sal_Bool bSet ) { bNames = bSet; }
|
||||
sal_Bool RscId::IsSetNames() { return bNames; }
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
@@ -183,23 +182,6 @@ ByteString RscId::GetName() const
|
||||
return aStr.makeStringAndClear();
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* RscId::GetMacro()
|
||||
|*
|
||||
*************************************************************************/
|
||||
ByteString RscId::GetMacro() const
|
||||
{
|
||||
rtl::OStringBuffer aStr;
|
||||
|
||||
if ( aExp.IsDefinition() )
|
||||
aStr.append(aExp.aExp.pDef->GetMacro());
|
||||
else
|
||||
aExp.AppendMacro(aStr);
|
||||
|
||||
return aStr.makeStringAndClear();
|
||||
}
|
||||
|
||||
/****************** R s c D e f i n e ************************************/
|
||||
/*************************************************************************
|
||||
|*
|
||||
@@ -376,18 +358,6 @@ sal_Bool RscDefineList::Remove( RscDefine * pDef ) {
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
sal_Bool RscDefineList::Remove( size_t lIndex ) {
|
||||
if ( lIndex < maList.size() ) {
|
||||
RscSubDefList::iterator it = maList.begin();
|
||||
::std::advance( it, lIndex );
|
||||
(*it)->DefineToNumber();
|
||||
(*it)->DecRef();
|
||||
maList.erase( it );
|
||||
return sal_True;
|
||||
}
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
sal_Bool RscDefineList::Remove() {
|
||||
if ( maList.empty() )
|
||||
return sal_False;
|
||||
@@ -398,29 +368,6 @@ sal_Bool RscDefineList::Remove() {
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* RscDefineList::Befor()
|
||||
|*
|
||||
*************************************************************************/
|
||||
sal_Bool RscDefineList::Befor( const RscDefine * pFree,
|
||||
const RscDefine * pDepend )
|
||||
{
|
||||
size_t i = 0;
|
||||
size_t n = maList.size();
|
||||
while ( i < n ) {
|
||||
if ( maList[ i ] == pFree ) {
|
||||
for ( ++i ; i < n ; ++i ) {
|
||||
if ( maList[ i ] == pDepend ) {
|
||||
return sal_True;
|
||||
}
|
||||
}
|
||||
}
|
||||
++i;
|
||||
}
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* RscDefineList::WriteAll()
|
||||
@@ -961,89 +908,6 @@ RscDefine * RscFileTab::NewDef( sal_uLong lFileKey, const ByteString & rDefName,
|
||||
return( pDef );
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* RscFileTab::IsDefUsed()
|
||||
|*
|
||||
*************************************************************************/
|
||||
sal_Bool RscFileTab::IsDefUsed( const ByteString & rDefName )
|
||||
{
|
||||
RscDefine * pDef = FindDef( rDefName );
|
||||
|
||||
if( pDef )
|
||||
return( pDef->GetRefCount() != 2 );
|
||||
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* RscFileTab::DeleteDef()
|
||||
|*
|
||||
*************************************************************************/
|
||||
void RscFileTab::DeleteDef( const ByteString & rDefName )
|
||||
{
|
||||
RscDefine * pDef = FindDef( rDefName );
|
||||
RscFile * pFile;
|
||||
|
||||
if( pDef ){
|
||||
pFile = GetFile( pDef->GetFileKey() );
|
||||
if( pFile ){
|
||||
aDefTree.Remove( pDef );
|
||||
pFile->aDefLst.Remove( pDef );
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* RscFileTab::ChangeDef()
|
||||
|*
|
||||
*************************************************************************/
|
||||
sal_Bool RscFileTab::ChangeDef( const ByteString & rDefName, sal_Int32 lId )
|
||||
{
|
||||
RscDefine * pDef = FindDef( rDefName );
|
||||
|
||||
if( pDef ){
|
||||
pDef->ChangeMacro( lId );
|
||||
//alle Macros neu bewerten
|
||||
return aDefTree.Evaluate();
|
||||
};
|
||||
return( sal_False );
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* RscFileTab::ChangeDef()
|
||||
|*
|
||||
*************************************************************************/
|
||||
sal_Bool RscFileTab::ChangeDef( const ByteString & rDefName,
|
||||
RscExpression * pExp )
|
||||
{
|
||||
RscDefine * pDef = FindDef( rDefName );
|
||||
RscFile * pFile;
|
||||
|
||||
if( pDef )
|
||||
{
|
||||
pFile = GetFile( pDef->GetFileKey() );
|
||||
sal_uLong lPos = 0;
|
||||
if( pFile )
|
||||
lPos = pFile->aDefLst.GetPos( pDef );
|
||||
//Macros in den Expressions sind definiert ?
|
||||
if( TestDef( pDef->GetFileKey(), lPos, pExp ) ){
|
||||
pDef->ChangeMacro( pExp );
|
||||
//alle Macros neu bewerten
|
||||
return aDefTree.Evaluate();
|
||||
}
|
||||
};
|
||||
|
||||
// pExp wird immer Eigentum und muss, wenn es nicht benoetigt wird
|
||||
// geloescht werden
|
||||
delete pExp;
|
||||
|
||||
return( sal_False );
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* RscFileTab::DeleteFileContext()
|
||||
@@ -1064,29 +928,6 @@ void RscFileTab :: DeleteFileContext( sal_uLong lFileKey ){
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* RscFileTab::DeleteFile()
|
||||
|*
|
||||
*************************************************************************/
|
||||
void RscFileTab :: DeleteFile( sal_uLong lFileKey ){
|
||||
RscFile * pFName;
|
||||
|
||||
//Defines freigeben
|
||||
DeleteFileContext( lFileKey );
|
||||
|
||||
//Schleife ueber alle Abhaengigkeiten
|
||||
pFName = First();
|
||||
while( pFName ){
|
||||
pFName->RemoveDependFile( lFileKey );
|
||||
pFName = Next();
|
||||
};
|
||||
|
||||
pFName = Remove( lFileKey );
|
||||
if( pFName )
|
||||
delete pFName;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* RscFileTab::NewCodeFile()
|
||||
|
Reference in New Issue
Block a user