diff options
Diffstat (limited to 'rsc/source/tools/rscdef.cxx')
-rw-r--r-- | rsc/source/tools/rscdef.cxx | 184 |
1 files changed, 92 insertions, 92 deletions
diff --git a/rsc/source/tools/rscdef.cxx b/rsc/source/tools/rscdef.cxx index eb714bbcc3c2..6231bbd92aae 100644 --- a/rsc/source/tools/rscdef.cxx +++ b/rsc/source/tools/rscdef.cxx @@ -34,7 +34,7 @@ /****************** C o d e **********************************************/ /****************** R s c I d ********************************************/ -BOOL RscId::bNames = TRUE; +sal_Bool RscId::bNames = sal_True; /************************************************************************* |* @@ -46,8 +46,8 @@ BOOL RscId::bNames = TRUE; |* Letzte Aenderung MM 26.06.91 |* *************************************************************************/ -void RscId::SetNames( BOOL bSet ) { bNames = bSet; } -BOOL RscId::IsSetNames() { return bNames; } +void RscId::SetNames( sal_Bool bSet ) { bNames = bSet; } +sal_Bool RscId::IsSetNames() { return bNames; } /************************************************************************* |* @@ -58,8 +58,8 @@ BOOL RscId::IsSetNames() { return bNames; } |* Letzte Aenderung MM 17.05.91 |* *************************************************************************/ -INT32 RscId::GetNumber() const{ - INT32 lVal; +sal_Int32 RscId::GetNumber() const{ + sal_Int32 lVal; aExp.Evaluate( &lVal ); return lVal; } @@ -79,7 +79,7 @@ void RscId::Create( const RscExpType & rExpType ) if( aExp.IsDefinition() ) aExp.aExp.pDef->IncRef(); else if( aExp.IsExpression() ){ - INT32 lValue; + sal_Int32 lValue; aExp.Evaluate( &lValue ); aExp.SetLong( lValue ); @@ -159,7 +159,7 @@ RscId& RscId::operator = ( const RscId& rRscId ){ |* Letzte Aenderung MM 16.05.91 |* *************************************************************************/ -BOOL RscId::operator == ( const RscId& rRscId ) const +sal_Bool RscId::operator == ( const RscId& rRscId ) const { return( GetNumber() == rRscId.GetNumber() ); } @@ -173,7 +173,7 @@ BOOL RscId::operator == ( const RscId& rRscId ) const |* Letzte Aenderung MM 16.05.91 |* *************************************************************************/ -BOOL RscId::operator < ( const RscId& rRscId ) const +sal_Bool RscId::operator < ( const RscId& rRscId ) const { return( GetNumber() < rRscId.GetNumber() ); } @@ -187,21 +187,21 @@ BOOL RscId::operator < ( const RscId& rRscId ) const |* Letzte Aenderung MM 16.05.91 |* *************************************************************************/ -BOOL RscId::operator > ( const RscId& rRscId ) const +sal_Bool RscId::operator > ( const RscId& rRscId ) const { return( GetNumber() > rRscId.GetNumber() ); } /************************************************************************* |* -|* RscId::INT32() +|* RscId::sal_Int32() |* |* Beschreibung |* Ersterstellung MM 16.05.91 |* Letzte Aenderung MM 16.05.91 |* *************************************************************************/ -RscId::operator INT32() const +RscId::operator sal_Int32() const { return( GetNumber() ); } @@ -261,7 +261,7 @@ ByteString RscId::GetMacro() const |* Letzte Aenderung MM 01.11.91 |* *************************************************************************/ -RscDefine::RscDefine( ULONG lKey, const ByteString & rDefName, INT32 lDefId ) +RscDefine::RscDefine( sal_uLong lKey, const ByteString & rDefName, sal_Int32 lDefId ) : StringNode( rDefName ) { nRefCount = 0; @@ -270,7 +270,7 @@ RscDefine::RscDefine( ULONG lKey, const ByteString & rDefName, INT32 lDefId ) pExp = NULL; } -RscDefine::RscDefine( ULONG lKey, const ByteString & rDefName, +RscDefine::RscDefine( sal_uLong lKey, const ByteString & rDefName, RscExpression * pExpression ) : StringNode( rDefName ) { @@ -345,7 +345,7 @@ void RscDefine::ChangeMacro( RscExpression * pExpression ){ pExp->Evaluate( &lId ); } -void RscDefine::ChangeMacro( INT32 lIdentifier ){ +void RscDefine::ChangeMacro( sal_Int32 lIdentifier ){ if( pExp ){ delete pExp; pExp = NULL; @@ -362,8 +362,8 @@ void RscDefine::ChangeMacro( INT32 lIdentifier ){ |* Letzte Aenderung MM 01.11.91 |* *************************************************************************/ -BOOL RscDefine::Evaluate(){ - BOOL bRet = TRUE; +sal_Bool RscDefine::Evaluate(){ + sal_Bool bRet = sal_True; if( pExp ) bRet = !pExp->Evaluate( &lId ); @@ -410,8 +410,8 @@ ByteString RscDefine::GetMacro() |* Letzte Aenderung MM 04.11.91 |* *************************************************************************/ -RscDefine * RscDefineList::New( ULONG lFileKey, const ByteString & rDefName, - INT32 lDefId, ULONG lPos ) +RscDefine * RscDefineList::New( sal_uLong lFileKey, const ByteString & rDefName, + sal_Int32 lDefId, sal_uLong lPos ) { RscDefine * pDef; @@ -421,8 +421,8 @@ RscDefine * RscDefineList::New( ULONG lFileKey, const ByteString & rDefName, return pDef; } -RscDefine * RscDefineList::New( ULONG lFileKey, const ByteString & rDefName, - RscExpression * pExpression, ULONG lPos ) +RscDefine * RscDefineList::New( sal_uLong lFileKey, const ByteString & rDefName, + RscExpression * pExpression, sal_uLong lPos ) { RscDefine * pDef; @@ -442,7 +442,7 @@ RscDefine * RscDefineList::New( ULONG lFileKey, const ByteString & rDefName, |* Letzte Aenderung MM 04.11.91 |* *************************************************************************/ -BOOL RscDefineList::Remove( RscDefine * pDef ){ +sal_Bool RscDefineList::Remove( RscDefine * pDef ){ pDef = RscSubDefList::Remove( pDef ); if( pDef ){ pDef->DefineToNumber(); @@ -452,7 +452,7 @@ BOOL RscDefineList::Remove( RscDefine * pDef ){ return( NULL != pDef ); } -BOOL RscDefineList::Remove( ULONG lIndex ){ +sal_Bool RscDefineList::Remove( sal_uLong lIndex ){ RscDefine * pDef = RscSubDefList::Remove( lIndex ); if( pDef ){ pDef->DefineToNumber(); @@ -462,10 +462,10 @@ BOOL RscDefineList::Remove( ULONG lIndex ){ return( NULL != pDef ); } -BOOL RscDefineList::Remove(){ +sal_Bool RscDefineList::Remove(){ RscDefine * pDef; - pDef = RscSubDefList::Remove( (ULONG)0 ); + pDef = RscSubDefList::Remove( (sal_uLong)0 ); if( pDef ){ pDef->DefineToNumber(); @@ -483,7 +483,7 @@ BOOL RscDefineList::Remove(){ |* Letzte Aenderung MM 12.11.91 |* *************************************************************************/ -BOOL RscDefineList::Befor( const RscDefine * pFree, +sal_Bool RscDefineList::Befor( const RscDefine * pFree, const RscDefine * pDepend ) { RscDefine * pDef; @@ -494,13 +494,13 @@ BOOL RscDefineList::Befor( const RscDefine * pFree, pDef = Next(); while( pDef ){ if( pDef == pDepend ) - return TRUE; + return sal_True; pDef = Next(); } } pDef = Next(); }; - return FALSE; + return sal_False; } /************************************************************************* @@ -535,7 +535,7 @@ void RscDefineList::WriteAll( FILE * fOutput ) |* Letzte Aenderung MM 01.11.91 |* *************************************************************************/ -BOOL RscExpType::Evaluate( INT32 * plValue ) const{ +sal_Bool RscExpType::Evaluate( sal_Int32 * plValue ) const{ if( IsDefinition() ){ aExp.pDef->Evaluate(); // Eventuellen Fehler ignorieren @@ -548,7 +548,7 @@ BOOL RscExpType::Evaluate( INT32 * plValue ) const{ else *plValue = GetLong(); - return TRUE; + return sal_True; } /************************************************************************* @@ -626,9 +626,9 @@ RscExpression::~RscExpression(){ |* Letzte Aenderung MM 01.11.91 |* *************************************************************************/ -BOOL RscExpression::Evaluate( INT32 * plValue ){ - INT32 lLeft; - INT32 lRight; +sal_Bool RscExpression::Evaluate( sal_Int32 * plValue ){ + sal_Int32 lLeft; + sal_Int32 lRight; // linken und rechten Zweig auswerten if( aLeftExp.Evaluate( &lLeft ) && aRightExp.Evaluate( &lRight ) ){ @@ -648,12 +648,12 @@ BOOL RscExpression::Evaluate( INT32 * plValue ){ *plValue = lLeft << lRight; else{ if( 0L == lRight ) - return FALSE; + return sal_False; *plValue = lLeft / lRight; }; - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } /************************************************************************* @@ -712,10 +712,10 @@ ByteString RscExpression::GetMacro() |* *************************************************************************/ RscFile :: RscFile(){ - bLoaded = FALSE; - bIncFile = FALSE; - bDirty = FALSE; - bScanned = FALSE; + bLoaded = sal_False; + bIncFile = sal_False; + bDirty = sal_False; + bScanned = sal_False; } /************************************************************************* @@ -728,11 +728,11 @@ RscFile :: RscFile(){ |* *************************************************************************/ RscFile :: ~RscFile(){ - RscDepend * pDep = Remove( (ULONG)0 ); + RscDepend * pDep = Remove( (sal_uLong)0 ); while( pDep ){ delete pDep; - pDep = Remove( (ULONG)0 ); + pDep = Remove( (sal_uLong)0 ); } //von hinten nach vorne ist besser wegen der Abhaengigkeiten @@ -745,14 +745,14 @@ RscFile :: ~RscFile(){ |* |* RscFile::Depend() |* -|* Beschreibung Diese Methode gibt TRUE zurueck, wenn lDepend +|* Beschreibung Diese Methode gibt sal_True zurueck, wenn lDepend |* existiert und hinter lFree steht, oder wenn |* lDepend nicht existiert. |* Ersterstellung MM 12.11.91 |* Letzte Aenderung MM 12.11.91 |* *************************************************************************/ -BOOL RscFile::Depend( ULONG lDepend, ULONG lFree ){ +sal_Bool RscFile::Depend( sal_uLong lDepend, sal_uLong lFree ){ RscDepend * pDep; pDep = Last(); @@ -760,15 +760,15 @@ BOOL RscFile::Depend( ULONG lDepend, ULONG lFree ){ if( pDep->GetFileKey() == lDepend ){ while( pDep ){ if( pDep->GetFileKey() == lFree ) - return TRUE; + return sal_True; pDep = Prev(); } - return FALSE; + return sal_False; } pDep = Prev(); }; - return TRUE; + return sal_True; } /************************************************************************* @@ -780,14 +780,14 @@ BOOL RscFile::Depend( ULONG lDepend, ULONG lFree ){ |* Letzte Aenderung MM 06.01.92 |* *************************************************************************/ -BOOL RscFile :: InsertDependFile( ULONG lIncFile, ULONG lPos ) +sal_Bool RscFile :: InsertDependFile( sal_uLong lIncFile, sal_uLong lPos ) { RscDepend * pDep; pDep = First(); while( pDep ){ if( pDep->GetFileKey() == lIncFile ) - return TRUE; + return sal_True; pDep = Next(); } @@ -799,7 +799,7 @@ BOOL RscFile :: InsertDependFile( ULONG lIncFile, ULONG lPos ) else Insert( new RscDepend( lIncFile ), lPos ); - return TRUE; + return sal_True; } /************************************************************************* @@ -811,7 +811,7 @@ BOOL RscFile :: InsertDependFile( ULONG lIncFile, ULONG lPos ) |* Letzte Aenderung MM 18.11.91 |* *************************************************************************/ -void RscFile :: RemoveDependFile( ULONG lDepFile ) +void RscFile :: RemoveDependFile( sal_uLong lDepFile ) { RscDepend * pDep = Last(); @@ -915,17 +915,17 @@ void RscDefTree::Remove( RscDefine * pDef ){ |* Letzte Aenderung MM 12.11.91 |* *************************************************************************/ -BOOL RscDefTree::Evaluate( RscDefine * pDef ){ +sal_Bool RscDefTree::Evaluate( RscDefine * pDef ){ if( pDef ){ if( !Evaluate( (RscDefine *)pDef->Left() ) ) - return FALSE; + return sal_False; if( !Evaluate( (RscDefine *)pDef->Right() ) ) - return FALSE; + return sal_False; }; - return TRUE; + return sal_True; } -BOOL RscDefTree::Evaluate(){ +sal_Bool RscDefTree::Evaluate(){ return Evaluate( pDefRoot ); } @@ -973,7 +973,7 @@ RscFileTab :: ~RscFileTab(){ |* Letzte Aenderung MM 16.05.91 |* *************************************************************************/ -ULONG RscFileTab :: Find( const ByteString & rName ) +sal_uLong RscFileTab :: Find( const ByteString & rName ) { RscFile * pFName; @@ -1009,7 +1009,7 @@ RscDefine * RscFileTab::FindDef( const char * pName ){ |* Letzte Aenderung MM 01.11.91 |* *************************************************************************/ -RscDefine * RscFileTab::FindDef( ULONG lFileKey, const ByteString & rName ) +RscDefine * RscFileTab::FindDef( sal_uLong lFileKey, const ByteString & rName ) { RscDefine * pDef = FindDef( rName ); @@ -1030,20 +1030,20 @@ RscDefine * RscFileTab::FindDef( ULONG lFileKey, const ByteString & rName ) |* Letzte Aenderung MM 08.11.91 |* *************************************************************************/ -BOOL RscFileTab::Depend( ULONG lDepend, ULONG lFree ){ +sal_Bool RscFileTab::Depend( sal_uLong lDepend, sal_uLong lFree ){ if( lDepend == lFree ) - return TRUE; + return sal_True; RscFile * pFile = First(); while( pFile ){ if( !pFile->IsIncFile() ){ if( !pFile->Depend( lDepend, lFree ) ) - return FALSE; + return sal_False; }; pFile = Next(); }; - return TRUE; + return sal_True; } /************************************************************************* @@ -1055,17 +1055,17 @@ BOOL RscFileTab::Depend( ULONG lDepend, ULONG lFree ){ |* Letzte Aenderung MM 14.01.92 |* *************************************************************************/ -BOOL RscFileTab::TestDef( ULONG lFileKey, ULONG lPos, +sal_Bool RscFileTab::TestDef( sal_uLong lFileKey, sal_uLong lPos, const RscDefine * pDefDec ) { if( lFileKey == pDefDec->GetFileKey() ){ RscFile * pFile = GetFile( pDefDec->GetFileKey() ); if( pFile && (lPos <= pFile->aDefLst.GetPos( (RscDefine *)pDefDec )) && (lPos != LIST_APPEND) ) - return FALSE; + return sal_False; } else if( !Depend( lFileKey, pDefDec->GetFileKey() ) ) - return FALSE; + return sal_False; return TestDef( lFileKey, lPos, pDefDec->pExp ); } @@ -1079,29 +1079,29 @@ BOOL RscFileTab::TestDef( ULONG lFileKey, ULONG lPos, |* Letzte Aenderung MM 14.01.92 |* *************************************************************************/ -BOOL RscFileTab::TestDef( ULONG lFileKey, ULONG lPos, +sal_Bool RscFileTab::TestDef( sal_uLong lFileKey, sal_uLong lPos, const RscExpression * pExpDec ) { if( !pExpDec ) - return TRUE; + return sal_True; if( pExpDec->aLeftExp.IsExpression() ) if( !TestDef( lFileKey, lPos, pExpDec->aLeftExp.aExp.pExp ) ) - return FALSE; + return sal_False; if( pExpDec->aLeftExp.IsDefinition() ) if( !TestDef( lFileKey, lPos, pExpDec->aLeftExp.aExp.pDef ) ) - return FALSE; + return sal_False; if( pExpDec->aRightExp.IsExpression() ) if( !TestDef( lFileKey, lPos, pExpDec->aRightExp.aExp.pExp ) ) - return FALSE; + return sal_False; if( pExpDec->aRightExp.IsDefinition() ) if( !TestDef( lFileKey, lPos, pExpDec->aRightExp.aExp.pDef ) ) - return FALSE; + return sal_False; - return TRUE; + return sal_True; } /************************************************************************* @@ -1113,8 +1113,8 @@ BOOL RscFileTab::TestDef( ULONG lFileKey, ULONG lPos, |* Letzte Aenderung MM 04.11.91 |* *************************************************************************/ -RscDefine * RscFileTab::NewDef( ULONG lFileKey, const ByteString & rDefName, - INT32 lId, ULONG lPos ) +RscDefine * RscFileTab::NewDef( sal_uLong lFileKey, const ByteString & rDefName, + sal_Int32 lId, sal_uLong lPos ) { RscDefine * pDef = FindDef( rDefName ); @@ -1141,8 +1141,8 @@ RscDefine * RscFileTab::NewDef( ULONG lFileKey, const ByteString & rDefName, |* Letzte Aenderung MM 04.11.91 |* *************************************************************************/ -RscDefine * RscFileTab::NewDef( ULONG lFileKey, const ByteString & rDefName, - RscExpression * pExp, ULONG lPos ) +RscDefine * RscFileTab::NewDef( sal_uLong lFileKey, const ByteString & rDefName, + RscExpression * pExp, sal_uLong lPos ) { RscDefine * pDef = FindDef( rDefName ); @@ -1177,14 +1177,14 @@ RscDefine * RscFileTab::NewDef( ULONG lFileKey, const ByteString & rDefName, |* Letzte Aenderung MM 22.11.91 |* *************************************************************************/ -BOOL RscFileTab::IsDefUsed( const ByteString & rDefName ) +sal_Bool RscFileTab::IsDefUsed( const ByteString & rDefName ) { RscDefine * pDef = FindDef( rDefName ); if( pDef ) return( pDef->GetRefCount() != 2 ); - return FALSE; + return sal_False; } /************************************************************************* @@ -1219,7 +1219,7 @@ void RscFileTab::DeleteDef( const ByteString & rDefName ) |* Letzte Aenderung MM 11.11.91 |* *************************************************************************/ -BOOL RscFileTab::ChangeDef( const ByteString & rDefName, INT32 lId ) +sal_Bool RscFileTab::ChangeDef( const ByteString & rDefName, sal_Int32 lId ) { RscDefine * pDef = FindDef( rDefName ); @@ -1228,7 +1228,7 @@ BOOL RscFileTab::ChangeDef( const ByteString & rDefName, INT32 lId ) //alle Macros neu bewerten return aDefTree.Evaluate(); }; - return( FALSE ); + return( sal_False ); } /************************************************************************* @@ -1240,12 +1240,12 @@ BOOL RscFileTab::ChangeDef( const ByteString & rDefName, INT32 lId ) |* Letzte Aenderung MM 11.11.91 |* *************************************************************************/ -BOOL RscFileTab::ChangeDef( const ByteString & rDefName, +sal_Bool RscFileTab::ChangeDef( const ByteString & rDefName, RscExpression * pExp ) { RscDefine * pDef = FindDef( rDefName ); RscFile * pFile; - ULONG lPos = 0; + sal_uLong lPos = 0; if( pDef ){ pFile = GetFile( pDef->GetFileKey() ); @@ -1263,7 +1263,7 @@ BOOL RscFileTab::ChangeDef( const ByteString & rDefName, // geloescht werden delete pExp; - return( FALSE ); + return( sal_False ); } /************************************************************************* @@ -1275,7 +1275,7 @@ BOOL RscFileTab::ChangeDef( const ByteString & rDefName, |* Letzte Aenderung MM 04.11.91 |* *************************************************************************/ -BOOL RscFileTab::ChangeDefName( const ByteString & rDefName, +sal_Bool RscFileTab::ChangeDefName( const ByteString & rDefName, const ByteString & rNewName ) { RscDefine * pDef = FindDef( rDefName ); @@ -1287,11 +1287,11 @@ BOOL RscFileTab::ChangeDefName( const ByteString & rDefName, aDefTree.Remove( pDef ); pDef->SetName( rNewName ); aDefTree.Insert( pDef ); - return( TRUE ); + return( sal_True ); } }; - return( FALSE ); + return( sal_False ); } /************************************************************************* @@ -1303,7 +1303,7 @@ BOOL RscFileTab::ChangeDefName( const ByteString & rDefName, |* Letzte Aenderung MM 09.12.91 |* *************************************************************************/ -void RscFileTab :: DeleteFileContext( ULONG lFileKey ){ +void RscFileTab :: DeleteFileContext( sal_uLong lFileKey ){ RscFile * pFName; pFName = GetFile( lFileKey ); @@ -1315,7 +1315,7 @@ void RscFileTab :: DeleteFileContext( ULONG lFileKey ){ aDefTree.Remove( pDef ); pDef = pFName->aDefLst.Next(); }; - while( pFName->aDefLst.Remove( (ULONG)0 ) ) ; + while( pFName->aDefLst.Remove( (sal_uLong)0 ) ) ; } } @@ -1328,7 +1328,7 @@ void RscFileTab :: DeleteFileContext( ULONG lFileKey ){ |* Letzte Aenderung MM 16.05.91 |* *************************************************************************/ -void RscFileTab :: DeleteFile( ULONG lFileKey ){ +void RscFileTab :: DeleteFile( sal_uLong lFileKey ){ RscFile * pFName; //Defines freigeben @@ -1355,9 +1355,9 @@ void RscFileTab :: DeleteFile( ULONG lFileKey ){ |* Letzte Aenderung MM 16.05.91 |* *************************************************************************/ -ULONG RscFileTab :: NewCodeFile( const ByteString & rName ) +sal_uLong RscFileTab :: NewCodeFile( const ByteString & rName ) { - ULONG lKey; + sal_uLong lKey; RscFile * pFName; lKey = Find( rName ); @@ -1381,10 +1381,10 @@ ULONG RscFileTab :: NewCodeFile( const ByteString & rName ) |* Letzte Aenderung MM 16.05.91 |* *************************************************************************/ -ULONG RscFileTab :: NewIncFile( const ByteString & rName, +sal_uLong RscFileTab :: NewIncFile( const ByteString & rName, const ByteString & rPath ) { - ULONG lKey; + sal_uLong lKey; RscFile * pFName; lKey = Find( rName ); |