diff options
author | Andras Timar <atimar@suse.com> | 2013-03-26 11:10:45 +0100 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2013-03-27 09:33:00 +0100 |
commit | 73ff49f47dda14391f0c118f62002cb42680624e (patch) | |
tree | 361fb6fecc7ce1e3466036f967614cd5afe3122d /rsc/source/tools | |
parent | 95c586d5c034115fd252c5fb0e4637bf9dc68a4d (diff) |
remove unused functionality from Resource Compiler
and remove ASCII art comments and other useless comments
Change-Id: Iafa5eb5aa421b38b325bdc7cea6045b43a5c582a
Diffstat (limited to 'rsc/source/tools')
-rw-r--r-- | rsc/source/tools/rscchar.cxx | 14 | ||||
-rw-r--r-- | rsc/source/tools/rscdef.cxx | 257 | ||||
-rw-r--r-- | rsc/source/tools/rsctools.cxx | 125 | ||||
-rw-r--r-- | rsc/source/tools/rsctree.cxx | 92 |
4 files changed, 10 insertions, 478 deletions
diff --git a/rsc/source/tools/rscchar.cxx b/rsc/source/tools/rscchar.cxx index fd37ec551ef8..526e695d6edc 100644 --- a/rsc/source/tools/rscchar.cxx +++ b/rsc/source/tools/rscchar.cxx @@ -17,26 +17,16 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -/****************** I N C L U D E S **************************************/ #include <stdio.h> #include <string.h> #include <ctype.h> -// Solar Definitionen -#include <tools/solar.h> #include <rsctools.hxx> #include <rtl/textcvt.h> #include <rtl/textenc.h> #include <rtl/alloc.h> -/************************************************************************* -|* -|* RscChar::MakeChar() -|* -|* Beschreibung Der String wird nach C-Konvention umgesetzt -|* -*************************************************************************/ char * RscChar::MakeUTF8( char * pStr, sal_uInt16 nTextEncoding ) { sal_Size nMaxUniCodeBuf = strlen( pStr ) + 1; @@ -103,7 +93,7 @@ char * RscChar::MakeUTF8( char * pStr, sal_uInt16 nTextEncoding ) } if( nChar > 255 ) { - // Wert zu gross, oder kein 3 Ziffern + // value is too big, or more than 3 digits delete [] pOrgStr; return( NULL ); } @@ -160,7 +150,7 @@ char * RscChar::MakeUTF8( char * pStr, sal_uInt16 nTextEncoding ) delete[] pOrgStr, pOrgStr = 0; hConv = rtl_createUnicodeToTextConverter( RTL_TEXTENCODING_UTF8 ); - // factor fo 6 is the maximum size of an UNICODE character as utf8 + // factor of 6 is the maximum size of an UNICODE character as utf8 char * pUtf8 = (char *)rtl_allocateMemory( nUniSize * 6 ); rtl_convertUnicodeToText( hConv, 0, pUniCode, nUniSize, diff --git a/rsc/source/tools/rscdef.cxx b/rsc/source/tools/rscdef.cxx index d9e1afdda29a..04a5dcd7e8fd 100644 --- a/rsc/source/tools/rscdef.cxx +++ b/rsc/source/tools/rscdef.cxx @@ -17,39 +17,20 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -/****************** I N C L U D E S **************************************/ // Programmuebergreifende Includes. #include <rscdef.hxx> -/****************** C o d e **********************************************/ -/****************** R s c I d ********************************************/ sal_Bool RscId::bNames = sal_True; -/************************************************************************* -|* -|* static RscId::SetNames -|* static RscId::SetNoNames -|* -*************************************************************************/ void RscId::SetNames( sal_Bool bSet ) { bNames = bSet; } -/************************************************************************* -|* -|* RscId::GetNumber -|* -*************************************************************************/ sal_Int32 RscId::GetNumber() const{ sal_Int32 lVal; aExp.Evaluate( &lVal ); return lVal; } -/************************************************************************* -|* -|* RscId::Create() -|* -*************************************************************************/ void RscId::Create( const RscExpType & rExpType ) { aExp = rExpType; @@ -63,33 +44,18 @@ void RscId::Create( const RscExpType & rExpType ) } } -/************************************************************************* -|* -|* RscId::Destroy() -|* -*************************************************************************/ void RscId::Destroy(){ if( aExp.IsDefinition() ) aExp.aExp.pDef->DecRef(); aExp.cType = RSCEXP_NOTHING; } -/************************************************************************* -|* -|* RscId::RscId() -|* -*************************************************************************/ RscId::RscId( const RscId& rRscId ){ aExp = rRscId.aExp; if( aExp.IsDefinition() ) aExp.aExp.pDef->IncRef(); } -/************************************************************************* -|* -|* RscId::RscId() -|* -*************************************************************************/ RscId::RscId( RscDefine * pDef ){ RscExpType aExpType; @@ -98,11 +64,6 @@ RscId::RscId( RscDefine * pDef ){ Create( aExpType ); } -/************************************************************************* -|* -|* RscId:: = -|* -*************************************************************************/ RscId& RscId::operator = ( const RscId& rRscId ){ if( rRscId.aExp.IsDefinition() ) rRscId.aExp.aExp.pDef->IncRef(); @@ -111,51 +72,26 @@ RscId& RscId::operator = ( const RscId& rRscId ){ return *this; } -/************************************************************************* -|* -|* RscId::operator == -|* -*************************************************************************/ sal_Bool RscId::operator == ( const RscId& rRscId ) const { return( GetNumber() == rRscId.GetNumber() ); } -/************************************************************************* -|* -|* RscId::operator < -|* -*************************************************************************/ sal_Bool RscId::operator < ( const RscId& rRscId ) const { return( GetNumber() < rRscId.GetNumber() ); } -/************************************************************************* -|* -|* RscId::operator > -|* -*************************************************************************/ sal_Bool RscId::operator > ( const RscId& rRscId ) const { return( GetNumber() > rRscId.GetNumber() ); } -/************************************************************************* -|* -|* RscId::sal_Int32() -|* -*************************************************************************/ RscId::operator sal_Int32() const { return( GetNumber() ); } -/************************************************************************* -|* -|* RscId::GetNames() -|* -*************************************************************************/ rtl::OString RscId::GetName() const { rtl::OStringBuffer aStr; @@ -171,12 +107,6 @@ rtl::OString RscId::GetName() const return aStr.makeStringAndClear(); } -/****************** R s c D e f i n e ************************************/ -/************************************************************************* -|* -|* RscDefine::RscDefine() -|* -*************************************************************************/ RscDefine::RscDefine( sal_uLong lKey, const rtl::OString& rDefName, sal_Int32 lDefId ) : StringNode( rDefName ) { @@ -196,11 +126,6 @@ RscDefine::RscDefine( sal_uLong lKey, const rtl::OString& rDefName, pExp = pExpression; } -/************************************************************************* -|* -|* RscDefine::~RscDefine() -|* -*************************************************************************/ RscDefine::~RscDefine(){ if( pExp ) delete pExp; @@ -208,11 +133,6 @@ RscDefine::~RscDefine(){ RscExit( 14 ); } -/************************************************************************* -|* -|* RscDefine::DecRef() -|* -*************************************************************************/ void RscDefine::DecRef(){ nRefCount--; if( 0 == nRefCount ){ @@ -220,11 +140,6 @@ void RscDefine::DecRef(){ } } -/************************************************************************* -|* -|* RscDefine::DefineToNumber() -|* -*************************************************************************/ void RscDefine::DefineToNumber() { if( pExp ) @@ -233,11 +148,6 @@ void RscDefine::DefineToNumber() SetName(rtl::OString::valueOf(lId)); } -/************************************************************************* -|* -|* RscDefine::Evaluate() -|* -*************************************************************************/ sal_Bool RscDefine::Evaluate(){ sal_Bool bRet = sal_True; @@ -247,20 +157,10 @@ sal_Bool RscDefine::Evaluate(){ return bRet; } -/************************************************************************* -|* -|* RscDefine::Search() -|* -*************************************************************************/ RscDefine * RscDefine::Search( const char * pStr ){ return (RscDefine *)StringNode::Search( pStr ); } -/************************************************************************* -|* -|* RscDefine::GetMacro() -|* -*************************************************************************/ rtl::OString RscDefine::GetMacro() { if( pExp ) @@ -268,12 +168,6 @@ rtl::OString RscDefine::GetMacro() return rtl::OString::valueOf(lId); } -/****************** R s c D e f i n e L i s t ****************************/ -/************************************************************************* -|* -|* RscDefineList::New() -|* -*************************************************************************/ RscDefine * RscDefineList::New( sal_uLong lFileKey, const rtl::OString& rDefName, sal_Int32 lDefId, size_t lPos ) { @@ -320,11 +214,6 @@ sal_Bool RscDefineList::Remove() { return sal_True; } -/************************************************************************* -|* -|* RscDefineList::WriteAll() -|* -*************************************************************************/ void RscDefineList::WriteAll( FILE * fOutput ) { for ( size_t i = 0, n = maList.size(); i < n; ++i ) { @@ -336,12 +225,6 @@ void RscDefineList::WriteAll( FILE * fOutput ) }; } -/****************** R s c E x p T y p e **********************************/ -/************************************************************************* -|* -|* RscExpType::Evaluate() -|* -*************************************************************************/ sal_Bool RscExpType::Evaluate( sal_Int32 * plValue ) const{ if( IsDefinition() ){ aExp.pDef->Evaluate(); @@ -369,12 +252,6 @@ void RscExpType::AppendMacro(rtl::OStringBuffer& rStr) const } -/****************** R s c E x p r e s s i o n ****************************/ -/************************************************************************* -|* -|* RscExpression::RscExpression() -|* -*************************************************************************/ RscExpression::RscExpression( RscExpType aLE, char cOp, RscExpType aRE ) { aLeftExp = aLE; @@ -386,11 +263,6 @@ RscExpression::RscExpression( RscExpType aLE, char cOp, RscExpType aRE ) aRightExp.aExp.pDef->IncRef(); } -/************************************************************************* -|* -|* RscExpression::~RscExpression() -|* -*************************************************************************/ RscExpression::~RscExpression(){ if( aLeftExp.IsDefinition() ) aLeftExp.aExp.pDef->DecRef(); @@ -403,11 +275,6 @@ RscExpression::~RscExpression(){ delete aRightExp.aExp.pExp; } -/************************************************************************* -|* -|* RscExpression::Evaluate() -|* -*************************************************************************/ sal_Bool RscExpression::Evaluate( sal_Int32 * plValue ){ sal_Int32 lLeft; sal_Int32 lRight; @@ -438,11 +305,6 @@ sal_Bool RscExpression::Evaluate( sal_Int32 * plValue ){ return sal_False; } -/************************************************************************* -|* -|* RscExpression::GetMacro() -|* -*************************************************************************/ rtl::OString RscExpression::GetMacro() { rtl::OStringBuffer aLeft; @@ -479,12 +341,6 @@ rtl::OString RscExpression::GetMacro() return aLeft.makeStringAndClear(); } -/****************** R s c F i l e ****************************************/ -/************************************************************************* -|* -|* RscFile::RscFile() -|* -*************************************************************************/ RscFile :: RscFile(){ bLoaded = sal_False; bIncFile = sal_False; @@ -492,11 +348,6 @@ RscFile :: RscFile(){ bScanned = sal_False; } -/************************************************************************* -|* -|* RscFile::~RscFile() -|* -*************************************************************************/ RscFile :: ~RscFile() { for ( size_t i = 0, n = aDepLst.size(); i < n; ++i ) delete aDepLst[ i ]; @@ -507,15 +358,6 @@ RscFile :: ~RscFile() { while( aDefLst.Remove() ) ; } -/************************************************************************* -|* -|* RscFile::Depend() -|* -|* Beschreibung Diese Methode gibt sal_True zurueck, wenn lDepend -|* existiert und hinter lFree steht, oder wenn -|* lDepend nicht existiert. -|* -*************************************************************************/ sal_Bool RscFile::Depend( sal_uLong lDepend, sal_uLong lFree ){ RscDepend * pDep; @@ -535,11 +377,6 @@ sal_Bool RscFile::Depend( sal_uLong lDepend, sal_uLong lFree ){ return sal_True; } -/************************************************************************* -|* -|* RscFile::InsertDependFile() -|* -*************************************************************************/ sal_Bool RscFile :: InsertDependFile( sal_uLong lIncFile, size_t lPos ) { for ( size_t i = 0, n = aDepLst.size(); i < n; ++i ) @@ -562,21 +399,10 @@ sal_Bool RscFile :: InsertDependFile( sal_uLong lIncFile, size_t lPos ) return sal_True; } -/****************** R s c D e f T r e e **********************************/ -/************************************************************************* -|* -|* RscDefTree::~RscDefTree() -|* -*************************************************************************/ RscDefTree::~RscDefTree(){ Remove(); } -/************************************************************************* -|* -|* RscDefTree::Remove() -|* -*************************************************************************/ void RscDefTree::Remove(){ RscDefine * pDef; while( pDefRoot ){ @@ -586,22 +412,12 @@ void RscDefTree::Remove(){ } } -/************************************************************************* -|* -|* RscDefTree::~Search() -|* -*************************************************************************/ RscDefine * RscDefTree::Search( const char * pName ){ if( pDefRoot ) return pDefRoot->Search( pName ); return NULL; } -/************************************************************************* -|* -|* RscDefTree::Insert() -|* -*************************************************************************/ void RscDefTree::Insert( RscDefine * pDef ){ if( pDefRoot ) pDefRoot->Insert( pDef ); @@ -610,11 +426,6 @@ void RscDefTree::Insert( RscDefine * pDef ){ pDef->IncRef(); } -/************************************************************************* -|* -|* RscDefTree::Remove() -|* -*************************************************************************/ void RscDefTree::Remove( RscDefine * pDef ){ if( pDefRoot ){ //falls pDef == pDefRoot @@ -623,11 +434,6 @@ void RscDefTree::Remove( RscDefine * pDef ){ pDef->DecRef(); } -/************************************************************************* -|* -|* RscDefTree::Evaluate() -|* -*************************************************************************/ sal_Bool RscDefTree::Evaluate( RscDefine * pDef ){ if( pDef ){ if( !Evaluate( (RscDefine *)pDef->Left() ) ) @@ -638,20 +444,9 @@ sal_Bool RscDefTree::Evaluate( RscDefine * pDef ){ return sal_True; } -/****************** R s c F i l e T a b **********************************/ -/************************************************************************* -|* -|* RscFileTab::RscFileTab() -|* -*************************************************************************/ RscFileTab::RscFileTab(){ } -/************************************************************************* -|* -|* RscFileTab::~RscFileTab() -|* -*************************************************************************/ RscFileTab :: ~RscFileTab(){ aDefTree.Remove(); @@ -663,11 +458,6 @@ RscFileTab :: ~RscFileTab(){ }; } -/************************************************************************* -|* -|* RscFileTab::Find() -|* -*************************************************************************/ sal_uLong RscFileTab :: Find( const rtl::OString& rName ) { sal_uIntPtr aIndex = FirstIndex(); @@ -680,20 +470,12 @@ sal_uLong RscFileTab :: Find( const rtl::OString& rName ) return NOFILE_INDEX; } -/************************************************************************* -|* -|* RscFileTab::FindDef() -|* -*************************************************************************/ RscDefine * RscFileTab::FindDef( const char * pName ){ return aDefTree.Search( pName ); } -/************************************************************************* -|* -|* RscFileTab::Depend() -|* -*************************************************************************/ +/* This method gives back sal_True when lDepend + exists and is behind lFree, or when lDepend does not exist. */ sal_Bool RscFileTab::Depend( sal_uLong lDepend, sal_uLong lFree ){ if( lDepend == lFree ) return sal_True; @@ -711,11 +493,6 @@ sal_Bool RscFileTab::Depend( sal_uLong lDepend, sal_uLong lFree ){ return sal_True; } -/************************************************************************* -|* -|* RscFileTab::TestDef() -|* -*************************************************************************/ sal_Bool RscFileTab::TestDef( sal_uLong lFileKey, size_t lPos, const RscDefine * pDefDec ) { @@ -731,11 +508,6 @@ sal_Bool RscFileTab::TestDef( sal_uLong lFileKey, size_t lPos, return TestDef( lFileKey, lPos, pDefDec->pExp ); } -/************************************************************************* -|* -|* RscFileTab::TestDef() -|* -*************************************************************************/ sal_Bool RscFileTab::TestDef( sal_uLong lFileKey, size_t lPos, const RscExpression * pExpDec ) { @@ -761,11 +533,6 @@ sal_Bool RscFileTab::TestDef( sal_uLong lFileKey, size_t lPos, return sal_True; } -/************************************************************************* -|* -|* RscFileTab::NewDef() -|* -*************************************************************************/ RscDefine * RscFileTab::NewDef( sal_uLong lFileKey, const rtl::OString& rDefName, sal_Int32 lId, sal_uLong lPos ) { @@ -785,11 +552,6 @@ RscDefine * RscFileTab::NewDef( sal_uLong lFileKey, const rtl::OString& rDefName return( pDef ); } -/************************************************************************* -|* -|* RscFileTab::NewDef() -|* -*************************************************************************/ RscDefine * RscFileTab::NewDef( sal_uLong lFileKey, const rtl::OString& rDefName, RscExpression * pExp, sal_uLong lPos ) { @@ -817,11 +579,6 @@ RscDefine * RscFileTab::NewDef( sal_uLong lFileKey, const rtl::OString& rDefName return( pDef ); } -/************************************************************************* -|* -|* RscFileTab::DeleteFileContext() -|* -*************************************************************************/ void RscFileTab :: DeleteFileContext( sal_uLong lFileKey ){ RscFile * pFName; @@ -837,11 +594,6 @@ void RscFileTab :: DeleteFileContext( sal_uLong lFileKey ){ } } -/************************************************************************* -|* -|* RscFileTab::NewCodeFile() -|* -*************************************************************************/ sal_uLong RscFileTab :: NewCodeFile( const rtl::OString& rName ) { sal_uLong lKey = Find( rName ); @@ -856,11 +608,6 @@ sal_uLong RscFileTab :: NewCodeFile( const rtl::OString& rName ) return lKey; } -/************************************************************************* -|* -|* RscFileTab::NewIncFile() -|* -*************************************************************************/ sal_uLong RscFileTab :: NewIncFile(const rtl::OString& rName, const rtl::OString& rPath) { diff --git a/rsc/source/tools/rsctools.cxx b/rsc/source/tools/rsctools.cxx index dd378e482396..136019e6dcdc 100644 --- a/rsc/source/tools/rsctools.cxx +++ b/rsc/source/tools/rsctools.cxx @@ -17,9 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -/****************** I N C L U D E S **************************************/ -// C and C++ Includes. #include <stdlib.h> #include <stdio.h> #if defined (WNT ) @@ -28,25 +26,13 @@ #include <string.h> #include <ctype.h> -// Include #include <rscdef.hxx> #include <rsctools.hxx> #include <osl/file.h> #include <rtl/alloc.h> -using ::rtl::OUString; -using ::rtl::OUStringToOString; - -/****************** C o d e **********************************************/ -/************************************************************************* -|* -|* rsc_strnicmp() -|* -|* Beschreibung Vergleicht zwei Strings Case-Unabhaengig bis zu -|* einer bestimmten Laenge -|* -*************************************************************************/ +/* case insensitive compare of two strings up to a given length */ int rsc_strnicmp( const char *string1, const char *string2, size_t count ) { size_t i; @@ -67,13 +53,7 @@ int rsc_strnicmp( const char *string1, const char *string2, size_t count ) return( 0 ); } -/************************************************************************* -|* -|* rsc_strnicmp() -|* -|* Beschreibung Vergleicht zwei Strings Case-Unabhaengig -|* -*************************************************************************/ +/* case insensitive compare of two strings */ int rsc_stricmp( const char *string1, const char *string2 ){ int i; @@ -98,15 +78,6 @@ char* rsc_strdup( const char* pStr ) return pBuffer; } -/************************************************************************* -|* -|* GetTmpFileName() -|* -|* Beschreibung Gibt einen String eines eindeutigen Dateinamens -|* zurueck. Der Speicher fuer den String wird mit -|* malloc allokiert -|* -*************************************************************************/ rtl::OString GetTmpFileName() { OUString aTmpURL, aTmpFile; @@ -115,14 +86,6 @@ rtl::OString GetTmpFileName() return OUStringToOString( aTmpFile, RTL_TEXTENCODING_MS_1252 ); } -/********************************************************************/ -/* */ -/* Function : Append( ) */ -/* */ -/* Parameters : psw - pointer to a preprocessor switch */ -/* */ -/* Description : appends text files */ -/********************************************************************/ sal_Bool Append(FILE * fDest, const rtl::OString &rTmpFile) { #define MAX_BUF 4096 @@ -138,7 +101,7 @@ sal_Bool Append(FILE * fDest, const rtl::OString &rTmpFile) char szBuf[ MAX_BUF ]; size_t nItems; - do //appemd + do //append { nItems = fread( szBuf, 1, MAX_BUF, fSource ); bSuccess = (nItems == fwrite(szBuf, 1, nItems, fDest)); @@ -161,15 +124,7 @@ sal_Bool Append(const rtl::OString &rOutputSrs, const rtl::OString &rTmpFile) return bRet; } -/************************************************************************* -|* -|* OutputFile -|* -|* Beschreibung Ersetzt Extension durch eine andere -|* Parameter: input, der Input-Dateiname. -|* pExt, die Extension des Ausgabenamens -|* -*************************************************************************/ +/* replaces extension of a file name */ rtl::OString OutputFile(const rtl::OString &rInput, const char * pExt) { sal_Int32 nSepInd = rInput.lastIndexOf("."); @@ -182,13 +137,6 @@ rtl::OString OutputFile(const rtl::OString &rInput, const char * pExt) return rInput.concat(OString(".")).concat(OString(pExt)); } -/************************************************************************* -|* -|* ::ResonseFile() -|* -|* Beschreibung Kommandozeile aufbereiten -|* -*************************************************************************/ char * ResponseFile( RscPtrPtr * ppCmd, char ** ppArgv, sal_uInt32 nArgc ) { FILE *fFile; @@ -197,11 +145,11 @@ char * ResponseFile( RscPtrPtr * ppCmd, char ** ppArgv, sal_uInt32 nArgc ) sal_uInt32 i; bool bInQuotes = false; - // Programmname + // program name ppCmd->Append( rsc_strdup( *ppArgv ) ); for( i = 1; i < nArgc; i++ ) { - if( '@' == **(ppArgv +i) ){ // wenn @, dann Response-Datei + if( '@' == **(ppArgv +i) ){ // when @, then response file if( NULL == (fFile = fopen( (*(ppArgv +i)) +1, "r" )) ) return( (*(ppArgv +i)) ); nItems = fread( &szBuffer[ 0 ], 1, sizeof( char ), fFile ); @@ -241,36 +189,15 @@ char * ResponseFile( RscPtrPtr * ppCmd, char ** ppArgv, sal_uInt32 nArgc ) } -/*************** R s c P t r P t r **************************************/ -/************************************************************************* -|* -|* RscPtrPtr :: RscPtrPtr() -|* -|* Beschreibung Eine Tabelle mit Zeigern -|* -*************************************************************************/ RscPtrPtr :: RscPtrPtr(){ nCount = 0; pMem = NULL; } -/************************************************************************* -|* -|* RscPtrPtr :: ~RscPtrPtr() -|* -|* Beschreibung Zerst�rt eine Tabelle mit Zeigern, die Zeiger werde -|* ebenfalls freigegebn -|* -*************************************************************************/ RscPtrPtr :: ~RscPtrPtr(){ Reset(); } -/************************************************************************* -|* -|* RscPtrPtr :: Reset() -|* -*************************************************************************/ void RscPtrPtr :: Reset(){ sal_uInt32 i; @@ -285,13 +212,6 @@ void RscPtrPtr :: Reset(){ pMem = NULL; } -/************************************************************************* -|* -|* RscPtrPtr :: Append() -|* -|* Beschreibung Haengt einen Eintrag an. -|* -*************************************************************************/ sal_uInt32 RscPtrPtr :: Append( void * pBuffer ){ if( !pMem ) pMem = (void **)rtl_allocateMemory( (nCount +1) * sizeof( void * ) ); @@ -303,25 +223,12 @@ sal_uInt32 RscPtrPtr :: Append( void * pBuffer ){ return( nCount++ ); } -/************************************************************************* -|* -|* RscPtrPtr :: GetEntry() -|* -|* Beschreibung Liefert einen Eintrag, NULL wenn nicht vorhanden. -|* -*************************************************************************/ void * RscPtrPtr :: GetEntry( sal_uInt32 nEntry ){ if( nEntry < nCount ) return( pMem[ nEntry ] ); return( NULL ); } -/****************** R S C W R I T E R C **********************************/ -/************************************************************************* -|* -|* RscWriteRc :: RscWriteRc() -|* -*************************************************************************/ RscWriteRc::RscWriteRc( RSCBYTEORDER_TYPE nOrder ) { short nSwapTest = 1; @@ -341,22 +248,12 @@ RscWriteRc::RscWriteRc( RSCBYTEORDER_TYPE nOrder ) pMem = NULL; } -/************************************************************************* -|* -|* RscWriteRc :: ~RscWriteRc() -|* -*************************************************************************/ RscWriteRc :: ~RscWriteRc() { if( pMem ) rtl_freeMemory( pMem ); } -/************************************************************************* -|* -|* RscWriteRc :: IncSize() -|* -*************************************************************************/ sal_uInt32 RscWriteRc :: IncSize( sal_uInt32 nSize ) { sal_uInt32 nOrigPos = nLen; @@ -368,11 +265,6 @@ sal_uInt32 RscWriteRc :: IncSize( sal_uInt32 nSize ) return nOrigPos; } -/************************************************************************* -|* -|* RscWriteRc :: GetPointer() -|* -*************************************************************************/ char * RscWriteRc :: GetPointer( sal_uInt32 nSize ) { if( !pMem ) @@ -381,11 +273,6 @@ char * RscWriteRc :: GetPointer( sal_uInt32 nSize ) } -/************************************************************************* -|* -|* RscWriteRc :: Put() -|* -*************************************************************************/ void RscWriteRc :: Put( sal_uInt16 nVal ) { sal_uInt32 nOldLen; diff --git a/rsc/source/tools/rsctree.cxx b/rsc/source/tools/rsctree.cxx index f424d43d3ef8..b174bc1153b6 100644 --- a/rsc/source/tools/rsctree.cxx +++ b/rsc/source/tools/rsctree.cxx @@ -17,42 +17,22 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -/****************** I N C L U D E S **************************************/ -// C and C++ Includes. #include <stdlib.h> #include <stdio.h> #include <string.h> -// Programmabh�ngige Includes. #include <tools/link.hxx> #include <rsctree.hxx> -/****************** C O D E **********************************************/ -/****************** B i N o d e ******************************************/ -/************************************************************************* -|* -|* BiNode::BiNode() -|* -*************************************************************************/ BiNode::BiNode(){ pLeft = pRight = NULL; } -/************************************************************************* -|* -|* BiNode::~BiNode() -|* -*************************************************************************/ BiNode::~BiNode(){ } -/************************************************************************* -|* -|* BiNode::EnumNodes() -|* -*************************************************************************/ void BiNode::EnumNodes( Link aLink ) const{ if( Left() ) Left()->EnumNodes( aLink ); @@ -61,11 +41,6 @@ void BiNode::EnumNodes( Link aLink ) const{ Right()->EnumNodes( aLink ); } -/************************************************************************* -|* -|* BiNode::ChangeDLListBTree() -|* -*************************************************************************/ BiNode * BiNode::ChangeDLListBTree( BiNode * pList ){ BiNode * pMiddle; BiNode * pTmp; @@ -100,11 +75,6 @@ BiNode * BiNode::ChangeDLListBTree( BiNode * pList ){ return( pList ); } -/************************************************************************* -|* -|* BiNode::ChangeBTreeDLList() -|* -*************************************************************************/ BiNode * BiNode::ChangeBTreeDLList(){ BiNode * pList; BiNode * pLL_RN; // linke Liste rechter Knoten @@ -125,12 +95,6 @@ BiNode * BiNode::ChangeBTreeDLList(){ return( pList ); } -/****************** N a m e N o d e **************************************/ -/************************************************************************* -|* -|* NameNode::Remove() -|* -*************************************************************************/ NameNode * NameNode::Remove( NameNode * pRemove ){ NameNode * pRoot = this; NameNode * pParent = SearchParent( pRemove ); @@ -165,11 +129,6 @@ NameNode * NameNode::Remove( NameNode * pRemove ){ } -/************************************************************************* -|* -|* NameNode::Compare -|* -*************************************************************************/ COMPARE NameNode::Compare( const NameNode * pCompare ) const{ if( (long)this < (long)pCompare ) return LESS; @@ -188,11 +147,6 @@ COMPARE NameNode::Compare( const void * pCompare ) const{ return EQUAL; } -/************************************************************************* -|* -|* NameNode::SearchParent -|* -*************************************************************************/ NameNode* NameNode::SearchParent( const NameNode * pSearch ) const{ // search for a parent node. // return a pointer to the parent node if found. @@ -216,11 +170,6 @@ NameNode* NameNode::SearchParent( const NameNode * pSearch ) const{ return( (NameNode *)NULL ); } -/************************************************************************* -|* -|* NameNode::Search -|* -*************************************************************************/ NameNode* NameNode::Search( const NameNode * pSearch ) const{ // search for a node. // return a pointer to the node if found. @@ -261,11 +210,6 @@ NameNode* NameNode::Search( const void * pSearch ) const{ return( NULL ); } -/************************************************************************* -|* -|* NameNode::Insert() -|* -*************************************************************************/ sal_Bool NameNode::Insert( NameNode * pTN, sal_uInt32* pnDepth ){ // Ein Knoten wird in den Baum eingefuegt // Gibt es einen Knoten mit dem gleichen Namen, dann return sal_False @@ -292,11 +236,6 @@ sal_Bool NameNode::Insert( NameNode * pTN, sal_uInt32* pnDepth ){ return( bRet ); } -/************************************************************************* -|* -|* NameNode::Insert() -|* -*************************************************************************/ sal_Bool NameNode::Insert( NameNode * pTN ){ // insert a node in the tree. // if the node with the same name is in, return sal_False and no insert. @@ -317,11 +256,6 @@ sal_Bool NameNode::Insert( NameNode * pTN ){ return( bRet ); } -/************************************************************************* -|* -|* NameNode::OrderTree() -|* -*************************************************************************/ void NameNode::OrderTree(){ NameNode * pTmpLeft = (NameNode *)Left(); NameNode * pTmpRight = (NameNode *)Right(); @@ -344,21 +278,10 @@ void NameNode::SubOrderTree( NameNode * pOrderNode ){ } } -/****************** I d N o d e ******************************************/ -/************************************************************************* -|* -|* IdNode::Search() -|* -*************************************************************************/ IdNode * IdNode::Search( sal_uInt32 nTypeName ) const{ return( (IdNode *)NameNode::Search( (const void *)&nTypeName ) ); } -/************************************************************************* -|* -|* IdNode::Compare() -|* -*************************************************************************/ COMPARE IdNode::Compare( const NameNode * pSearch ) const { if( GetId() < (sal_uInt32)(((const IdNode *)pSearch)->GetId()) ) @@ -380,30 +303,15 @@ COMPARE IdNode::Compare( const void * pSearch ) const{ return EQUAL; } -/************************************************************************* -|* -|* IdNode::GetId() -|* -*************************************************************************/ sal_uInt32 IdNode::GetId() const { return( 0xFFFFFFFF ); } -/************************************************************************* -|* -|* StringNode::Search() -|* -*************************************************************************/ StringNode * StringNode::Search( const char * pSearch ) const{ return (StringNode *)NameNode::Search( (const void *)pSearch ); } -/************************************************************************* -|* -|* StringNode::Compare() -|* -*************************************************************************/ COMPARE StringNode::Compare( const NameNode * pSearch ) const { int nCmp = strcmp( m_aName.getStr(), |