summaryrefslogtreecommitdiff
path: root/rsc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-07-12 01:30:16 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-07-12 09:16:29 +0100
commitae5b6a6e5e73517eb40d4f8d7d2c17d1bfba810f (patch)
treeac48d002bd0355f6f9a660002cff981c533ecb87 /rsc
parentcc3d6508286ef9daa5bf6a028e0e3b81c2ccc98d (diff)
callcatcher: unused code
Diffstat (limited to 'rsc')
-rw-r--r--rsc/inc/rscclass.hxx9
-rw-r--r--rsc/inc/rscdb.hxx4
-rw-r--r--rsc/inc/rscdef.hxx11
-rw-r--r--rsc/inc/rsckey.hxx2
-rw-r--r--rsc/inc/rscrsc.hxx10
-rw-r--r--rsc/source/misc/rscdbl.cxx9
-rw-r--r--rsc/source/parser/rscdb.cxx50
-rw-r--r--rsc/source/parser/rsckey.cxx10
-rw-r--r--rsc/source/res/rscclass.cxx27
-rw-r--r--rsc/source/rsc/rsc.cxx45
-rw-r--r--rsc/source/tools/rscdef.cxx159
11 files changed, 3 insertions, 333 deletions
diff --git a/rsc/inc/rscclass.hxx b/rsc/inc/rscclass.hxx
index 7dc3e95488ad..36bc5be7c4ca 100644
--- a/rsc/inc/rscclass.hxx
+++ b/rsc/inc/rscclass.hxx
@@ -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:
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index 54c386dab315..830c25fb72b6 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -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; }
};
diff --git a/rsc/inc/rscdef.hxx b/rsc/inc/rscdef.hxx
index bb9cb196d0c7..8a884c0e5dfd 100644
--- a/rsc/inc/rscdef.hxx
+++ b/rsc/inc/rscdef.hxx
@@ -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 ); }
diff --git a/rsc/inc/rsckey.hxx b/rsc/inc/rsckey.hxx
index dd99b68b0fae..65125c2904d1 100644
--- a/rsc/inc/rsckey.hxx
+++ b/rsc/inc/rsckey.hxx
@@ -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 );
diff --git a/rsc/inc/rscrsc.hxx b/rsc/inc/rscrsc.hxx
index 367118858918..aa7ee437643a 100644
--- a/rsc/inc/rscrsc.hxx
+++ b/rsc/inc/rscrsc.hxx
@@ -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 );
diff --git a/rsc/source/misc/rscdbl.cxx b/rsc/source/misc/rscdbl.cxx
index da2106366f9f..8de91ae9dbbd 100644
--- a/rsc/source/misc/rscdbl.cxx
+++ b/rsc/source/misc/rscdbl.cxx
@@ -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: */
diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx
index a71b4a51eea2..5bfa6ea6e49d 100644
--- a/rsc/source/parser/rscdb.cxx
+++ b/rsc/source/parser/rscdb.cxx
@@ -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;
diff --git a/rsc/source/parser/rsckey.cxx b/rsc/source/parser/rsckey.cxx
index 621ab4d69598..bdd21e89742f 100644
--- a/rsc/source/parser/rsckey.cxx
+++ b/rsc/source/parser/rsckey.cxx
@@ -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()
diff --git a/rsc/source/res/rscclass.cxx b/rsc/source/res/rscclass.cxx
index 6f2939cd2fd2..8060c3271240 100644
--- a/rsc/source/res/rscclass.cxx
+++ b/rsc/source/res/rscclass.cxx
@@ -1124,33 +1124,6 @@ ERRTYPE RscSysDepend::WriteRc( const RSCINST & rInst, RscWriteRc & rMem,
/*************************************************************************
|*
-|* 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()
|*
|* Beschreibung
diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx
index 6fbc6976aedc..6dbf71c3983c 100644
--- a/rsc/source/rsc/rsc.cxx
+++ b/rsc/source/rsc/rsc.cxx
@@ -113,18 +113,6 @@ void RscCmdLine::Init()
|* Beschreibung Kommandozeile interpretierten
|*
*************************************************************************/
-RscCmdLine::RscCmdLine()
-{
- Init();
-}
-
-/*************************************************************************
-|*
-|* RscCmdLine::RscCmdLine()
-|*
-|* Beschreibung Kommandozeile interpretierten
-|*
-*************************************************************************/
RscCmdLine::RscCmdLine( int argc, char ** argv, RscError * pEH )
{
char * pStr;
@@ -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()
diff --git a/rsc/source/tools/rscdef.cxx b/rsc/source/tools/rscdef.cxx
index 9482a40b9f8c..eab8bbb63ae7 100644
--- a/rsc/source/tools/rscdef.cxx
+++ b/rsc/source/tools/rscdef.cxx
@@ -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;
@@ -400,29 +370,6 @@ sal_Bool RscDefineList::Remove() {
/*************************************************************************
|*
-|* 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()
|*
*************************************************************************/
@@ -963,89 +910,6 @@ RscDefine * RscFileTab::NewDef( sal_uLong lFileKey, const ByteString & rDefName,
/*************************************************************************
|*
-|* 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()
|*
*************************************************************************/
@@ -1066,29 +930,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()
|*
*************************************************************************/