diff options
author | Philipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM> | 2011-02-14 16:17:22 +0100 |
---|---|---|
committer | Philipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM> | 2011-02-14 16:17:22 +0100 |
commit | 1fb042333fe6287756ff1fac11d18cd7c150730d (patch) | |
tree | 595de5d187177832ce656d7832af9dce9dce2d99 /idl/source | |
parent | 5b3e910e926c7dd1e8dcfe8e0a5c6cb5bd17480a (diff) | |
parent | cd0d6a5a6775f197fdb7e78b54c8133074a7a236 (diff) |
rebase to DEV300_m100
Diffstat (limited to 'idl/source')
-rwxr-xr-x[-rw-r--r--] | idl/source/cmptools/char.cxx | 12 | ||||
-rwxr-xr-x[-rw-r--r--] | idl/source/cmptools/hash.cxx | 64 | ||||
-rwxr-xr-x[-rw-r--r--] | idl/source/cmptools/lex.cxx | 32 | ||||
-rwxr-xr-x[-rw-r--r--] | idl/source/objects/basobj.cxx | 114 | ||||
-rwxr-xr-x[-rw-r--r--] | idl/source/objects/bastype.cxx | 146 | ||||
-rwxr-xr-x[-rw-r--r--] | idl/source/objects/module.cxx | 96 | ||||
-rwxr-xr-x[-rw-r--r--] | idl/source/objects/object.cxx | 130 | ||||
-rwxr-xr-x[-rw-r--r--] | idl/source/objects/slot.cxx | 246 | ||||
-rwxr-xr-x[-rw-r--r--] | idl/source/objects/types.cxx | 308 | ||||
-rwxr-xr-x[-rw-r--r--] | idl/source/prj/command.cxx | 26 | ||||
-rwxr-xr-x[-rw-r--r--] | idl/source/prj/database.cxx | 197 | ||||
-rwxr-xr-x[-rw-r--r--] | idl/source/prj/globals.cxx | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | idl/source/prj/svidl.cxx | 18 |
13 files changed, 696 insertions, 695 deletions
diff --git a/idl/source/cmptools/char.cxx b/idl/source/cmptools/char.cxx index 9f7272ee4524..6e0049240bbb 100644..100755 --- a/idl/source/cmptools/char.cxx +++ b/idl/source/cmptools/char.cxx @@ -87,20 +87,20 @@ char * SvChar::GetTable( CharSet nSource , CharSet nDest ) if( !pCharTable ) pCharTable = new Table(); - BYTE * pSet; - pSet = (BYTE *)pCharTable->Get( ((ULONG)nSource << 16) + (ULONG)nDest ); + sal_uInt8 * pSet; + pSet = (sal_uInt8 *)pCharTable->Get( ((sal_uLong)nSource << 16) + (sal_uLong)nDest ); if( !pSet ) { - pSet = new BYTE[ 256 ]; + pSet = new sal_uInt8[ 256 ]; memcpy( pSet, EqualTab, sizeof( EqualTab ) ); - for( USHORT i = 128; i < 256; i++ ) + for( sal_uInt16 i = 128; i < 256; i++ ) { char c = ByteString::Convert( pSet[i], nSource, nDest ); if( c ) - pSet[ i ] = (BYTE)c; + pSet[ i ] = (sal_uInt8)c; } - pCharTable->Insert( ((ULONG)nSource << 16) + (ULONG)nDest, pSet ); + pCharTable->Insert( ((sal_uLong)nSource << 16) + (sal_uLong)nDest, pSet ); } return (char *)pSet; diff --git a/idl/source/cmptools/hash.cxx b/idl/source/cmptools/hash.cxx index 4d5427f3875c..f919a1074efa 100644..100755 --- a/idl/source/cmptools/hash.cxx +++ b/idl/source/cmptools/hash.cxx @@ -34,7 +34,7 @@ #include <stdio.h> #include <ctype.h> -// Programmabhngige Includes. +// Programmabh�ngige Includes. #include <hash.hxx> #include <tools/debug.hxx> @@ -55,7 +55,7 @@ SvStringHashEntry::~SvStringHashEntry() { }; |* Beschreibung |* *************************************************************************/ -SvHashTable::SvHashTable( UINT32 nMaxEntries ) +SvHashTable::SvHashTable( sal_uInt32 nMaxEntries ) { nMax = nMaxEntries; // set max entries nFill = 0; // no entries @@ -73,8 +73,8 @@ SvHashTable::SvHashTable( UINT32 nMaxEntries ) SvHashTable::~SvHashTable() { #ifdef DOS_NIE - printf( "Maximum: %ld, Fllung: %ld\n", (ULONG)nMax, (ULONG)nFill ); - printf( "Anfragen: %ld, Versuche: %ld", (ULONG)lAsk, (ULONG)lTry ); + printf( "Maximum: %ld, F�llung: %ld\n", (sal_uLong)nMax, (sal_uLong)nFill ); + printf( "Anfragen: %ld, Versuche: %ld", (sal_uLong)lAsk, (sal_uLong)lTry ); if( lTry != 0 ) printf( ", V/E = %ld\n", lTry / lAsk ); #endif @@ -87,12 +87,12 @@ SvHashTable::~SvHashTable() |* Beschreibung |* *************************************************************************/ -BOOL SvHashTable::Test_Insert( const void * pElement, BOOL bInsert, - UINT32 * pInsertPos ) +sal_Bool SvHashTable::Test_Insert( const void * pElement, sal_Bool bInsert, + sal_uInt32 * pInsertPos ) { - UINT32 nHash; - UINT32 nIndex; - UINT32 nLoop; + sal_uInt32 nHash; + sal_uInt32 nIndex; + sal_uInt32 nLoop; lAsk++; lTry++; @@ -110,11 +110,11 @@ BOOL SvHashTable::Test_Insert( const void * pElement, BOOL bInsert, { if( pInsertPos ) *pInsertPos = nIndex; // place of Element - return TRUE; + return sal_True; } nLoop++; lTry++; - nIndex = (USHORT)(nIndex + nHash + 7) % nMax; + nIndex = (sal_uInt16)(nIndex + nHash + 7) % nMax; } if( bInsert ) @@ -124,10 +124,10 @@ BOOL SvHashTable::Test_Insert( const void * pElement, BOOL bInsert, { nFill++; *pInsertPos = nIndex; // return free place - return TRUE; + return sal_True; } } - return( FALSE ); + return( sal_False ); } /************************************************************************/ @@ -138,7 +138,7 @@ BOOL SvHashTable::Test_Insert( const void * pElement, BOOL bInsert, |* Beschreibung |* *************************************************************************/ -SvStringHashTable::SvStringHashTable( UINT32 nMaxEntries ) +SvStringHashTable::SvStringHashTable( sal_uInt32 nMaxEntries ) : SvHashTable( nMaxEntries ) { pEntries = new SvStringHashEntry[ nMaxEntries ]; @@ -177,7 +177,7 @@ SvStringHashTable::~SvStringHashTable() #ifdef MPW // der MPW-Compiler ruft sonst keine Dtoren! - for ( USHORT n = 0; n < GetMax(); ++n ) + for ( sal_uInt16 n = 0; n < GetMax(); ++n ) (pEntries+n)->SvStringHashEntry::~SvStringHashEntry(); delete (void*) pEntries; #else @@ -192,18 +192,18 @@ SvStringHashTable::~SvStringHashTable() |* Beschreibung |* *************************************************************************/ -UINT32 SvStringHashTable::HashFunc( const void * pElement ) const +sal_uInt32 SvStringHashTable::HashFunc( const void * pElement ) const { - UINT32 nHash = 0; // hash value + sal_uInt32 nHash = 0; // hash value const char * pStr = ((const ByteString * )pElement)->GetBuffer(); int nShift = 0; while( *pStr ) { if( isupper( *pStr ) ) - nHash ^= UINT32(*pStr - 'A' + 26) << nShift; + nHash ^= sal_uInt32(*pStr - 'A' + 26) << nShift; else - nHash ^= UINT32(*pStr - 'a') << nShift; + nHash ^= sal_uInt32(*pStr - 'a') << nShift; if( nShift == 28 ) nShift = 0; else @@ -222,7 +222,7 @@ UINT32 SvStringHashTable::HashFunc( const void * pElement ) const *************************************************************************/ ByteString SvStringHashTable::GetNearString( const ByteString & rName ) const { - for( UINT32 i = 0; i < GetMax(); i++ ) + for( sal_uInt32 i = 0; i < GetMax(); i++ ) { SvStringHashEntry * pE = Get( i ); if( pE ) @@ -241,10 +241,10 @@ ByteString SvStringHashTable::GetNearString( const ByteString & rName ) const |* Beschreibung |* *************************************************************************/ -BOOL SvStringHashTable::IsEntry( UINT32 nIndex ) const +sal_Bool SvStringHashTable::IsEntry( sal_uInt32 nIndex ) const { if( nIndex >= GetMax() ) - return FALSE; + return sal_False; return pEntries[ nIndex ].HasId(); } @@ -255,18 +255,18 @@ BOOL SvStringHashTable::IsEntry( UINT32 nIndex ) const |* Beschreibung |* *************************************************************************/ -BOOL SvStringHashTable::Insert( const ByteString & rName, UINT32 * pIndex ) +sal_Bool SvStringHashTable::Insert( const ByteString & rName, sal_uInt32 * pIndex ) { - UINT32 nIndex; + sal_uInt32 nIndex; if( !pIndex ) pIndex = &nIndex; - if( !SvHashTable::Test_Insert( &rName, TRUE, pIndex ) ) - return FALSE; + if( !SvHashTable::Test_Insert( &rName, sal_True, pIndex ) ) + return sal_False; if( !IsEntry( *pIndex ) ) pEntries[ *pIndex ] = SvStringHashEntry( rName, *pIndex ); - return TRUE; + return sal_True; } /************************************************************************* @@ -276,10 +276,10 @@ BOOL SvStringHashTable::Insert( const ByteString & rName, UINT32 * pIndex ) |* Beschreibung |* *************************************************************************/ -BOOL SvStringHashTable::Test( const ByteString & rName, UINT32 * pPos ) const +sal_Bool SvStringHashTable::Test( const ByteString & rName, sal_uInt32 * pPos ) const { return ((SvStringHashTable *)this)->SvHashTable:: - Test_Insert( &rName, FALSE, pPos ); + Test_Insert( &rName, sal_False, pPos ); } /************************************************************************* @@ -289,7 +289,7 @@ BOOL SvStringHashTable::Test( const ByteString & rName, UINT32 * pPos ) const |* Beschreibung |* *************************************************************************/ -SvStringHashEntry * SvStringHashTable::Get( UINT32 nIndex ) const +SvStringHashEntry * SvStringHashTable::Get( sal_uInt32 nIndex ) const { if( IsEntry( nIndex ) ) return pEntries + nIndex; @@ -304,7 +304,7 @@ SvStringHashEntry * SvStringHashTable::Get( UINT32 nIndex ) const |* *************************************************************************/ StringCompare SvStringHashTable::Compare( const void * pElement, - UINT32 nIndex ) const + sal_uInt32 nIndex ) const { return ((const ByteString *)pElement)->CompareTo( pEntries[ nIndex ].GetName() ); } @@ -318,7 +318,7 @@ StringCompare SvStringHashTable::Compare( const void * pElement, *************************************************************************/ void SvStringHashTable::FillHashList( SvStringHashList * pList ) const { - for( UINT32 n = 0; n < GetMax(); n++ ) + for( sal_uInt32 n = 0; n < GetMax(); n++ ) { if( IsEntry( n ) ) pList->Insert( Get( n ), LIST_APPEND ); diff --git a/idl/source/cmptools/lex.cxx b/idl/source/cmptools/lex.cxx index 579c81a5ec16..24991489841c 100644..100755 --- a/idl/source/cmptools/lex.cxx +++ b/idl/source/cmptools/lex.cxx @@ -274,7 +274,7 @@ int SvTokenStream::GetNextChar() return '\0'; } } - nChar = aBufStr.GetChar( (USHORT)nBufPos++ ); + nChar = aBufStr.GetChar( (sal_uInt16)nBufPos++ ); nColumn += nChar == '\t' ? nTabSize : 1; return nChar; } @@ -284,9 +284,9 @@ int SvTokenStream::GetNextChar() |* |* Beschreibung *************************************************************************/ -ULONG SvTokenStream::GetNumber() +sal_uLong SvTokenStream::GetNumber() { - ULONG l = 0; + sal_uLong l = 0; short nLog = 10; if( '0' == c ) @@ -327,10 +327,10 @@ ULONG SvTokenStream::GetNumber() |* |* Beschreibung *************************************************************************/ -BOOL SvTokenStream::MakeToken( SvToken & rToken ) +sal_Bool SvTokenStream::MakeToken( SvToken & rToken ) { int c1; - USHORT i; + sal_uInt16 i; do { @@ -345,8 +345,8 @@ BOOL SvTokenStream::MakeToken( SvToken & rToken ) } while( 0 == c && !IsEof() && ( SVSTREAM_OK == rInStream.GetError() ) ); - ULONG nLastLine = nLine; - ULONG nLastColumn = nColumn; + sal_uLong nLastLine = nLine; + sal_uLong nLastColumn = nColumn; // Kommentar if( '/' == c ) { @@ -378,7 +378,7 @@ BOOL SvTokenStream::MakeToken( SvToken & rToken ) { c = GetNextChar(); if( IsEof() ) - return FALSE; + return sal_False; } else c = GetFastNextChar(); @@ -388,7 +388,7 @@ BOOL SvTokenStream::MakeToken( SvToken & rToken ) } while( '/' != c && !IsEof() && ( SVSTREAM_OK == rInStream.GetError() ) ); if( IsEof() || ( SVSTREAM_OK != rInStream.GetError() ) ) - return FALSE; + return sal_False; //aComment += (char)c; c = GetNextChar(); rToken.nType = SVTOKEN_COMMENT; @@ -405,7 +405,7 @@ BOOL SvTokenStream::MakeToken( SvToken & rToken ) { ByteString aStr; i = 0; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; while( !bDone && !IsEof() && c ) { c = GetFastNextChar(); @@ -415,7 +415,7 @@ BOOL SvTokenStream::MakeToken( SvToken & rToken ) aStr += '\n'; c = GetNextChar(); if( IsEof() ) - return FALSE; + return sal_False; } if( c == '"' ) { @@ -426,7 +426,7 @@ BOOL SvTokenStream::MakeToken( SvToken & rToken ) aStr += '"'; } else - bDone = TRUE; + bDone = sal_True; } else if( c == '\\' ) { @@ -439,7 +439,7 @@ BOOL SvTokenStream::MakeToken( SvToken & rToken ) aStr += (char)c; } if( IsEof() || ( SVSTREAM_OK != rInStream.GetError() ) ) - return FALSE; + return sal_False; char * pStr = (char *)aStr.GetBuffer(); while( *pStr ) { @@ -467,16 +467,16 @@ BOOL SvTokenStream::MakeToken( SvToken & rToken ) if( aStr.EqualsIgnoreCaseAscii( aStrTrue ) ) { rToken.nType = SVTOKEN_BOOL; - rToken.bBool = TRUE; + rToken.bBool = sal_True; } else if( aStr.EqualsIgnoreCaseAscii( aStrFalse ) ) { rToken.nType = SVTOKEN_BOOL; - rToken.bBool = FALSE; + rToken.bBool = sal_False; } else { - UINT32 nHashId; + sal_uInt32 nHashId; if( IDLAPP->pHashTable->Test( aStr, &nHashId ) ) rToken.SetHash( IDLAPP->pHashTable->Get( nHashId ) ); else diff --git a/idl/source/objects/basobj.cxx b/idl/source/objects/basobj.cxx index b5a63285dc1c..09b9a317e07a 100644..100755 --- a/idl/source/objects/basobj.cxx +++ b/idl/source/objects/basobj.cxx @@ -64,7 +64,7 @@ void SvMetaObject::Save( SvPersistStream & ) |* Beschreibung *************************************************************************/ #ifdef IDL_COMPILER -void SvMetaObject::WriteTab( SvStream & rOutStm, USHORT nTab ) +void SvMetaObject::WriteTab( SvStream & rOutStm, sal_uInt16 nTab ) { while( nTab-- ) rOutStm << " "; @@ -89,18 +89,18 @@ void SvMetaObject::WriteStars( SvStream & rOutStm ) |* |* Beschreibung *************************************************************************/ -BOOL SvMetaObject::TestAndSeekSpaceOnly( SvStream & rOutStm, ULONG nBegPos ) +sal_Bool SvMetaObject::TestAndSeekSpaceOnly( SvStream & rOutStm, sal_uLong nBegPos ) { // keine leeren Klammern schreiben - ULONG nPos = rOutStm.Tell(); + sal_uLong nPos = rOutStm.Tell(); rOutStm.Seek( nBegPos ); - BOOL bOnlySpace = TRUE; + sal_Bool bOnlySpace = sal_True; while( bOnlySpace && rOutStm.Tell() < nPos ) { char c; rOutStm >> c; if( !isspace( c ) ) - bOnlySpace = FALSE; + bOnlySpace = sal_False; } if( bOnlySpace ) // nichts geschrieben @@ -118,7 +118,7 @@ BOOL SvMetaObject::TestAndSeekSpaceOnly( SvStream & rOutStm, ULONG nBegPos ) void SvMetaObject::Back2Delemitter( SvStream & rOutStm ) { // keine leeren Klammern schreiben - ULONG nPos = rOutStm.Tell(); + sal_uLong nPos = rOutStm.Tell(); rOutStm.SeekRel( -1 ); char c = 0; rOutStm >> c; @@ -140,9 +140,9 @@ void SvMetaObject::Back2Delemitter( SvStream & rOutStm ) |* |* Beschreibung *************************************************************************/ -BOOL SvMetaObject::ReadSvIdl( SvIdlDataBase &, SvTokenStream & ) +sal_Bool SvMetaObject::ReadSvIdl( SvIdlDataBase &, SvTokenStream & ) { - return FALSE; + return sal_False; } /************************************************************************* @@ -150,7 +150,7 @@ BOOL SvMetaObject::ReadSvIdl( SvIdlDataBase &, SvTokenStream & ) |* |* Beschreibung *************************************************************************/ -void SvMetaObject::WriteSvIdl( SvIdlDataBase &, SvStream &, USHORT /*nTab */ ) +void SvMetaObject::WriteSvIdl( SvIdlDataBase &, SvStream &, sal_uInt16 /*nTab */ ) { } @@ -159,7 +159,7 @@ void SvMetaObject::WriteSvIdl( SvIdlDataBase &, SvStream &, USHORT /*nTab */ ) |* |* Beschreibung *************************************************************************/ -void SvMetaObject::Write( SvIdlDataBase &, SvStream &, USHORT /*nTab */, +void SvMetaObject::Write( SvIdlDataBase &, SvStream &, sal_uInt16 /*nTab */, WriteType, WriteAttribute ) { } @@ -169,7 +169,7 @@ void SvMetaObject::Write( SvIdlDataBase &, SvStream &, USHORT /*nTab */, |* |* Beschreibung *************************************************************************/ -void SvMetaObject::WriteCxx( SvIdlDataBase &, SvStream &, USHORT /*nTab */ ) +void SvMetaObject::WriteCxx( SvIdlDataBase &, SvStream &, sal_uInt16 /*nTab */ ) { } @@ -178,7 +178,7 @@ void SvMetaObject::WriteCxx( SvIdlDataBase &, SvStream &, USHORT /*nTab */ ) |* |* Beschreibung *************************************************************************/ -void SvMetaObject::WriteHxx( SvIdlDataBase &, SvStream &, USHORT /*nTab */ ) +void SvMetaObject::WriteHxx( SvIdlDataBase &, SvStream &, sal_uInt16 /*nTab */ ) { } @@ -198,7 +198,7 @@ SvMetaName::SvMetaName() void SvMetaName::Load( SvPersistStream & rStm ) { SvMetaObject::Load( rStm ); - BYTE nMask; + sal_uInt8 nMask; rStm >> nMask; if( nMask >= 0x20 ) @@ -217,7 +217,7 @@ void SvMetaName::Load( SvPersistStream & rStm ) void SvMetaName::Save( SvPersistStream & rStm ) { SvMetaObject::Save( rStm ); - BYTE nMask = 0; + sal_uInt8 nMask = 0; if( aName.IsSet() ) nMask |= 0x01; if( aHelpContext.IsSet() ) nMask |= 0x02; if( aHelpText.IsSet() ) nMask |= 0x04; @@ -237,10 +237,10 @@ void SvMetaName::Save( SvPersistStream & rStm ) |* |* Beschreibung *************************************************************************/ -BOOL SvMetaName::SetName( const ByteString & rName, SvIdlDataBase * ) +sal_Bool SvMetaName::SetName( const ByteString & rName, SvIdlDataBase * ) { aName = rName; - return TRUE; + return sal_True; } #ifdef IDL_COMPILER @@ -249,19 +249,19 @@ BOOL SvMetaName::SetName( const ByteString & rName, SvIdlDataBase * ) |* |* Beschreibung *************************************************************************/ -BOOL SvMetaName::ReadNameSvIdl( SvIdlDataBase & rBase, +sal_Bool SvMetaName::ReadNameSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { - UINT32 nTokPos = rInStm.Tell(); + sal_uInt32 nTokPos = rInStm.Tell(); SvToken * pTok = rInStm.GetToken_Next(); // Modulnamen lesen if( pTok->IsIdentifier() ) if( SetName( pTok->GetString(), &rBase ) ) - return TRUE; + return sal_True; rInStm.Seek( nTokPos ); - return FALSE; + return sal_False; } /************************************************************************* @@ -272,7 +272,7 @@ BOOL SvMetaName::ReadNameSvIdl( SvIdlDataBase & rBase, void SvMetaName::ReadAttributesSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { - UINT32 nTokPos = rInStm.Tell(); + sal_uInt32 nTokPos = rInStm.Tell(); if( aName.ReadSvIdl( SvHash_Name(), rInStm ) ) { if( !SetName( aName, &rBase ) ) @@ -296,7 +296,7 @@ void SvMetaName::ReadAttributesSvIdl( SvIdlDataBase & rBase, void SvMetaName::DoReadContextSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm, char cDel ) { - UINT32 nBeginPos = 0; // kann mit Tell nicht vorkommen + sal_uInt32 nBeginPos = 0; // kann mit Tell nicht vorkommen while( nBeginPos != rInStm.Tell() ) { nBeginPos = rInStm.Tell(); @@ -322,9 +322,9 @@ void SvMetaName::ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & ) |* |* Beschreibung *************************************************************************/ -BOOL SvMetaName::Test( SvIdlDataBase &, SvTokenStream & ) +sal_Bool SvMetaName::Test( SvIdlDataBase &, SvTokenStream & ) { - return TRUE; + return sal_True; } /************************************************************************* @@ -332,7 +332,7 @@ BOOL SvMetaName::Test( SvIdlDataBase &, SvTokenStream & ) |* |* Beschreibung *************************************************************************/ -void SvMetaName::WriteContextSvIdl( SvIdlDataBase &, SvStream &, USHORT ) +void SvMetaName::WriteContextSvIdl( SvIdlDataBase &, SvStream &, sal_uInt16 ) { } @@ -346,7 +346,7 @@ void SvMetaName::WriteDescription( SvStream & rOutStm ) rOutStm << "<DESCRIPTION>" << endl; ByteString aDesc( GetDescription() ); - USHORT nPos = aDesc.Search( '\n' ); + sal_uInt16 nPos = aDesc.Search( '\n' ); while ( nPos != STRING_NOTFOUND ) { rOutStm << aDesc.Copy( 0, nPos ).GetBuffer() << endl; @@ -364,7 +364,7 @@ void SvMetaName::WriteDescription( SvStream & rOutStm ) *************************************************************************/ void SvMetaName::WriteAttributesSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab ) + sal_uInt16 nTab ) { if( aHelpContext.IsSet() || aHelpText.IsSet() || aConfigName.IsSet() ) { @@ -396,13 +396,13 @@ void SvMetaName::WriteAttributesSvIdl( SvIdlDataBase & rBase, |* |* Beschreibung *************************************************************************/ -BOOL SvMetaName::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) +sal_Bool SvMetaName::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { - UINT32 nTokPos = rInStm.Tell(); - BOOL bOk = TRUE; + sal_uInt32 nTokPos = rInStm.Tell(); + sal_Bool bOk = sal_True; if( rInStm.Read( '[' ) ) { - UINT32 nBeginPos = 0; // kann mit Tell nicht vorkommen + sal_uInt32 nBeginPos = 0; // kann mit Tell nicht vorkommen while( nBeginPos != rInStm.Tell() ) { nBeginPos = rInStm.Tell(); @@ -432,12 +432,12 @@ BOOL SvMetaName::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) |* Beschreibung *************************************************************************/ void SvMetaName::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab ) + sal_uInt16 nTab ) { - ULONG nBeginPos = rOutStm.Tell(); + sal_uLong nBeginPos = rOutStm.Tell(); WriteTab( rOutStm, nTab ); rOutStm << '[' << endl; - ULONG nOldPos = rOutStm.Tell(); + sal_uLong nOldPos = rOutStm.Tell(); WriteAttributesSvIdl( rBase, rOutStm, nTab +1 ); // keine leeren Klammern schreiben @@ -474,25 +474,25 @@ void SvMetaName::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, |* Beschreibung *************************************************************************/ void SvMetaName::Write( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab, + sal_uInt16 nTab, WriteType nT, WriteAttribute nA ) { - ULONG nBeginPos = rOutStm.Tell(); + sal_uLong nBeginPos = rOutStm.Tell(); WriteTab( rOutStm, nTab ); rOutStm << '[' << endl; - ULONG nOldPos = rOutStm.Tell(); + sal_uLong nOldPos = rOutStm.Tell(); WriteAttributes( rBase, rOutStm, nTab +1, nT, nA ); // keine leeren Klammern schreiben - ULONG nPos = rOutStm.Tell(); + sal_uLong nPos = rOutStm.Tell(); rOutStm.Seek( nOldPos ); - BOOL bOnlySpace = TRUE; + sal_Bool bOnlySpace = sal_True; while( bOnlySpace && rOutStm.Tell() < nPos ) { char c; rOutStm >> c; if( !isspace( c ) ) - bOnlySpace = FALSE; + bOnlySpace = sal_False; } if( bOnlySpace ) // nichts geschrieben @@ -511,7 +511,7 @@ void SvMetaName::Write( SvIdlDataBase & rBase, SvStream & rOutStm, |* Beschreibung *************************************************************************/ void SvMetaName::WriteAttributes( SvIdlDataBase &, SvStream & rOutStm, - USHORT nTab, + sal_uInt16 nTab, WriteType, WriteAttribute ) { if( GetHelpText().IsSet() || GetHelpContext().IsSet() ) @@ -540,7 +540,7 @@ void SvMetaName::WriteAttributes( SvIdlDataBase &, SvStream & rOutStm, |* Beschreibung *************************************************************************/ void SvMetaName::WriteContext( SvIdlDataBase &, SvStream &, - USHORT, + sal_uInt16, WriteType, WriteAttribute ) { } @@ -562,7 +562,7 @@ void SvMetaReference::Load( SvPersistStream & rStm ) { SvMetaName::Load( rStm ); - BYTE nMask; + sal_uInt8 nMask; rStm >> nMask; if( nMask >= 0x2 ) { @@ -583,7 +583,7 @@ void SvMetaReference::Save( SvPersistStream & rStm ) SvMetaName::Save( rStm ); // Maske erstellen - BYTE nMask = 0; + sal_uInt8 nMask = 0; if( aRef.Is() ) nMask |= 0x01; @@ -603,8 +603,8 @@ SV_IMPL_META_FACTORY1( SvMetaExtern, SvMetaReference ); *************************************************************************/ SvMetaExtern::SvMetaExtern() : pModule( NULL ) - , bReadUUId( FALSE ) - , bReadVersion( FALSE ) + , bReadUUId( sal_False ) + , bReadVersion( sal_False ) { } @@ -612,7 +612,7 @@ void SvMetaExtern::Load( SvPersistStream & rStm ) { SvMetaReference::Load( rStm ); - BYTE nMask; + sal_uInt8 nMask; rStm >> nMask; if( nMask >= 0x20 ) { @@ -623,8 +623,8 @@ void SvMetaExtern::Load( SvPersistStream & rStm ) if( nMask & 0x01 ) rStm >> pModule; if( nMask & 0x02 ) rStm >> aUUId; if( nMask & 0x04 ) rStm >> aVersion; - if( nMask & 0x08 ) bReadUUId = TRUE; - if( nMask & 0x10 ) bReadVersion = TRUE; + if( nMask & 0x08 ) bReadUUId = sal_True; + if( nMask & 0x10 ) bReadVersion = sal_True; } void SvMetaExtern::Save( SvPersistStream & rStm ) @@ -632,7 +632,7 @@ void SvMetaExtern::Save( SvPersistStream & rStm ) SvMetaReference::Save( rStm ); // Maske erstellen - BYTE nMask = 0; + sal_uInt8 nMask = 0; if( pModule ) nMask |= 0x01; if( aUUId != SvGlobalName() ) nMask |= 0x02; if( aVersion != SvVersion() ) nMask |= 0x04; @@ -692,9 +692,9 @@ void SvMetaExtern::ReadAttributesSvIdl( SvIdlDataBase & rBase, { SvMetaReference::ReadAttributesSvIdl( rBase, rInStm ); if( aUUId.ReadSvIdl( rBase, rInStm ) ) - bReadUUId = TRUE; + bReadUUId = sal_True; if( aVersion.ReadSvIdl( rInStm ) ) - bReadVersion = TRUE; + bReadVersion = sal_True; } /************************************************************************* @@ -703,7 +703,7 @@ void SvMetaExtern::ReadAttributesSvIdl( SvIdlDataBase & rBase, |* Beschreibung *************************************************************************/ void SvMetaExtern::WriteAttributesSvIdl( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab ) + SvStream & rOutStm, sal_uInt16 nTab ) { SvMetaReference::WriteAttributesSvIdl( rBase, rOutStm, nTab ); if( bReadUUId || bReadVersion ) @@ -731,7 +731,7 @@ void SvMetaExtern::WriteAttributesSvIdl( SvIdlDataBase & rBase, |* |* Beschreibung *************************************************************************/ -BOOL SvMetaExtern::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) +sal_Bool SvMetaExtern::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { SetModule( rBase ); GetUUId(); // Id wird angelegt @@ -744,7 +744,7 @@ BOOL SvMetaExtern::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) |* Beschreibung *************************************************************************/ void SvMetaExtern::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab ) + sal_uInt16 nTab ) { SvMetaReference::WriteSvIdl( rBase, rOutStm, nTab ); } @@ -755,7 +755,7 @@ void SvMetaExtern::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, |* Beschreibung *************************************************************************/ void SvMetaExtern::Write( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab, + sal_uInt16 nTab, WriteType nT, WriteAttribute nA ) { SvMetaReference::Write( rBase, rOutStm, nTab, nT, nA ); @@ -767,7 +767,7 @@ void SvMetaExtern::Write( SvIdlDataBase & rBase, SvStream & rOutStm, |* Beschreibung *************************************************************************/ void SvMetaExtern::WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab, + sal_uInt16 nTab, WriteType nT, WriteAttribute nA ) { SvMetaReference::WriteAttributes( rBase, rOutStm, nTab, nT, nA ); diff --git a/idl/source/objects/bastype.cxx b/idl/source/objects/bastype.cxx index ac046dfdaa8a..19df1c0967b2 100644..100755 --- a/idl/source/objects/bastype.cxx +++ b/idl/source/objects/bastype.cxx @@ -40,34 +40,34 @@ #ifdef IDL_COMPILER /************************************************************************/ -static BOOL ReadRangeSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm, - ULONG nMin, ULONG nMax, ULONG* pValue ) +static sal_Bool ReadRangeSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm, + sal_uLong nMin, sal_uLong nMax, sal_uLong* pValue ) { - UINT32 nTokPos = rInStm.Tell(); + sal_uInt32 nTokPos = rInStm.Tell(); SvToken * pTok = rInStm.GetToken_Next(); if( pTok->Is( pName ) ) { - BOOL bOk = FALSE; + sal_Bool bOk = sal_False; if( rInStm.Read( '=' ) ) { pTok = rInStm.GetToken_Next(); if( pTok->IsInteger() ) { - ULONG n = pTok->GetNumber(); + sal_uLong n = pTok->GetNumber(); if ( n >= nMin && n <= nMax ) { *pValue = n; - bOk = TRUE; + bOk = sal_True; } } } if( bOk ) - return TRUE; + return sal_True; } rInStm.Seek( nTokPos ); - return FALSE; + return sal_False; } #endif @@ -81,12 +81,12 @@ static BOOL ReadRangeSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm, |* Letzte Aenderung MM 12.12.94 |* *************************************************************************/ -UINT32 SvUINT32::Read( SvStream & rStm ) +sal_uInt32 SvUINT32::Read( SvStream & rStm ) { return SvPersistStream::ReadCompressed( rStm ); } -void SvUINT32::Write( SvStream & rStm, UINT32 nVal ) +void SvUINT32::Write( SvStream & rStm, sal_uInt32 nVal ) { SvPersistStream::WriteCompressed( rStm, nVal ); } @@ -103,7 +103,7 @@ void SvUINT32::Write( SvStream & rStm, UINT32 nVal ) *************************************************************************/ SvStream& operator << (SvStream & rStm, const SvBOOL & rb ) { - BYTE n = rb.nVal; + sal_uInt8 n = rb.nVal; if( rb.bSet ) n |= 0x02; rStm << n; @@ -111,10 +111,10 @@ SvStream& operator << (SvStream & rStm, const SvBOOL & rb ) } SvStream& operator >> (SvStream & rStm, SvBOOL & rb ) { - BYTE n; + sal_uInt8 n; rStm >> n; - rb.nVal = (n & 0x01) ? TRUE : FALSE; - rb.bSet = (n & 0x02) ? TRUE : FALSE; + rb.nVal = (n & 0x01) ? sal_True : sal_False; + rb.bSet = (n & 0x02) ? sal_True : sal_False; if( n & ~0x03 ) { rStm.SetError( SVSTREAM_FILEFORMAT_ERROR ); @@ -143,11 +143,11 @@ SvStream& operator << (SvStream & rStm, const SvVersion & r ) int n = r.GetMajorVersion() << 4; n |= r.GetMinorVersion(); - rStm << (BYTE)n; + rStm << (sal_uInt8)n; } else { - rStm << (BYTE)0; + rStm << (sal_uInt8)0; rStm << r.GetMajorVersion(); rStm << r.GetMinorVersion(); } @@ -156,7 +156,7 @@ SvStream& operator << (SvStream & rStm, const SvVersion & r ) SvStream& operator >> (SvStream & rStm, SvVersion & r ) { - BYTE n; + sal_uInt8 n; rStm >> n; if( n == 0 ) { // nicht komprimiert @@ -184,15 +184,15 @@ SvStream& operator >> (SvStream & rStm, SvVersion & r ) |* Letzte Aenderung MM 12.12.94 |* *************************************************************************/ -BOOL SvBOOL::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ) +sal_Bool SvBOOL::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ) { - UINT32 nTokPos = rInStm.Tell(); + sal_uInt32 nTokPos = rInStm.Tell(); SvToken * pTok = rInStm.GetToken_Next(); if( pTok->Is( pName ) ) { - BOOL bOk = TRUE; - BOOL bBraket = rInStm.Read( '(' ); + sal_Bool bOk = sal_True; + sal_Bool bBraket = rInStm.Read( '(' ); if( bBraket || rInStm.Read( '=' ) ) { pTok = rInStm.GetToken(); @@ -206,12 +206,12 @@ BOOL SvBOOL::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ) bOk = rInStm.Read( ')' ); } else - *this = TRUE; //Defaultaktion ist auf TRUE setzen + *this = sal_True; //Defaultaktion ist auf sal_True setzen if( bOk ) - return TRUE; + return sal_True; } rInStm.Seek( nTokPos ); - return FALSE; + return sal_False; } /************************************************************************* @@ -221,13 +221,13 @@ BOOL SvBOOL::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ) |* Beschreibung |* *************************************************************************/ -BOOL SvBOOL::WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm ) +sal_Bool SvBOOL::WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm ) { if( nVal ) rOutStm << pName->GetName().GetBuffer(); else rOutStm << pName->GetName().GetBuffer() << "(FALSE)"; - return TRUE; + return sal_True; } /************************************************************************* @@ -258,15 +258,15 @@ ByteString SvBOOL::GetSvIdlString( SvStringHashEntry * pName ) |* Beschreibung |* *************************************************************************/ -BOOL SvIdentifier::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ) +sal_Bool SvIdentifier::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ) { - UINT32 nTokPos = rInStm.Tell(); + sal_uInt32 nTokPos = rInStm.Tell(); SvToken * pTok = rInStm.GetToken_Next(); if( pTok->Is( pName ) ) { - BOOL bOk = TRUE; - BOOL bBraket = rInStm.Read( '(' ); + sal_Bool bOk = sal_True; + sal_Bool bBraket = rInStm.Read( '(' ); if( bBraket || rInStm.Read( '=' ) ) { pTok = rInStm.GetToken(); @@ -279,10 +279,10 @@ BOOL SvIdentifier::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm bOk = rInStm.Read( ')' ); } if( bOk ) - return TRUE; + return sal_True; } rInStm.Seek( nTokPos ); - return FALSE; + return sal_False; } /************************************************************************* @@ -292,13 +292,13 @@ BOOL SvIdentifier::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm |* Beschreibung |* *************************************************************************/ -BOOL SvIdentifier::WriteSvIdl( SvStringHashEntry * pName, +sal_Bool SvIdentifier::WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm, - USHORT /*nTab */ ) + sal_uInt16 /*nTab */ ) { rOutStm << pName->GetName().GetBuffer() << '('; rOutStm << GetBuffer() << ')'; - return TRUE; + return sal_True; } SvStream& operator << (SvStream & rStm, const SvIdentifier & r ) @@ -322,17 +322,17 @@ SvStream& operator >> (SvStream & rStm, SvIdentifier & r ) |* Beschreibung |* *************************************************************************/ -BOOL SvNumberIdentifier::ReadSvIdl( SvIdlDataBase & rBase, +sal_Bool SvNumberIdentifier::ReadSvIdl( SvIdlDataBase & rBase, SvStringHashEntry * pName, SvTokenStream & rInStm ) { if( SvIdentifier::ReadSvIdl( pName, rInStm ) ) { - ULONG n; + sal_uLong n; if( rBase.FindId( *this, &n ) ) { nValue = n; - return TRUE; + return sal_True; } else { @@ -343,7 +343,7 @@ BOOL SvNumberIdentifier::ReadSvIdl( SvIdlDataBase & rBase, rBase.WriteError( rInStm ); } } - return FALSE; + return sal_False; } /************************************************************************* @@ -353,20 +353,20 @@ BOOL SvNumberIdentifier::ReadSvIdl( SvIdlDataBase & rBase, |* Beschreibung |* *************************************************************************/ -BOOL SvNumberIdentifier::ReadSvIdl( SvIdlDataBase & rBase, +sal_Bool SvNumberIdentifier::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { - UINT32 nTokPos = rInStm.Tell(); + sal_uInt32 nTokPos = rInStm.Tell(); SvToken * pTok = rInStm.GetToken_Next(); if( pTok->IsIdentifier() ) { - ULONG n; + sal_uLong n; if( rBase.FindId( pTok->GetString(), &n ) ) { *(ByteString *)this = pTok->GetString(); nValue = n; - return TRUE; + return sal_True; } else { @@ -378,7 +378,7 @@ BOOL SvNumberIdentifier::ReadSvIdl( SvIdlDataBase & rBase, } } rInStm.Seek( nTokPos ); - return FALSE; + return sal_False; } /************************************************************************* @@ -416,15 +416,15 @@ SvStream& operator >> (SvStream & rStm, SvNumberIdentifier & r ) |* Letzte Aenderung MM 12.12.94 |* *************************************************************************/ -BOOL SvString::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ) +sal_Bool SvString::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ) { - UINT32 nTokPos = rInStm.Tell(); + sal_uInt32 nTokPos = rInStm.Tell(); SvToken * pTok = rInStm.GetToken_Next(); if( pTok->Is( pName ) ) { - BOOL bOk = TRUE; - BOOL bBraket = rInStm.Read( '(' ); + sal_Bool bOk = sal_True; + sal_Bool bBraket = rInStm.Read( '(' ); if( bBraket || rInStm.Read( '=' ) ) { pTok = rInStm.GetToken(); @@ -437,10 +437,10 @@ BOOL SvString::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ) bOk = rInStm.Read( ')' ); } if( bOk ) - return TRUE; + return sal_True; } rInStm.Seek( nTokPos ); - return FALSE; + return sal_False; } /************************************************************************* @@ -452,12 +452,12 @@ BOOL SvString::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ) |* Letzte Aenderung MM 12.12.94 |* *************************************************************************/ -BOOL SvString::WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm, - USHORT /*nTab */ ) +sal_Bool SvString::WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm, + sal_uInt16 /*nTab */ ) { rOutStm << pName->GetName().GetBuffer() << "(\""; rOutStm << GetBuffer() << "\")"; - return TRUE; + return sal_True; } SvStream& operator << (SvStream & rStm, const SvString & r ) @@ -482,7 +482,7 @@ SvStream& operator >> (SvStream & rStm, SvString & r ) |* Letzte Aenderung MM 12.12.94 |* *************************************************************************/ -BOOL SvHelpText::ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) +sal_Bool SvHelpText::ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) { return SvString::ReadSvIdl( SvHash_HelpText(), rInStm ); } @@ -496,7 +496,7 @@ BOOL SvHelpText::ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) |* Letzte Aenderung MM 12.12.94 |* *************************************************************************/ -BOOL SvHelpText::WriteSvIdl( SvIdlDataBase &, SvStream & rOutStm, USHORT nTab ) +sal_Bool SvHelpText::WriteSvIdl( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16 nTab ) { return SvString::WriteSvIdl( SvHash_HelpText(), rOutStm, nTab ); } @@ -511,15 +511,15 @@ BOOL SvHelpText::WriteSvIdl( SvIdlDataBase &, SvStream & rOutStm, USHORT nTab ) |* Letzte Aenderung MM 12.12.94 |* *************************************************************************/ -BOOL SvUUId::ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) +sal_Bool SvUUId::ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) { - UINT32 nTokPos = rInStm.Tell(); + sal_uInt32 nTokPos = rInStm.Tell(); SvToken * pTok = rInStm.GetToken_Next(); if( pTok->Is( SvHash_uuid() ) ) { - BOOL bOk = TRUE; - BOOL bBraket = rInStm.Read( '(' ); + sal_Bool bOk = sal_True; + sal_Bool bBraket = rInStm.Read( '(' ); if( bBraket || rInStm.Read( '=' ) ) { pTok = rInStm.GetToken(); @@ -532,10 +532,10 @@ BOOL SvUUId::ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) bOk = rInStm.Read( ')' ); } if( bOk ) - return TRUE; + return sal_True; } rInStm.Seek( nTokPos ); - return FALSE; + return sal_False; } /************************************************************************* @@ -547,12 +547,12 @@ BOOL SvUUId::ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) |* Letzte Aenderung MM 12.12.94 |* *************************************************************************/ -BOOL SvUUId::WriteSvIdl( SvStream & rOutStm ) +sal_Bool SvUUId::WriteSvIdl( SvStream & rOutStm ) { // Global Id schreiben rOutStm << SvHash_uuid()->GetName().GetBuffer() << "(\""; rOutStm << ByteString( GetHexName(), RTL_TEXTENCODING_UTF8 ).GetBuffer() << "\")"; - return TRUE; + return sal_True; } @@ -566,28 +566,28 @@ BOOL SvUUId::WriteSvIdl( SvStream & rOutStm ) |* Letzte Aenderung MM 12.12.94 |* *************************************************************************/ -BOOL SvVersion::ReadSvIdl( SvTokenStream & rInStm ) +sal_Bool SvVersion::ReadSvIdl( SvTokenStream & rInStm ) { - ULONG n = 0; + sal_uLong n = 0; - UINT32 nTokPos = rInStm.Tell(); + sal_uInt32 nTokPos = rInStm.Tell(); if( ReadRangeSvIdl( SvHash_Version(), rInStm, 0 , 0xFFFF, &n ) ) { - nMajorVersion = (USHORT)n; + nMajorVersion = (sal_uInt16)n; if( rInStm.Read( '.' ) ) { SvToken * pTok = rInStm.GetToken_Next(); if( pTok->IsInteger() && pTok->GetNumber() <= 0xFFFF ) { - nMinorVersion = (USHORT)pTok->GetNumber(); - return TRUE; + nMinorVersion = (sal_uInt16)pTok->GetNumber(); + return sal_True; } } else - return TRUE; + return sal_True; } rInStm.Seek( nTokPos ); - return FALSE; + return sal_False; } /************************************************************************* @@ -599,12 +599,12 @@ BOOL SvVersion::ReadSvIdl( SvTokenStream & rInStm ) |* Letzte Aenderung MM 12.12.94 |* *************************************************************************/ -BOOL SvVersion::WriteSvIdl( SvStream & rOutStm ) +sal_Bool SvVersion::WriteSvIdl( SvStream & rOutStm ) { rOutStm << SvHash_Version()->GetName().GetBuffer() << '(' << ByteString::CreateFromInt32( nMajorVersion ).GetBuffer() << '.' << ByteString::CreateFromInt32( nMinorVersion ).GetBuffer() << ')'; - return TRUE; + return sal_True; } #endif //IDL_COMPILER diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx index 3fb97326dd97..f8d68dabbbf6 100644..100755 --- a/idl/source/objects/module.cxx +++ b/idl/source/objects/module.cxx @@ -52,16 +52,16 @@ SV_IMPL_META_FACTORY1( SvMetaModule, SvMetaExtern ); *************************************************************************/ SvMetaModule::SvMetaModule() #ifdef IDL_COMPILER - : bImported( FALSE ) - , bIsModified( FALSE ) + : bImported( sal_False ) + , bIsModified( sal_False ) #endif { } #ifdef IDL_COMPILER -SvMetaModule::SvMetaModule( const String & rIdlFileName, BOOL bImp ) +SvMetaModule::SvMetaModule( const String & rIdlFileName, sal_Bool bImp ) : aIdlFileName( rIdlFileName ) - , bImported( bImp ), bIsModified( FALSE ) + , bImported( bImp ), bIsModified( sal_False ) { } #endif @@ -78,10 +78,10 @@ SvMetaModule::SvMetaModule( const String & rIdlFileName, BOOL bImp ) #define MODULE_VER 0x0001 void SvMetaModule::Load( SvPersistStream & rStm ) { - bImported = TRUE; // immer importiert + bImported = sal_True; // immer importiert SvMetaExtern::Load( rStm ); - USHORT nVer; + sal_uInt16 nVer; rStm >> nVer; // Version DBG_ASSERT( (nVer & ~IDL_WRITE_MASK) == MODULE_VER, "false version" ); @@ -96,7 +96,7 @@ void SvMetaModule::Load( SvPersistStream & rStm ) rStm.ReadByteString( aModulePrefix ); // Compiler Daten lesen - USHORT nCmpLen; + sal_uInt16 nCmpLen; rStm >> nCmpLen; #ifdef IDL_COMPILER DBG_ASSERT( (nVer & IDL_WRITE_MASK) == IDL_WRITE_COMPILER, @@ -122,7 +122,7 @@ void SvMetaModule::Save( SvPersistStream & rStm ) { SvMetaExtern::Save( rStm ); - rStm << (USHORT)(MODULE_VER | IDL_WRITE_COMPILER); // Version + rStm << (sal_uInt16)(MODULE_VER | IDL_WRITE_COMPILER); // Version rStm << aClassList; rStm << aTypeList; @@ -134,17 +134,17 @@ void SvMetaModule::Save( SvPersistStream & rStm ) rStm.WriteByteString( aModulePrefix ); // Compiler Daten schreiben - USHORT nCmpLen = 0; - ULONG nLenPos = rStm.Tell(); + sal_uInt16 nCmpLen = 0; + sal_uLong nLenPos = rStm.Tell(); rStm << nCmpLen; #ifdef IDL_COMPILER rStm << aBeginName; rStm << aEndName; rStm << aNextName; // Laenge der Compiler Daten schreiben - ULONG nPos = rStm.Tell(); + sal_uLong nPos = rStm.Tell(); rStm.Seek( nLenPos ); - rStm << (USHORT)( nPos - nLenPos - sizeof( USHORT ) ); + rStm << (sal_uInt16)( nPos - nLenPos - sizeof( sal_uInt16 ) ); rStm.Seek( nPos ); #endif } @@ -158,12 +158,12 @@ void SvMetaModule::Save( SvPersistStream & rStm ) |* Letzte Aenderung MM 12.12.94 |* *************************************************************************/ -BOOL SvMetaModule::SetName( const ByteString & rName, SvIdlDataBase * pBase ) +sal_Bool SvMetaModule::SetName( const ByteString & rName, SvIdlDataBase * pBase ) { if( pBase ) { if( pBase->GetModule( rName ) ) - return FALSE; + return sal_False; } return SvMetaExtern::SetName( rName ); } @@ -174,17 +174,17 @@ BOOL SvMetaModule::SetName( const ByteString & rName, SvIdlDataBase * pBase ) |* |* Beschreibung *************************************************************************/ -BOOL SvMetaModule::FillNextName( SvGlobalName * pName ) +sal_Bool SvMetaModule::FillNextName( SvGlobalName * pName ) { *pName = aNextName; if( aNextName < aEndName ) { ++aNextName; - bIsModified = TRUE; - return TRUE; + bIsModified = sal_True; + return sal_True; } - return FALSE; + return sal_False; } /************************************************************************* @@ -200,7 +200,7 @@ void SvMetaModule::ReadAttributesSvIdl( SvIdlDataBase & rBase, aHelpFileName.ReadSvIdl( SvHash_HelpFile(), rInStm ); if( aSlotIdFile.ReadSvIdl( SvHash_SlotIdFile(), rInStm ) ) { - UINT32 nTokPos = rInStm.Tell(); + sal_uInt32 nTokPos = rInStm.Tell(); if( !rBase.ReadIdFile( String::CreateFromAscii( aSlotIdFile.GetBuffer() ) ) ) { ByteString aStr = "cannot read file: "; @@ -222,7 +222,7 @@ void SvMetaModule::ReadAttributesSvIdl( SvIdlDataBase & rBase, *************************************************************************/ void SvMetaModule::WriteAttributesSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab ) + sal_uInt16 nTab ) { SvMetaExtern::WriteAttributesSvIdl( rBase, rOutStm, nTab ); if( aTypeLibFile.Len() || aSlotIdFile.Len() || aTypeLibFile.Len() ) @@ -256,7 +256,7 @@ void SvMetaModule::WriteAttributesSvIdl( SvIdlDataBase & rBase, void SvMetaModule::ReadContextSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { - UINT32 nTokPos = rInStm.Tell(); + sal_uInt32 nTokPos = rInStm.Tell(); if( rInStm.GetToken()->Is( SvHash_interface() ) || rInStm.GetToken()->Is( SvHash_shell() ) ) { @@ -296,7 +296,7 @@ void SvMetaModule::ReadContextSvIdl( SvIdlDataBase & rBase, } else if( rInStm.GetToken()->Is( SvHash_include() ) ) { - BOOL bOk = FALSE; + sal_Bool bOk = sal_False; rInStm.GetToken_Next(); SvToken * pTok = rInStm.GetToken_Next(); if( pTok->IsString() ) @@ -313,7 +313,7 @@ void SvMetaModule::ReadContextSvIdl( SvIdlDataBase & rBase, // Fehler zuruecksetzen rBase.SetError( SvIdlError() ); - UINT32 nBeginPos = 0xFFFFFFFF; // kann mit Tell nicht vorkommen + sal_uInt32 nBeginPos = 0xFFFFFFFF; // kann mit Tell nicht vorkommen while( nBeginPos != aTokStm.Tell() ) { nBeginPos = aTokStm.Tell(); @@ -369,10 +369,10 @@ void SvMetaModule::ReadContextSvIdl( SvIdlDataBase & rBase, *************************************************************************/ void SvMetaModule::WriteContextSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab ) + sal_uInt16 nTab ) { SvMetaExtern::WriteContextSvIdl( rBase, rOutStm, nTab ); - ULONG n; + sal_uLong n; for( n = 0; n < aTypeList.Count(); n++ ) { WriteTab( rOutStm, nTab ); @@ -399,13 +399,13 @@ void SvMetaModule::WriteContextSvIdl( SvIdlDataBase & rBase, |* Beschreibung |* *************************************************************************/ -BOOL SvMetaModule::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) +sal_Bool SvMetaModule::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { - bIsModified = TRUE; // bisher immer wenn Compiler laueft + bIsModified = sal_True; // bisher immer wenn Compiler laueft - UINT32 nTokPos = rInStm.Tell(); + sal_uInt32 nTokPos = rInStm.Tell(); SvToken * pTok = rInStm.GetToken_Next(); - BOOL bOk = FALSE; + sal_Bool bOk = sal_False; bOk = pTok->Is( SvHash_module() ); if( bOk ) { @@ -448,7 +448,7 @@ BOOL SvMetaModule::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) |* *************************************************************************/ void SvMetaModule::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab ) + sal_uInt16 nTab ) { rOutStm << SvHash_module()->GetName().GetBuffer() << endl << '\"'; @@ -464,7 +464,7 @@ void SvMetaModule::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, *************************************************************************/ void SvMetaModule::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) { - for( ULONG n = 0; n < aClassList.Count(); n++ ) + for( sal_uLong n = 0; n < aClassList.Count(); n++ ) { SvMetaClass * pClass = aClassList.GetObject( n ); pClass->WriteSfx( rBase, rOutStm ); @@ -474,7 +474,7 @@ void SvMetaModule::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) void SvMetaModule::WriteHelpIds( SvIdlDataBase & rBase, SvStream & rOutStm, Table* pTable ) { - for( ULONG n = 0; n < aClassList.Count(); n++ ) + for( sal_uLong n = 0; n < aClassList.Count(); n++ ) { SvMetaClass * pClass = aClassList.GetObject( n ); pClass->WriteHelpIds( rBase, rOutStm, pTable ); @@ -486,7 +486,7 @@ void SvMetaModule::WriteHelpIds( SvIdlDataBase & rBase, SvStream & rOutStm, *************************************************************************/ void SvMetaModule::WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab, + sal_uInt16 nTab, WriteType nT, WriteAttribute nA ) { SvMetaExtern::WriteAttributes( rBase, rOutStm, nTab, nT, nA ); @@ -506,7 +506,7 @@ void SvMetaModule::WriteAttributes( SvIdlDataBase & rBase, void SvMetaModule::WriteSbx( SvIdlDataBase & rBase, SvStream & rOutStm, SvNamePosList & rList ) { - for( ULONG n = 0; n < aClassList.Count(); n++ ) + for( sal_uLong n = 0; n < aClassList.Count(); n++ ) { SvMetaClass * pClass = aClassList.GetObject( n ); if( !pClass->IsShell() && pClass->GetAutomation() ) @@ -525,7 +525,7 @@ void SvMetaModule::WriteSbx( SvIdlDataBase & rBase, SvStream & rOutStm, |* SvMetaModule::Write() *************************************************************************/ void SvMetaModule::Write( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab, + sal_uInt16 nTab, WriteType nT, WriteAttribute nA ) { switch ( nT ) @@ -547,19 +547,19 @@ void SvMetaModule::Write( SvIdlDataBase & rBase, SvStream & rOutStm, rOutStm << "importlib(\"STDOLE.TLB\");" << endl; /* - for( ULONG n = 0; n < aTypeList.Count(); n++ ) + for( sal_uLong n = 0; n < aTypeList.Count(); n++ ) { SvMetaType * pType = aTypeList.GetObject( n ); if( !pType ->Write( rBase, rOutStm, nTab +1, nT, nA ) ) - return FALSE; + return sal_False; } */ /* - for( ULONG n = 0; n < rBase.GetModuleList().Count(); n++ ) + for( sal_uLong n = 0; n < rBase.GetModuleList().Count(); n++ ) { SvMetaModule * pModule = rBase.GetModuleList().GetObject( n ); const SvMetaTypeMemberList &rTypeList = pModule->GetTypeList(); - for( ULONG n = 0; n < rTypeList.Count(); n++ ) + for( sal_uLong n = 0; n < rTypeList.Count(); n++ ) { SvMetaType * pType = rTypeList.GetObject( n ); pType->Write( rBase, rOutStm, nTab +1, nT, nA ); @@ -567,7 +567,7 @@ void SvMetaModule::Write( SvIdlDataBase & rBase, SvStream & rOutStm, } */ - for( ULONG n = 0; n < aClassList.Count(); n++ ) + for( sal_uLong n = 0; n < aClassList.Count(); n++ ) { SvMetaClass * pClass = aClassList.GetObject( n ); if( !pClass->IsShell() && pClass->GetAutomation() ) @@ -591,7 +591,7 @@ void SvMetaModule::Write( SvIdlDataBase & rBase, SvStream & rOutStm, rOutStm << "</MODULE>" << endl << endl; rOutStm << "<CLASSES>" << endl; - for( ULONG n = 0; n < aClassList.Count(); n++ ) + for( sal_uLong n = 0; n < aClassList.Count(); n++ ) { SvMetaClass * pClass = aClassList.GetObject( n ); if( !pClass->IsShell() ) @@ -607,7 +607,7 @@ void SvMetaModule::Write( SvIdlDataBase & rBase, SvStream & rOutStm, { rOutStm << " ( "; - for( ULONG m=0; m<rClassList.Count(); m++ ) + for( sal_uLong m=0; m<rClassList.Count(); m++ ) { SvClassElement *pEle = rClassList.GetObject(m); SvMetaClass *pCl = pEle->GetClass(); @@ -629,7 +629,7 @@ void SvMetaModule::Write( SvIdlDataBase & rBase, SvStream & rOutStm, case WRITE_C_SOURCE: case WRITE_C_HEADER: { - for( ULONG n = 0; n < aClassList.Count(); n++ ) + for( sal_uLong n = 0; n < aClassList.Count(); n++ ) { SvMetaClass * pClass = aClassList.GetObject( n ); if( !pClass->IsShell() /* && pClass->GetAutomation() */ ) @@ -652,7 +652,7 @@ void SvMetaModule::WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm, // rOutStm << "#pragma CHARSET IBMPC" << endl; if( aSlotIdFile.Len() ) rOutStm << "//#include <" << aSlotIdFile.GetBuffer() << '>' << endl; - for( ULONG n = 0; n < aClassList.Count(); n++ ) + for( sal_uLong n = 0; n < aClassList.Count(); n++ ) { aClassList.GetObject( n )->WriteSrc( rBase, rOutStm, pTable ); } @@ -662,9 +662,9 @@ void SvMetaModule::WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm, |* SvMetaModule::WriteHxx() *************************************************************************/ void SvMetaModule::WriteHxx( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab ) + sal_uInt16 nTab ) { - for( ULONG n = 0; n < aClassList.Count(); n++ ) + for( sal_uLong n = 0; n < aClassList.Count(); n++ ) { SvMetaClass * pClass = aClassList.GetObject( n ); pClass->WriteHxx( rBase, rOutStm, nTab ); @@ -675,9 +675,9 @@ void SvMetaModule::WriteHxx( SvIdlDataBase & rBase, SvStream & rOutStm, |* SvMetaModule::WriteCxx() *************************************************************************/ void SvMetaModule::WriteCxx( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab ) + sal_uInt16 nTab ) { - for( ULONG n = 0; n < aClassList.Count(); n++ ) + for( sal_uLong n = 0; n < aClassList.Count(); n++ ) { SvMetaClass * pClass = aClassList.GetObject( n ); pClass->WriteCxx( rBase, rOutStm, nTab ); diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx index c6af0e0bb785..e9bddda61f9a 100644..100755 --- a/idl/source/objects/object.cxx +++ b/idl/source/objects/object.cxx @@ -57,7 +57,7 @@ SvClassElement::SvClassElement() *************************************************************************/ void SvClassElement::Load( SvPersistStream & rStm ) { - BYTE nMask; + sal_uInt8 nMask; rStm >> nMask; if( nMask >= 0x08 ) { @@ -83,7 +83,7 @@ void SvClassElement::Load( SvPersistStream & rStm ) void SvClassElement::Save( SvPersistStream & rStm ) { // Maske erstellen - BYTE nMask = 0; + sal_uInt8 nMask = 0; if( aAutomation.IsSet() ) nMask |= 0x1; if( aPrefix.Len() ) nMask |= 0x2; if( xClass.Is() ) nMask |= 0x4; @@ -103,7 +103,7 @@ SV_IMPL_META_FACTORY1( SvMetaClass, SvMetaType ); |* Beschreibung *************************************************************************/ SvMetaClass::SvMetaClass() - : aAutomation( TRUE, FALSE ) + : aAutomation( sal_True, sal_False ) { } @@ -116,7 +116,7 @@ void SvMetaClass::Load( SvPersistStream & rStm ) { SvMetaType::Load( rStm ); - BYTE nMask; + sal_uInt8 nMask; rStm >> nMask; if( nMask >= 0x20 ) { @@ -151,7 +151,7 @@ void SvMetaClass::Save( SvPersistStream & rStm ) SvMetaType::Save( rStm ); // Maske erstellen - BYTE nMask = 0; + sal_uInt8 nMask = 0; if( aAttrList.Count() ) nMask |= 0x1; if( aSuperClass.Is() ) nMask |= 0x2; if( aClassList.Count() ) nMask |= 0x4; @@ -176,10 +176,10 @@ void SvMetaClass::Save( SvPersistStream & rStm ) void SvMetaClass::FillSbxMemberObject( SvIdlDataBase & rBase, SbxObject * pObj, StringList & rSuperList, - BOOL bVariable ) + sal_Bool bVariable ) { // alle Attribute der Klasse schreiben - ULONG n ; + sal_uLong n ; for( n = 0; n < aAttrList.Count(); n++ ) { SvMetaAttribute * pAttr = aAttrList.GetObject( n ); @@ -223,8 +223,8 @@ void SvMetaClass::FillSbxMemberObject( SvIdlDataBase & rBase, void SvMetaClass::FillSbxObject( SvIdlDataBase & rBase, SbxObject * pObj ) { StringList aSuperList; - FillSbxMemberObject( rBase, pObj, aSuperList, TRUE ); - FillSbxMemberObject( rBase, pObj, aSuperList, FALSE ); + FillSbxMemberObject( rBase, pObj, aSuperList, sal_True ); + FillSbxMemberObject( rBase, pObj, aSuperList, sal_False ); ByteString * pStr = aSuperList.First(); while( pStr ) @@ -253,7 +253,7 @@ void SvMetaClass::ReadAttributesSvIdl( SvIdlDataBase & rBase, |* Beschreibung *************************************************************************/ void SvMetaClass::WriteAttributesSvIdl( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab ) + SvStream & rOutStm, sal_uInt16 nTab ) { SvMetaType::WriteAttributesSvIdl( rBase, rOutStm, nTab ); @@ -278,7 +278,7 @@ void SvMetaClass::WriteAttributesSvIdl( SvIdlDataBase & rBase, void SvMetaClass::ReadContextSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { - UINT32 nTokPos = rInStm.Tell(); + sal_uInt32 nTokPos = rInStm.Tell(); SvToken * pTok = rInStm.GetToken_Next(); if( pTok->Is( SvHash_import() ) ) @@ -305,7 +305,7 @@ void SvMetaClass::ReadContextSvIdl( SvIdlDataBase & rBase, rBase.WriteError( rInStm ); } xAutomationInterface = pClass; - xEle->SetAutomation( TRUE ); + xEle->SetAutomation( sal_True ); } else { @@ -342,7 +342,7 @@ void SvMetaClass::ReadContextSvIdl( SvIdlDataBase & rBase, rInStm.Seek( nTokPos ); SvMetaType * pType = rBase.ReadKnownType( rInStm ); - BOOL bOk = FALSE; + sal_Bool bOk = sal_False; SvMetaAttributeRef xAttr; if( !pType || pType->IsItem() ) { @@ -383,11 +383,11 @@ void SvMetaClass::WriteContextSvIdl ( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab + sal_uInt16 nTab ) { //SvMetaType::WriteContextSvIdl( rBase, rOutStm, nTab ); - ULONG n; + sal_uLong n; for( n = 0; n < aAttrList.Count(); n++ ) { WriteTab( rOutStm, nTab ); @@ -414,12 +414,12 @@ void SvMetaClass::WriteContextSvIdl |* |* Beschreibung *************************************************************************/ -BOOL SvMetaClass::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) +sal_Bool SvMetaClass::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { - ULONG nTokPos = rInStm.Tell(); + sal_uLong nTokPos = rInStm.Tell(); if( SvMetaType::ReadHeaderSvIdl( rBase, rInStm ) && GetType() == TYPE_CLASS ) { - BOOL bOk = TRUE; + sal_Bool bOk = sal_True; if( rInStm.Read( ':' ) ) { aSuperClass = rBase.ReadKnownClass( rInStm ); @@ -441,7 +441,7 @@ BOOL SvMetaClass::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) return bOk; } rInStm.Seek( nTokPos ); - return FALSE; + return sal_False; } /************************************************************************* @@ -449,7 +449,7 @@ BOOL SvMetaClass::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) |* |* Beschreibung *************************************************************************/ -BOOL SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm, +sal_Bool SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm, SvMetaAttribute & rAttr ) const { if ( !rAttr.GetRef() && rAttr.IsA( TYPE( SvMetaSlot ) ) ) @@ -458,7 +458,7 @@ BOOL SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm, DBG_ERROR( rAttr.GetSlotId().GetBuffer() ); } - for( ULONG n = 0; n < aAttrList.Count(); n++ ) + for( sal_uLong n = 0; n < aAttrList.Count(); n++ ) { SvMetaAttribute * pS = aAttrList.GetObject( n ); if( pS->GetName() == rAttr.GetName() ) @@ -476,13 +476,13 @@ BOOL SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm, aStr += " with different id's"; rBase.SetError( aStr, rInStm.GetToken() ); rBase.WriteError( rInStm ); - return FALSE; + return sal_False; } } else { - UINT32 nId1 = pS->GetSlotId().GetValue(); - UINT32 nId2 = rAttr.GetSlotId().GetValue(); + sal_uInt32 nId1 = pS->GetSlotId().GetValue(); + sal_uInt32 nId2 = rAttr.GetSlotId().GetValue(); if( nId1 == nId2 && nId1 != 0 /*&& nId2 != 0 ist ueberfluessig*/ ) { DBG_ERROR( "Gleiche Id in MetaClass : " ); @@ -497,14 +497,14 @@ BOOL SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm, aStr += " with equal id's"; rBase.SetError( aStr, rInStm.GetToken() ); rBase.WriteError( rInStm ); - return FALSE; + return sal_False; } } } SvMetaClass * pSC = aSuperClass; if( pSC ) return pSC->TestAttribute( rBase, rInStm, rAttr ); - return TRUE; + return sal_True; } /************************************************************************* @@ -513,7 +513,7 @@ BOOL SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm, |* Beschreibung *************************************************************************/ void SvMetaClass::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab ) + sal_uInt16 nTab ) { WriteHeaderSvIdl( rBase, rOutStm, nTab ); if( aSuperClass.Is() ) @@ -530,12 +530,12 @@ void SvMetaClass::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, *************************************************************************/ /* void SvMetaClass::WriteOdlMembers( ByteStringList & rSuperList, - BOOL bVariable, BOOL bWriteTab, + sal_Bool bVariable, sal_Bool bWriteTab, SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab ) + SvStream & rOutStm, sal_uInt16 nTab ) { // alle Attribute schreiben - ULONG n; + sal_uLong n; for( n = 0; n < aAttrList.Count(); n++ ) { SvMetaAttribute * pAttr = aAttrList.GetObject( n ); @@ -586,7 +586,7 @@ void SvMetaClass::WriteOdlMembers( ByteStringList & rSuperList, |* Beschreibung *************************************************************************/ void SvMetaClass::Write( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab, + sal_uInt16 nTab, WriteType nT, WriteAttribute ) { rBase.aIFaceName = GetName(); @@ -609,13 +609,13 @@ void SvMetaClass::Write( SvIdlDataBase & rBase, SvStream & rOutStm, rOutStm << endl; StringList aSuperList; - WriteOdlMembers( aSuperList, TRUE, TRUE, rBase, rOutStm, nTab ); + WriteOdlMembers( aSuperList, sal_True, sal_True, rBase, rOutStm, nTab ); WriteTab( rOutStm, nTab ); rOutStm << "methods:"; rOutStm << endl; - WriteOdlMembers( aSuperList, FALSE, TRUE, rBase, rOutStm, nTab ); + WriteOdlMembers( aSuperList, sal_False, sal_True, rBase, rOutStm, nTab ); ByteString * pStr = aSuperList.First(); while( pStr ) @@ -655,7 +655,7 @@ void SvMetaClass::Write( SvIdlDataBase & rBase, SvStream & rOutStm, rOutStm << "</INTERFACE>" << endl << endl; // alle Attribute schreiben - ULONG n; + sal_uLong n; for( n = 0; n < aAttrList.Count(); n++ ) { SvMetaAttribute * pAttr = aAttrList.GetObject( n ); @@ -681,12 +681,12 @@ void SvMetaClass::Write( SvIdlDataBase & rBase, SvStream & rOutStm, |* |* Beschreibung *************************************************************************/ -USHORT SvMetaClass::WriteSlotParamArray( SvIdlDataBase & rBase, +sal_uInt16 SvMetaClass::WriteSlotParamArray( SvIdlDataBase & rBase, SvSlotElementList & rSlotList, SvStream & rOutStm ) { - USHORT nCount = 0; - for( ULONG n = 0; n < rSlotList.Count(); n++ ) + sal_uInt16 nCount = 0; + for( sal_uLong n = 0; n < rSlotList.Count(); n++ ) { SvSlotElement *pEle = rSlotList.GetObject( n ); SvMetaSlot *pAttr = pEle->xSlot; @@ -701,13 +701,13 @@ USHORT SvMetaClass::WriteSlotParamArray( SvIdlDataBase & rBase, |* |* Beschreibung *************************************************************************/ -USHORT SvMetaClass::WriteSlots( const ByteString & rShellName, - USHORT nCount, SvSlotElementList & rSlotList, +sal_uInt16 SvMetaClass::WriteSlots( const ByteString & rShellName, + sal_uInt16 nCount, SvSlotElementList & rSlotList, SvIdlDataBase & rBase, SvStream & rOutStm ) { - USHORT nSCount = 0; - for( ULONG n = 0; n < rSlotList.Count(); n++ ) + sal_uInt16 nSCount = 0; + for( sal_uLong n = 0; n < rSlotList.Count(); n++ ) { rSlotList.Seek(n); SvSlotElement * pEle = rSlotList.GetCurObject(); @@ -736,13 +736,13 @@ void SvMetaClass::InsertSlots( SvSlotElementList& rList, SvULongs& rSuperList, rClassList.Insert(this, LIST_APPEND); // alle direkten Attribute schreiben - ULONG n; + sal_uLong n; for( n = 0; n < aAttrList.Count(); n++ ) { SvMetaAttribute * pAttr = aAttrList.GetObject( n ); - ULONG nId = pAttr->GetSlotId().GetValue(); - USHORT nPos; + sal_uLong nId = pAttr->GetSlotId().GetValue(); + sal_uInt16 nPos; for ( nPos=0; nPos < rSuperList.Count(); nPos++ ) { if ( rSuperList.GetObject(nPos) == nId ) @@ -800,7 +800,7 @@ void SvMetaClass::FillClasses( SvMetaClassList & rList ) rList.Insert(this, LIST_APPEND); // Meine Imports - for( ULONG n = 0; n < aClassList.Count(); n++ ) + for( sal_uLong n = 0; n < aClassList.Count(); n++ ) { SvClassElement * pEle = aClassList.GetObject( n ); SvMetaClass * pCl = pEle->GetClass(); @@ -825,7 +825,7 @@ void SvMetaClass::WriteSlotStubs( const ByteString & rShellName, SvStream & rOutStm ) { // alle Attribute schreiben - for( ULONG n = 0; n < rSlotList.Count(); n++ ) + for( sal_uLong n = 0; n < rSlotList.Count(); n++ ) { SvSlotElement *pEle = rSlotList.GetObject( n ); SvMetaSlot *pAttr = pEle->xSlot; @@ -876,7 +876,7 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) SvMetaClassList classList; SvSlotElementList aSlotList; InsertSlots(aSlotList, aSuperList, classList, ByteString(), rBase); - ULONG n; + sal_uLong n; for ( n=0; n<aSlotList.Count(); n++ ) { SvSlotElement *pEle = aSlotList.GetObject( n ); @@ -884,10 +884,10 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) pSlot->SetListPos(n); } - ULONG nSlotCount = aSlotList.Count(); + sal_uLong nSlotCount = aSlotList.Count(); // alle Attribute schreiben - USHORT nArgCount = WriteSlotParamArray( rBase, aSlotList, rOutStm ); + sal_uInt16 nArgCount = WriteSlotParamArray( rBase, aSlotList, rOutStm ); if( nArgCount ) Back2Delemitter( rOutStm ); else @@ -944,7 +944,7 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) void SvMetaClass::WriteHelpIds( SvIdlDataBase & rBase, SvStream & rOutStm, Table* pTable ) { - for( ULONG n=0; n<aAttrList.Count(); n++ ) + for( sal_uLong n=0; n<aAttrList.Count(); n++ ) { SvMetaAttribute * pAttr = aAttrList.GetObject( n ); pAttr->WriteHelpId( rBase, rOutStm, pTable ); @@ -957,7 +957,7 @@ void SvMetaClass::WriteHelpIds( SvIdlDataBase & rBase, SvStream & rOutStm, void SvMetaClass::WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm, Table * pTable ) { - for( ULONG n=0; n<aAttrList.Count(); n++ ) + for( sal_uLong n=0; n<aAttrList.Count(); n++ ) { SvMetaAttribute * pAttr = aAttrList.GetObject( n ); pAttr->WriteSrc( rBase, rOutStm, pTable ); @@ -969,7 +969,7 @@ void SvMetaClass::WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm, |* |* Beschreibung *************************************************************************/ -void SvMetaClass::WriteHxx( SvIdlDataBase &, SvStream & rOutStm, USHORT ) +void SvMetaClass::WriteHxx( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16 ) { ByteString aSuperName( "SvDispatch" ); if( GetSuperClass() ) @@ -982,11 +982,11 @@ void SvMetaClass::WriteHxx( SvIdlDataBase &, SvStream & rOutStm, USHORT ) << '{' << endl << "protected:" << endl << "\tvirtual SvGlobalName GetTypeName() const;" << endl - << "\tvirtual BOOL FillTypeLibInfo( SvGlobalName *, USHORT * pMajor," << endl - << "\t USHORT * pMinor ) const;" << endl - << "\tvirtual BOOL FillTypeLibInfo( ByteString * pName, USHORT * pMajor," << endl; + << "\tvirtual sal_Bool FillTypeLibInfo( SvGlobalName *, sal_uInt16 * pMajor," << endl + << "\t sal_uInt16 * pMinor ) const;" << endl + << "\tvirtual sal_Bool FillTypeLibInfo( ByteString * pName, sal_uInt16 * pMajor," << endl; rOutStm - << "\t USHORT * pMinor ) const;" << endl + << "\t sal_uInt16 * pMinor ) const;" << endl << "\tvirtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) = 0;" << endl << "public:" << endl << "\t static SvGlobalName ClassName()" << endl @@ -999,7 +999,7 @@ void SvMetaClass::WriteHxx( SvIdlDataBase &, SvStream & rOutStm, USHORT ) |* |* Beschreibung *************************************************************************/ -void SvMetaClass::WriteCxx( SvIdlDataBase &, SvStream & rOutStm, USHORT ) +void SvMetaClass::WriteCxx( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16 ) { ByteString aSuperName( "SvDispatch" ); if( GetSuperClass() ) @@ -1015,26 +1015,26 @@ void SvMetaClass::WriteCxx( SvIdlDataBase &, SvStream & rOutStm, USHORT ) SvMetaModule * pMod = GetModule(); // FillTypeLibInfo - rOutStm << "BOOL " << name.GetBuffer() << "::FillTypeLibInfo( SvGlobalName * pGN," << endl - << "\t USHORT * pMajor," << endl - << "\t USHORT * pMinor ) const" << endl + rOutStm << "sal_Bool " << name.GetBuffer() << "::FillTypeLibInfo( SvGlobalName * pGN," << endl + << "\t sal_uInt16 * pMajor," << endl + << "\t sal_uInt16 * pMinor ) const" << endl << '{' << endl << "\tSvGlobalName aN( " << ByteString( pMod->GetUUId().GetctorName(), RTL_TEXTENCODING_UTF8 ).GetBuffer() << " );" << endl; rOutStm << "\t*pGN = aN;" << endl << "\t*pMajor = " << ByteString::CreateFromInt32(pMod->GetVersion().GetMajorVersion()).GetBuffer() << ';' << endl << "\t*pMinor = " << ByteString::CreateFromInt32(pMod->GetVersion().GetMinorVersion()).GetBuffer() << ';' << endl - << "\treturn TRUE;" << endl + << "\treturn sal_True;" << endl << '}' << endl; // FillTypeLibInfo - rOutStm << "BOOL " << name.GetBuffer() << "::FillTypeLibInfo( ByteString * pName," - << "\t USHORT * pMajor," << endl - << "\t USHORT * pMinor ) const" << endl; + rOutStm << "sal_Bool " << name.GetBuffer() << "::FillTypeLibInfo( ByteString * pName," + << "\t sal_uInt16 * pMajor," << endl + << "\t sal_uInt16 * pMinor ) const" << endl; rOutStm << '{' << endl << "\t*pName = \"" << pMod->GetTypeLibFileName().GetBuffer() << "\";" << endl << "\t*pMajor = " << ByteString::CreateFromInt32(pMod->GetVersion().GetMajorVersion()).GetBuffer() << ';' << endl << "\t*pMinor = " << ByteString::CreateFromInt32(pMod->GetVersion().GetMinorVersion()).GetBuffer() << ';' << endl - << "\treturn TRUE;" << endl + << "\treturn sal_True;" << endl << '}' << endl; rOutStm << "void " << name.GetBuffer() << "::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )" << endl diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx index 7b7039892fde..6c7018959a9d 100644..100755 --- a/idl/source/objects/slot.cxx +++ b/idl/source/objects/slot.cxx @@ -47,14 +47,14 @@ SvMetaObject *SvMetaSlot::MakeClone() const /************************************************************************* |* SvMetaSlot::SvMetaSlot() |* -|* Beschreibung Zweites FALSE bei den SvBOOL-Objekten bedeutet, -|* IsSet() liefert FALSE (Defaultinitialisierung). +|* Beschreibung Zweites sal_False bei den SvBOOL-Objekten bedeutet, +|* IsSet() liefert sal_False (Defaultinitialisierung). *************************************************************************/ SvMetaSlot::SvMetaSlot() - : aCachable( TRUE, FALSE ) - , aSynchron( TRUE, FALSE ) - , aRecordPerSet( TRUE, FALSE ) - , aRecordAbsolute( FALSE, FALSE ) + : aCachable( sal_True, sal_False ) + , aSynchron( sal_True, sal_False ) + , aRecordPerSet( sal_True, sal_False ) + , aRecordAbsolute( sal_False, sal_False ) , pLinkedSlot(0) , pNextSlot(0) , pEnumValue(0) @@ -63,10 +63,10 @@ SvMetaSlot::SvMetaSlot() SvMetaSlot::SvMetaSlot( SvMetaType * pType ) : SvMetaAttribute( pType ) - , aCachable( TRUE, FALSE ) - , aSynchron( TRUE, FALSE ) - , aRecordPerSet( TRUE, FALSE ) - , aRecordAbsolute( FALSE, FALSE ) + , aCachable( sal_True, sal_False ) + , aSynchron( sal_True, sal_False ) + , aRecordPerSet( sal_True, sal_False ) + , aRecordAbsolute( sal_False, sal_False ) , pLinkedSlot(0) , pNextSlot(0) , pEnumValue(0) @@ -76,13 +76,13 @@ SvMetaSlot::SvMetaSlot( SvMetaType * pType ) /* #define TEST_READ \ { \ - UINT32 nPos; \ + sal_uInt32 nPos; \ rStm >> nPos; \ DBG_ASSERT( nPos +4 == rStm.Tell(), "stream pos error" ); \ } #define TEST_WRITE \ - rStm << (UINT32)rStm.Tell(); + rStm << (sal_uInt32)rStm.Tell(); */ #define TEST_READ #define TEST_WRITE @@ -91,7 +91,7 @@ void SvMetaSlot::Load( SvPersistStream & rStm ) { SvMetaAttribute::Load( rStm ); - USHORT nMask; + sal_uInt16 nMask; rStm >> nMask; TEST_READ @@ -189,7 +189,7 @@ void SvMetaSlot::Save( SvPersistStream & rStm ) SvMetaAttribute::Save( rStm ); // Maske erstellen - USHORT nMask = 0; + sal_uInt16 nMask = 0; if( aMethod.Is() ) nMask |= 0x0001; if( aGroupId.Len() ) nMask |= 0x0002; if( aHasCoreId.IsSet() ) nMask |= 0x0004; @@ -312,7 +312,7 @@ void SvMetaSlot::Save( SvPersistStream & rStm ) |* |* Beschreibung *************************************************************************/ -BOOL SvMetaSlot::IsVariable() const +sal_Bool SvMetaSlot::IsVariable() const { return SvMetaAttribute::IsVariable(); } @@ -322,9 +322,9 @@ BOOL SvMetaSlot::IsVariable() const |* |* Beschreibung *************************************************************************/ -BOOL SvMetaSlot::IsMethod() const +sal_Bool SvMetaSlot::IsMethod() const { - BOOL b = SvMetaAttribute::IsMethod(); + sal_Bool b = SvMetaAttribute::IsMethod(); b |= NULL != GetMethod(); return b; } @@ -334,7 +334,7 @@ BOOL SvMetaSlot::IsMethod() const |* |* Beschreibung *************************************************************************/ -ByteString SvMetaSlot::GetMangleName( BOOL bVariable ) const +ByteString SvMetaSlot::GetMangleName( sal_Bool bVariable ) const { if( !bVariable ) { @@ -348,8 +348,8 @@ ByteString SvMetaSlot::GetMangleName( BOOL bVariable ) const /************************************************************************* |* Referenz |* -|* Beschreibung Zweites FALSE bei den SvBOOL-Objekten bedeutet, -|* IsSet() liefert FALSE (Defaultinitialisierung). +|* Beschreibung Zweites sal_False bei den SvBOOL-Objekten bedeutet, +|* IsSet() liefert sal_False (Defaultinitialisierung). *************************************************************************/ /** Referenz Aufloesung **/ SvMetaType * SvMetaSlot::GetSlotType() const @@ -362,7 +362,7 @@ SvMetaAttribute * SvMetaSlot::GetMethod() const if( aMethod.Is() || !GetRef() ) return aMethod; return ((SvMetaSlot *)GetRef())->GetMethod(); } -BOOL SvMetaSlot::GetHasCoreId() const +sal_Bool SvMetaSlot::GetHasCoreId() const { if( aHasCoreId.IsSet() || !GetRef() ) return aHasCoreId; return ((SvMetaSlot *)GetRef())->GetHasCoreId(); @@ -397,62 +397,62 @@ const ByteString & SvMetaSlot::GetDefault() const if( aDefault.Len() || !GetRef() ) return aDefault; return ((SvMetaSlot *)GetRef())->GetDefault(); } -BOOL SvMetaSlot::GetPseudoSlots() const +sal_Bool SvMetaSlot::GetPseudoSlots() const { if( aPseudoSlots.IsSet() || !GetRef() ) return aPseudoSlots; return ((SvMetaSlot *)GetRef())->GetPseudoSlots(); } /* -BOOL SvMetaSlot::GetGet() const +sal_Bool SvMetaSlot::GetGet() const { if( aGet.IsSet() || !GetRef() ) return aGet; return ((SvMetaSlot *)GetRef())->GetGet(); } -BOOL SvMetaSlot::GetSet() const +sal_Bool SvMetaSlot::GetSet() const { if( aSet.IsSet() || !GetRef() ) return aSet; return ((SvMetaSlot *)GetRef())->GetSet(); } */ -BOOL SvMetaSlot::GetCachable() const +sal_Bool SvMetaSlot::GetCachable() const { // Cachable und Volatile sind exclusiv if( !GetRef() || aCachable.IsSet() || aVolatile.IsSet() ) return aCachable; return ((SvMetaSlot *)GetRef())->GetCachable(); } -BOOL SvMetaSlot::GetVolatile() const +sal_Bool SvMetaSlot::GetVolatile() const { // Cachable und Volatile sind exclusiv if( !GetRef() || aVolatile.IsSet() || aCachable.IsSet() ) return aVolatile; return ((SvMetaSlot *)GetRef())->GetVolatile(); } -BOOL SvMetaSlot::GetToggle() const +sal_Bool SvMetaSlot::GetToggle() const { if( aToggle.IsSet() || !GetRef() ) return aToggle; return ((SvMetaSlot *)GetRef())->GetToggle(); } -BOOL SvMetaSlot::GetAutoUpdate() const +sal_Bool SvMetaSlot::GetAutoUpdate() const { if( aAutoUpdate.IsSet() || !GetRef() ) return aAutoUpdate; return ((SvMetaSlot *)GetRef())->GetAutoUpdate(); } -BOOL SvMetaSlot::GetSynchron() const +sal_Bool SvMetaSlot::GetSynchron() const { // Synchron und Asynchron sind exclusiv if( !GetRef() || aSynchron.IsSet() || aAsynchron.IsSet() ) return aSynchron; return ((SvMetaSlot *)GetRef())->GetSynchron(); } -BOOL SvMetaSlot::GetAsynchron() const +sal_Bool SvMetaSlot::GetAsynchron() const { // Synchron und Asynchron sind exclusiv if( !GetRef() || aAsynchron.IsSet() || aSynchron.IsSet() ) return aAsynchron; return ((SvMetaSlot *)GetRef())->GetAsynchron(); } -BOOL SvMetaSlot::GetRecordPerItem() const +sal_Bool SvMetaSlot::GetRecordPerItem() const { // Record- PerItem, No, PerSet und Manual sind exclusiv if( !GetRef() || aRecordPerItem.IsSet() || aNoRecord.IsSet() @@ -460,7 +460,7 @@ BOOL SvMetaSlot::GetRecordPerItem() const return aRecordPerItem; return ((SvMetaSlot *)GetRef())->GetRecordPerItem(); } -BOOL SvMetaSlot::GetRecordPerSet() const +sal_Bool SvMetaSlot::GetRecordPerSet() const { // Record- PerItem, No, PerSet und Manual sind exclusiv if( !GetRef() || aRecordPerItem.IsSet() || aNoRecord.IsSet() @@ -468,7 +468,7 @@ BOOL SvMetaSlot::GetRecordPerSet() const return aRecordPerSet; return ((SvMetaSlot *)GetRef())->GetRecordPerSet(); } -BOOL SvMetaSlot::GetRecordManual() const +sal_Bool SvMetaSlot::GetRecordManual() const { // Record- PerItem, No, PerSet und Manual sind exclusiv if( !GetRef() || aRecordPerItem.IsSet() || aNoRecord.IsSet() @@ -476,7 +476,7 @@ BOOL SvMetaSlot::GetRecordManual() const return aRecordManual; return ((SvMetaSlot *)GetRef())->GetRecordManual(); } -BOOL SvMetaSlot::GetNoRecord() const +sal_Bool SvMetaSlot::GetNoRecord() const { // Record- PerItem, No, PerSet und Manual sind exclusiv if( !GetRef() || aRecordPerItem.IsSet() || aNoRecord.IsSet() @@ -484,13 +484,13 @@ BOOL SvMetaSlot::GetNoRecord() const return aNoRecord; return ((SvMetaSlot *)GetRef())->GetNoRecord(); } -BOOL SvMetaSlot::GetRecordAbsolute() const +sal_Bool SvMetaSlot::GetRecordAbsolute() const { if( !GetRef() || aRecordAbsolute.IsSet() ) return aRecordAbsolute; return ((SvMetaSlot *)GetRef())->GetRecordAbsolute(); } -BOOL SvMetaSlot::GetHasDialog() const +sal_Bool SvMetaSlot::GetHasDialog() const { if( aHasDialog.IsSet() || !GetRef() ) return aHasDialog; return ((SvMetaSlot *)GetRef())->GetHasDialog(); @@ -500,44 +500,44 @@ const ByteString & SvMetaSlot::GetPseudoPrefix() const if( aPseudoPrefix.Len() || !GetRef() ) return aPseudoPrefix; return ((SvMetaSlot *)GetRef())->GetPseudoPrefix(); } -BOOL SvMetaSlot::GetMenuConfig() const +sal_Bool SvMetaSlot::GetMenuConfig() const { if( aMenuConfig.IsSet() || !GetRef() ) return aMenuConfig; return ((SvMetaSlot *)GetRef())->GetMenuConfig(); } -BOOL SvMetaSlot::GetToolBoxConfig() const +sal_Bool SvMetaSlot::GetToolBoxConfig() const { if( aToolBoxConfig.IsSet() || !GetRef() ) return aToolBoxConfig; return ((SvMetaSlot *)GetRef())->GetToolBoxConfig(); } -BOOL SvMetaSlot::GetStatusBarConfig() const +sal_Bool SvMetaSlot::GetStatusBarConfig() const { if( aStatusBarConfig.IsSet() || !GetRef() ) return aStatusBarConfig; return ((SvMetaSlot *)GetRef())->GetStatusBarConfig(); } -BOOL SvMetaSlot::GetAccelConfig() const +sal_Bool SvMetaSlot::GetAccelConfig() const { if( aAccelConfig.IsSet() || !GetRef() ) return aAccelConfig; return ((SvMetaSlot *)GetRef())->GetAccelConfig(); } -BOOL SvMetaSlot::GetFastCall() const +sal_Bool SvMetaSlot::GetFastCall() const { if( aFastCall.IsSet() || !GetRef() ) return aFastCall; return ((SvMetaSlot *)GetRef())->GetFastCall(); } -BOOL SvMetaSlot::GetContainer() const +sal_Bool SvMetaSlot::GetContainer() const { if( aContainer.IsSet() || !GetRef() ) return aContainer; return ((SvMetaSlot *)GetRef())->GetContainer(); } -BOOL SvMetaSlot::GetImageRotation() const +sal_Bool SvMetaSlot::GetImageRotation() const { if( aImageRotation.IsSet() || !GetRef() ) return aImageRotation; return ((SvMetaSlot *)GetRef())->GetImageRotation(); } -BOOL SvMetaSlot::GetImageReflection() const +sal_Bool SvMetaSlot::GetImageReflection() const { if( aImageReflection.IsSet() || !GetRef() ) return aImageReflection; return ((SvMetaSlot *)GetRef())->GetImageReflection(); @@ -556,7 +556,7 @@ const ByteString& SvMetaSlot::GetUnoName() const *************************************************************************/ /* void SvMetaSlot::FillSbxObject( SvIdlDataBase & rBase, SbxObject * pObj, - BOOL bVariable ) + sal_Bool bVariable ) { // keine Attribut fuer Automation if( !GetAutomation() || !GetExport() ) @@ -574,7 +574,7 @@ void SvMetaSlot::FillSbxObject( SvIdlDataBase & rBase, SbxObject * pObj, SbxMethodRef xMeth = new SbxMethod( aName, pRetBaseType->GetSbxDataType() ); pType->FillSbxObject( xMeth, bVariable ); - xMeth->SetUserData( MakeSlotValue(rBase, FALSE) ); + xMeth->SetUserData( MakeSlotValue(rBase, sal_False) ); pObj->Insert( &xMeth ); return; @@ -596,7 +596,7 @@ void SvMetaSlot::ReadAttributesSvIdl( SvIdlDataBase & rBase, { SvMetaAttribute::ReadAttributesSvIdl( rBase, rInStm ); - BOOL bOk = FALSE; + sal_Bool bOk = sal_False; bOk |= aDefault.ReadSvIdl( SvHash_Default(), rInStm ); bOk |= aPseudoSlots.ReadSvIdl( SvHash_PseudoSlots(), rInStm ); bOk |= aHasCoreId.ReadSvIdl( SvHash_HasCoreId(), rInStm ); @@ -620,29 +620,29 @@ void SvMetaSlot::ReadAttributesSvIdl( SvIdlDataBase & rBase, } if( aCachable.ReadSvIdl( SvHash_Cachable(), rInStm ) ) - SetCachable( aCachable ), bOk = TRUE; + SetCachable( aCachable ), bOk = sal_True; if( aVolatile.ReadSvIdl( SvHash_Volatile(), rInStm ) ) - SetVolatile( aVolatile ), bOk = TRUE; + SetVolatile( aVolatile ), bOk = sal_True; if( aToggle.ReadSvIdl( SvHash_Toggle(), rInStm ) ) - SetToggle( aToggle ), bOk = TRUE; + SetToggle( aToggle ), bOk = sal_True; if( aAutoUpdate.ReadSvIdl( SvHash_AutoUpdate(), rInStm ) ) - SetAutoUpdate( aAutoUpdate ), bOk = TRUE; + SetAutoUpdate( aAutoUpdate ), bOk = sal_True; if( aSynchron.ReadSvIdl( SvHash_Synchron(), rInStm ) ) - SetSynchron( aSynchron ), bOk = TRUE; + SetSynchron( aSynchron ), bOk = sal_True; if( aAsynchron.ReadSvIdl( SvHash_Asynchron(), rInStm ) ) - SetAsynchron( aAsynchron ), bOk = TRUE; + SetAsynchron( aAsynchron ), bOk = sal_True; if( aRecordAbsolute.ReadSvIdl( SvHash_RecordAbsolute(), rInStm ) ) - SetRecordAbsolute( aRecordAbsolute), bOk = TRUE; + SetRecordAbsolute( aRecordAbsolute), bOk = sal_True; if( aRecordPerItem.ReadSvIdl( SvHash_RecordPerItem(), rInStm ) ) - SetRecordPerItem( aRecordPerItem ), bOk = TRUE; + SetRecordPerItem( aRecordPerItem ), bOk = sal_True; if( aRecordPerSet.ReadSvIdl( SvHash_RecordPerSet(), rInStm ) ) - SetRecordPerSet( aRecordPerSet ), bOk = TRUE; + SetRecordPerSet( aRecordPerSet ), bOk = sal_True; if( aRecordManual.ReadSvIdl( SvHash_RecordManual(), rInStm ) ) - SetRecordManual( aRecordManual ), bOk = TRUE; + SetRecordManual( aRecordManual ), bOk = sal_True; if( aNoRecord.ReadSvIdl( SvHash_NoRecord(), rInStm ) ) - SetNoRecord( aNoRecord ), bOk = TRUE; + SetNoRecord( aNoRecord ), bOk = sal_True; bOk |= aHasDialog.ReadSvIdl( SvHash_HasDialog(), rInStm ); bOk |= aPseudoPrefix.ReadSvIdl( SvHash_PseudoPrefix(), rInStm ); @@ -653,7 +653,7 @@ void SvMetaSlot::ReadAttributesSvIdl( SvIdlDataBase & rBase, SvBOOL aAllConfig; if( aAllConfig.ReadSvIdl( SvHash_AllConfig(), rInStm ) ) - SetAllConfig( aAllConfig ), bOk = TRUE; + SetAllConfig( aAllConfig ), bOk = sal_True; bOk |= aFastCall.ReadSvIdl( SvHash_FastCall(), rInStm ); bOk |= aContainer.ReadSvIdl( SvHash_Container(), rInStm ); bOk |= aImageRotation.ReadSvIdl( SvHash_ImageRotation(), rInStm ); @@ -664,11 +664,11 @@ void SvMetaSlot::ReadAttributesSvIdl( SvIdlDataBase & rBase, { if( !aSlotType.Is() ) { - UINT32 nTokPos = rInStm.Tell(); + sal_uInt32 nTokPos = rInStm.Tell(); SvToken * pTok = rInStm.GetToken_Next(); if( pTok->Is( SvHash_SlotType() ) ) { - BOOL bBraket = rInStm.Read( '(' ); + sal_Bool bBraket = rInStm.Read( '(' ); if( bBraket || rInStm.Read( '=' ) ) { aSlotType = rBase.ReadKnownType( rInStm ); @@ -700,7 +700,7 @@ void SvMetaSlot::ReadAttributesSvIdl( SvIdlDataBase & rBase, if( pTok->IsIdentifier() ) { aMethod = new SvMetaSlot(); - UINT32 nTokPos = rInStm.Tell(); + sal_uInt32 nTokPos = rInStm.Tell(); if( aMethod->ReadSvIdl( rBase, rInStm ) ) { if( aMethod->IsMethod() ) @@ -724,7 +724,7 @@ void SvMetaSlot::ReadAttributesSvIdl( SvIdlDataBase & rBase, *************************************************************************/ void SvMetaSlot::WriteAttributesSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab ) + sal_uInt16 nTab ) { SvMetaAttribute::WriteAttributesSvIdl( rBase, rOutStm, nTab ); @@ -800,7 +800,7 @@ void SvMetaSlot::WriteAttributesSvIdl( SvIdlDataBase & rBase, if( aVolatile ) aOut += aVolatile.GetSvIdlString( SvHash_Volatile() ); else if( !aCachable ) - // wegen Default == TRUE, nur wenn kein anderer gesetzt + // wegen Default == sal_True, nur wenn kein anderer gesetzt aOut += aCachable.GetSvIdlString( SvHash_Cachable() ); else aDel.Erase(); @@ -820,7 +820,7 @@ void SvMetaSlot::WriteAttributesSvIdl( SvIdlDataBase & rBase, if( aAsynchron ) ( aOut += aDel ) += aAsynchron.GetSvIdlString( SvHash_Asynchron() ); else if( !aSynchron ) - // wegen Default == TRUE, nur wenn kein anderer gesetzt + // wegen Default == sal_True, nur wenn kein anderer gesetzt ( aOut += aDel ) += aSynchron.GetSvIdlString( SvHash_Synchron() ); else aDel1 = aDel; @@ -831,7 +831,7 @@ void SvMetaSlot::WriteAttributesSvIdl( SvIdlDataBase & rBase, else if( aNoRecord ) ( aOut += aDel1 ) += aNoRecord.GetSvIdlString( SvHash_NoRecord() ); else if( !aRecordPerSet ) - // wegen Default == TRUE, nur wenn kein anderer gesetzt + // wegen Default == sal_True, nur wenn kein anderer gesetzt ( aOut += aDel1 ) += aRecordPerSet.GetSvIdlString( SvHash_RecordPerSet() ); else if( aRecordPerItem ) ( aOut += aDel1 ) += aRecordPerItem.GetSvIdlString( SvHash_RecordPerItem() ); @@ -903,9 +903,9 @@ void SvMetaSlot::WriteAttributesSvIdl( SvIdlDataBase & rBase, |* |* Beschreibung *************************************************************************/ -BOOL SvMetaSlot::Test( SvIdlDataBase & rBase, SvTokenStream & rInStm ) +sal_Bool SvMetaSlot::Test( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { - BOOL bOk = SvMetaAttribute::Test( rBase, rInStm ); + sal_Bool bOk = SvMetaAttribute::Test( rBase, rInStm ); if( bOk ) { SvMetaType * pType = GetType(); @@ -915,7 +915,7 @@ BOOL SvMetaSlot::Test( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { rBase.SetError( "this attribute is not a slot", rInStm.GetToken() ); rBase.WriteError( rInStm ); - bOk = FALSE; + bOk = sal_False; } } @@ -927,10 +927,10 @@ BOOL SvMetaSlot::Test( SvIdlDataBase & rBase, SvTokenStream & rInStm ) |* |* Beschreibung *************************************************************************/ -BOOL SvMetaSlot::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) +sal_Bool SvMetaSlot::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { - UINT32 nTokPos = rInStm.Tell(); - BOOL bOk = TRUE; + sal_uInt32 nTokPos = rInStm.Tell(); + sal_Bool bOk = sal_True; SvMetaAttribute * pAttr = rBase.ReadKnownAttr( rInStm, GetType() ); if( pAttr ) @@ -950,7 +950,7 @@ BOOL SvMetaSlot::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) aStr += " is method or variable but not a slot"; rBase.SetError( aStr, rInStm.GetToken() ); rBase.WriteError( rInStm ); - bOk = FALSE; + bOk = sal_False; } } else @@ -971,7 +971,7 @@ BOOL SvMetaSlot::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { DBG_ERROR("Illegal definition!"); rInStm.Seek( nTokPos ); - return FALSE; + return sal_False; } SetName( pKnownSlot->GetName(), &rBase ); @@ -983,7 +983,7 @@ BOOL SvMetaSlot::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) aStr += " is method or variable but not a slot"; rBase.SetError( aStr, rInStm.GetToken() ); rBase.WriteError( rInStm ); - bOk = FALSE; + bOk = sal_False; } } } @@ -1000,7 +1000,7 @@ BOOL SvMetaSlot::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) |* Beschreibung *************************************************************************/ void SvMetaSlot::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab ) + sal_uInt16 nTab ) { SvMetaAttribute::WriteSvIdl( rBase, rOutStm, nTab ); } @@ -1011,7 +1011,7 @@ void SvMetaSlot::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, |* Beschreibung *************************************************************************/ void SvMetaSlot::Write( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab, + SvStream & rOutStm, sal_uInt16 nTab, WriteType nT, WriteAttribute nA ) { if ( nT == WRITE_DOCU ) @@ -1046,10 +1046,10 @@ void SvMetaSlot::Insert( SvSlotElementList& rList, const ByteString & rPrefix, SvIdlDataBase& rBase) { // Einf"ugeposition durch bin"are Suche in der SlotListe ermitteln - USHORT nId = (USHORT) GetSlotId().GetValue(); - USHORT nListCount = (USHORT) rList.Count(); - USHORT nPos; - ULONG m; // for inner "for" loop + sal_uInt16 nId = (sal_uInt16) GetSlotId().GetValue(); + sal_uInt16 nListCount = (sal_uInt16) rList.Count(); + sal_uInt16 nPos; + sal_uLong m; // for inner "for" loop if ( !nListCount ) nPos = 0; @@ -1057,9 +1057,9 @@ void SvMetaSlot::Insert( SvSlotElementList& rList, const ByteString & rPrefix, nPos = rList.GetObject(0)->xSlot->GetSlotId().GetValue() >= nId ? 0 : 1; else { - USHORT nMid = 0, nLow = 0; - USHORT nHigh = nListCount - 1; - BOOL bFound = FALSE; + sal_uInt16 nMid = 0, nLow = 0; + sal_uInt16 nHigh = nListCount - 1; + sal_Bool bFound = sal_False; while ( !bFound && nLow <= nHigh ) { nMid = (nLow + nHigh) >> 1; @@ -1078,7 +1078,7 @@ void SvMetaSlot::Insert( SvSlotElementList& rList, const ByteString & rPrefix, break; } else - bFound = TRUE; + bFound = sal_True; } DBG_ASSERT(!bFound, "Duplicate SlotId!"); @@ -1088,13 +1088,13 @@ void SvMetaSlot::Insert( SvSlotElementList& rList, const ByteString & rPrefix, DBG_ASSERT( nPos <= nListCount, "nPos too large" ); DBG_ASSERT( nPos == nListCount || nId <= - (USHORT) rList.GetObject(nPos)->xSlot->GetSlotId().GetValue(), + (sal_uInt16) rList.GetObject(nPos)->xSlot->GetSlotId().GetValue(), "Successor has lower SlotId" ); DBG_ASSERT( nPos == 0 || nId > - (USHORT) rList.GetObject(nPos-1)->xSlot->GetSlotId().GetValue(), + (sal_uInt16) rList.GetObject(nPos-1)->xSlot->GetSlotId().GetValue(), "Predecessor has higher SlotId" ); DBG_ASSERT( nPos+1 >= nListCount || nId < - (USHORT) rList.GetObject(nPos+1)->xSlot->GetSlotId().GetValue(), + (sal_uInt16) rList.GetObject(nPos+1)->xSlot->GetSlotId().GetValue(), "Successor has lower SlotId" ); rList.Insert( new SvSlotElement( this, rPrefix ), nPos ); @@ -1108,7 +1108,7 @@ void SvMetaSlot::Insert( SvSlotElementList& rList, const ByteString & rPrefix, // Den MasterSlot clonen SvMetaSlotRef xEnumSlot; SvMetaSlot *pFirstEnumSlot = NULL; - for( ULONG n = 0; n < pEnum->Count(); n++ ) + for( sal_uLong n = 0; n < pEnum->Count(); n++ ) { // Die SlotId erzeugen SvMetaEnumValue *enumValue = pEnum->GetObject(n); @@ -1135,7 +1135,7 @@ void SvMetaSlot::Insert( SvSlotElementList& rList, const ByteString & rPrefix, { DBG_ERROR("Invalid EnumSlot!"); xEnumSlot = Clone(); - ULONG nValue; + sal_uLong nValue; if ( rBase.FindId(aSId , &nValue) ) { SvNumberIdentifier aId; @@ -1146,7 +1146,7 @@ void SvMetaSlot::Insert( SvSlotElementList& rList, const ByteString & rPrefix, } // Die Slaves sind kein Master ! - xEnumSlot->aPseudoSlots = FALSE; + xEnumSlot->aPseudoSlots = sal_False; xEnumSlot->SetEnumValue(enumValue); if ( !pFirstEnumSlot || xEnumSlot->GetSlotId().GetValue() < pFirstEnumSlot->GetSlotId().GetValue() ) @@ -1163,7 +1163,7 @@ void SvMetaSlot::Insert( SvSlotElementList& rList, const ByteString & rPrefix, pLinkedSlot = pFirstEnumSlot; // Slaves untereinander verketten - rList.Seek((ULONG)0); + rList.Seek((sal_uLong)0); xEnumSlot = pFirstEnumSlot; SvSlotElement *pEle; do @@ -1215,12 +1215,12 @@ void SvMetaSlot::WriteSlotStubs( const ByteString & rShellName, ByteString aMethodName( GetExecMethod() ); if ( aMethodName.Len() && aMethodName != "NoExec" ) { - BOOL bIn = FALSE; - for( USHORT n = 0; n < rList.Count(); n++ ) + sal_Bool bIn = sal_False; + for( sal_uInt16 n = 0; n < rList.Count(); n++ ) { if( *(rList.GetObject(n)) == aMethodName ) { - bIn=TRUE; + bIn=sal_True; break; } } @@ -1239,12 +1239,12 @@ void SvMetaSlot::WriteSlotStubs( const ByteString & rShellName, aMethodName = GetStateMethod(); if ( aMethodName.Len() && aMethodName != "NoState" ) { - BOOL bIn = FALSE; - for ( USHORT n=0; n < rList.Count(); n++ ) + sal_Bool bIn = sal_False; + for ( sal_uInt16 n=0; n < rList.Count(); n++ ) { if ( *(rList.GetObject(n)) == aMethodName ) { - bIn=TRUE; + bIn=sal_True; break; } } @@ -1261,7 +1261,7 @@ void SvMetaSlot::WriteSlotStubs( const ByteString & rShellName, } } -void SvMetaSlot::WriteSlot( const ByteString & rShellName, USHORT nCount, +void SvMetaSlot::WriteSlot( const ByteString & rShellName, sal_uInt16 nCount, const ByteString & rSlotId, SvSlotElementList& rSlotList, const ByteString & rPrefix, @@ -1270,8 +1270,8 @@ void SvMetaSlot::WriteSlot( const ByteString & rShellName, USHORT nCount, if ( !GetExport() && !GetHidden() ) return; -// BOOL bIsEnumSlot = 0 != rValueName.Len(); - BOOL bIsEnumSlot = 0 != pEnumValue; +// sal_Bool bIsEnumSlot = 0 != rValueName.Len(); + sal_Bool bIsEnumSlot = 0 != pEnumValue; rOutStm << "// Slot Nr. " << ByteString::CreateFromInt32(nListPos).GetBuffer() << " : "; ByteString aSlotIdValue( ByteString::CreateFromInt32( GetSlotId().GetValue() ) ); @@ -1483,7 +1483,7 @@ void SvMetaSlot::WriteSlot( const ByteString & rShellName, USHORT nCount, pType = pMethod->GetType(); else pType = GetType(); - ULONG nSCount = pType->GetAttrCount(); + sal_uLong nSCount = pType->GetAttrCount(); rOutStm << ByteString::CreateFromInt32( nSCount ).GetBuffer() << "/*Count*/"; } else @@ -1498,7 +1498,7 @@ void SvMetaSlot::WriteSlot( const ByteString & rShellName, USHORT nCount, rOutStm << '.'; if ( !IsVariable() || !GetType() || GetType()->GetBaseType()->GetType() != TYPE_STRUCT ) - rOutStm << GetMangleName( FALSE ).GetBuffer(); + rOutStm << GetMangleName( sal_False ).GetBuffer(); rOutStm << "\","; } else @@ -1520,7 +1520,7 @@ void SvMetaSlot::WriteSlot( const ByteString & rShellName, USHORT nCount, // if ( GetUnoName().Len() ) { rOutStm << ",\""; - rOutStm << GetMangleName( FALSE ).GetBuffer(); + rOutStm << GetMangleName( sal_False ).GetBuffer(); //rOutStm << GetUnoName().GetBuffer(); rOutStm << "\""; } @@ -1530,7 +1530,7 @@ void SvMetaSlot::WriteSlot( const ByteString & rShellName, USHORT nCount, rOutStm << " )," << endl; } -USHORT SvMetaSlot::WriteSlotParamArray( SvIdlDataBase & rBase, SvStream & rOutStm ) +sal_uInt16 SvMetaSlot::WriteSlotParamArray( SvIdlDataBase & rBase, SvStream & rOutStm ) { if ( !GetExport() && !GetHidden() ) return 0; @@ -1549,7 +1549,7 @@ USHORT SvMetaSlot::WriteSlotParamArray( SvIdlDataBase & rBase, SvStream & rOutSt const SvMetaAttributeMemberList & rList = pType->GetAttrList(); - for( ULONG n = 0; n < rList.Count(); n++ ) + for( sal_uLong n = 0; n < rList.Count(); n++ ) { SvMetaAttribute * pPar = rList.GetObject( n ); SvMetaType * pPType = pPar->GetType(); @@ -1563,12 +1563,12 @@ USHORT SvMetaSlot::WriteSlotParamArray( SvIdlDataBase & rBase, SvStream & rOutSt if( !rBase.FindType( pPType, rBase.aUsedTypes ) ) rBase.aUsedTypes.Append( pPType ); } - return (USHORT)rList.Count(); + return (sal_uInt16)rList.Count(); } return 0; } -USHORT SvMetaSlot::WriteSlotMap( const ByteString & rShellName, USHORT nCount, +sal_uInt16 SvMetaSlot::WriteSlotMap( const ByteString & rShellName, sal_uInt16 nCount, SvSlotElementList& rSlotList, const ByteString & rPrefix, SvIdlDataBase & rBase, @@ -1577,7 +1577,7 @@ USHORT SvMetaSlot::WriteSlotMap( const ByteString & rShellName, USHORT nCount, // SlotId, wenn nicht angegeben, aus Namen generieren ByteString slotId = GetSlotId(); - USHORT nSCount = 0; + sal_uInt16 nSCount = 0; if( IsMethod() ) { SvMetaType * pType; @@ -1587,7 +1587,7 @@ USHORT SvMetaSlot::WriteSlotMap( const ByteString & rShellName, USHORT nCount, else pType = GetType(); - nSCount = (USHORT)pType->GetAttrCount(); + nSCount = (sal_uInt16)pType->GetAttrCount(); } WriteSlot( rShellName, nCount, slotId, rSlotList, rPrefix, rBase, rOutStm ); @@ -1603,7 +1603,7 @@ void SvMetaSlot::WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm, if (!GetToolBoxConfig() && !GetAccelConfig() && !GetMenuConfig() && !GetStatusBarConfig() ) return; - ULONG nSId = GetSlotId().GetValue(); + sal_uLong nSId = GetSlotId().GetValue(); if( !pTable->IsKeyValid( nSId ) ) { pTable->Insert( nSId, this ); @@ -1630,7 +1630,7 @@ void SvMetaSlot::WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm, SvMetaTypeEnum * pEnum = PTR_CAST( SvMetaTypeEnum, GetType() ); if( GetPseudoSlots() && pEnum ) { - for( ULONG n = 0; n < pEnum->Count(); n++ ) + for( sal_uLong n = 0; n < pEnum->Count(); n++ ) { ByteString aValName = pEnum->GetObject( n )->GetName(); ByteString aSId( GetSlotId() ); @@ -1639,12 +1639,12 @@ void SvMetaSlot::WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm, aSId += '_'; aSId += aValName.Copy( pEnum->GetPrefix().Len() ); - ULONG nSId2; - BOOL bIdOk = FALSE; + sal_uLong nSId2; + sal_Bool bIdOk = sal_False; if( rBase.FindId( aSId, &nSId2 ) ) { aSId = ByteString::CreateFromInt32( nSId2 ); - bIdOk = TRUE; + bIdOk = sal_True; } // wenn Id nicht gefunden, immer schreiben @@ -1672,7 +1672,7 @@ void SvMetaSlot::WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm, void SvMetaSlot::WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm, Table * pTable ) { - ULONG nSId = GetSlotId().GetValue(); + sal_uLong nSId = GetSlotId().GetValue(); if( !pTable->IsKeyValid( nSId ) ) { pTable->Insert( nSId, this ); @@ -1682,7 +1682,7 @@ void SvMetaSlot::WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm, SvMetaTypeEnum * pEnum = PTR_CAST( SvMetaTypeEnum, GetType() ); if( GetPseudoSlots() && pEnum ) { - for( ULONG n = 0; n < pEnum->Count(); n++ ) + for( sal_uLong n = 0; n < pEnum->Count(); n++ ) { ByteString aValName = pEnum->GetObject( n )->GetName(); ByteString aSId( GetSlotId() ); @@ -1691,12 +1691,12 @@ void SvMetaSlot::WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm, aSId += '_'; aSId += aValName.Copy( pEnum->GetPrefix().Len() ); - ULONG nSId2; - BOOL bIdOk = FALSE; + sal_uLong nSId2; + sal_Bool bIdOk = sal_False; if( rBase.FindId( aSId, &nSId2 ) ) { aSId = ByteString::CreateFromInt32( nSId2 ); - bIdOk = TRUE; + bIdOk = sal_True; } // wenn Id nicht gefunden, immer schreiben @@ -1711,12 +1711,12 @@ void SvMetaSlot::WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm, } } -void WriteBool( BOOL bSet, SvStream& rStream ) +void WriteBool( sal_Bool bSet, SvStream& rStream ) { if ( bSet ) - rStream << "TRUE" << ','; + rStream << "sal_True" << ','; else - rStream << "FALSE" << ','; + rStream << "sal_False" << ','; } void SvMetaSlot::WriteCSV( SvIdlDataBase& rBase, SvStream& rStrm ) diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx index 3867d59cbea1..48b08da96962 100644..100755 --- a/idl/source/objects/types.cxx +++ b/idl/source/objects/types.cxx @@ -47,23 +47,23 @@ SV_IMPL_META_FACTORY1( SvMetaAttribute, SvMetaReference ); |* Beschreibung *************************************************************************/ SvMetaAttribute::SvMetaAttribute() - : aAutomation( TRUE, FALSE ) - , aExport( TRUE, FALSE ) - , aIsCollection ( FALSE, FALSE ) - , aReadOnlyDoc ( TRUE, FALSE ) - , aHidden( FALSE, FALSE ) - , bNewAttr( FALSE ) + : aAutomation( sal_True, sal_False ) + , aExport( sal_True, sal_False ) + , aIsCollection ( sal_False, sal_False ) + , aReadOnlyDoc ( sal_True, sal_False ) + , aHidden( sal_False, sal_False ) + , bNewAttr( sal_False ) { } SvMetaAttribute::SvMetaAttribute( SvMetaType * pType ) : aType( pType ) - , aAutomation( TRUE, FALSE ) - , aExport( TRUE, FALSE ) - , aIsCollection ( FALSE, FALSE) - , aReadOnlyDoc ( TRUE, FALSE) - , aHidden( FALSE, FALSE ) - , bNewAttr( FALSE ) + , aAutomation( sal_True, sal_False ) + , aExport( sal_True, sal_False ) + , aIsCollection ( sal_False, sal_False) + , aReadOnlyDoc ( sal_True, sal_False) + , aHidden( sal_False, sal_False ) + , bNewAttr( sal_False ) { } @@ -77,7 +77,7 @@ void SvMetaAttribute::Load( SvPersistStream & rStm ) { SvMetaReference::Load( rStm ); - BYTE nMask; + sal_uInt8 nMask; rStm >> nMask; if( nMask & 0x01 ) { @@ -99,7 +99,7 @@ void SvMetaAttribute::Save( SvPersistStream & rStm ) SvMetaReference::Save( rStm ); // Maske erstellen - BYTE nMask = 0; + sal_uInt8 nMask = 0; if( aType.Is() ) nMask |= 0x1; if( aSlotId.IsSet() ) nMask |= 0x2; if( aExport.IsSet() ) nMask |= 0x4; @@ -148,7 +148,7 @@ const SvNumberIdentifier & SvMetaAttribute::GetSlotId() const |* |* Beschreibung *************************************************************************/ -BOOL SvMetaAttribute::GetReadonly() const +sal_Bool SvMetaAttribute::GetReadonly() const { if( aReadonly.IsSet() || !GetRef() ) return aReadonly; return ((SvMetaAttribute *)GetRef())->GetReadonly(); @@ -159,7 +159,7 @@ BOOL SvMetaAttribute::GetReadonly() const |* |* Beschreibung *************************************************************************/ -BOOL SvMetaAttribute::GetExport() const +sal_Bool SvMetaAttribute::GetExport() const { if( aExport.IsSet() || !GetRef() ) return aExport; return ((SvMetaAttribute *)GetRef())->GetExport(); @@ -170,7 +170,7 @@ BOOL SvMetaAttribute::GetExport() const |* |* Beschreibung *************************************************************************/ -BOOL SvMetaAttribute::GetHidden() const +sal_Bool SvMetaAttribute::GetHidden() const { // Wenn Export gesetzt wurde, aber Hidden nicht, gilt der Default // aHidden = !aExport @@ -187,15 +187,15 @@ BOOL SvMetaAttribute::GetHidden() const |* |* Beschreibung *************************************************************************/ -BOOL SvMetaAttribute::GetAutomation() const +sal_Bool SvMetaAttribute::GetAutomation() const { if( aAutomation.IsSet() || !GetRef() ) return aAutomation; return ((SvMetaAttribute *)GetRef())->GetAutomation(); } -BOOL SvMetaAttribute::GetIsCollection() const +sal_Bool SvMetaAttribute::GetIsCollection() const { - BOOL bRet; + sal_Bool bRet; if( aIsCollection.IsSet() || !GetRef() ) { if ( aIsCollection.IsSet() ) @@ -210,7 +210,7 @@ BOOL SvMetaAttribute::GetIsCollection() const return ((SvMetaSlot *)GetRef())->GetIsCollection(); } -BOOL SvMetaAttribute::GetReadOnlyDoc() const +sal_Bool SvMetaAttribute::GetReadOnlyDoc() const { if( aReadOnlyDoc.IsSet() || !GetRef() ) return aReadOnlyDoc; return ((SvMetaSlot *)GetRef())->GetReadOnlyDoc(); @@ -223,20 +223,20 @@ BOOL SvMetaAttribute::GetReadOnlyDoc() const |* |* Beschreibung *************************************************************************/ -BOOL SvMetaAttribute::IsMethod() const +sal_Bool SvMetaAttribute::IsMethod() const { SvMetaType * pType = GetType(); DBG_ASSERT( pType, "no type for attribute" ); return pType->GetType() == TYPE_METHOD; } -BOOL SvMetaAttribute::IsVariable() const +sal_Bool SvMetaAttribute::IsVariable() const { SvMetaType * pType = GetType(); return pType->GetType() != TYPE_METHOD; } -ByteString SvMetaAttribute::GetMangleName( BOOL ) const +ByteString SvMetaAttribute::GetMangleName( sal_Bool ) const { return GetName(); } @@ -247,7 +247,7 @@ ByteString SvMetaAttribute::GetMangleName( BOOL ) const |* Beschreibung *************************************************************************/ /* -void SvMetaAttribute::FillSbxObject( SbxInfo * pInfo, USHORT nSbxFlags ) +void SvMetaAttribute::FillSbxObject( SbxInfo * pInfo, sal_uInt16 nSbxFlags ) { SvMetaType * pType = GetType(); DBG_ASSERT( pType, "no type for attribute" ); @@ -267,8 +267,8 @@ void SvMetaAttribute::FillSbxObject( SbxInfo * pInfo, USHORT nSbxFlags ) if( pBaseType->GetType() == TYPE_STRUCT ) { const SvMetaAttributeMemberList & rList = pBaseType->GetAttrList(); - ULONG nCount = rList.Count(); - for( ULONG i = 0; i < nCount; i++ ) + sal_uLong nCount = rList.Count(); + for( sal_uLong i = 0; i < nCount; i++ ) rList.GetObject( i )->FillSbxObject( pInfo, nSbxFlags ); } else @@ -284,7 +284,7 @@ void SvMetaAttribute::FillSbxObject( SbxInfo * pInfo, USHORT nSbxFlags ) *************************************************************************/ /* void SvMetaAttribute::FillSbxObject( SvIdlDataBase & rBase, - SbxObject * pObj, BOOL bVariable ) + SbxObject * pObj, sal_Bool bVariable ) { // keine Attribut fuer Automation if( !GetAutomation() || !GetExport() ) @@ -303,8 +303,8 @@ void SvMetaAttribute::FillSbxObject( SvIdlDataBase & rBase, if ( GetSlotId().Len() ) rBase.aStructSlotId = GetSlotId(); const SvMetaAttributeMemberList & rList = pBaseType->GetAttrList(); - ULONG nCount = rList.Count(); - for( ULONG i = 0; i < nCount; i++ ) + sal_uLong nCount = rList.Count(); + for( sal_uLong i = 0; i < nCount; i++ ) rList.GetObject( i )->FillSbxObject( rBase, pObj, bVariable ); rBase.aStructSlotId = aSlotId; } @@ -314,7 +314,7 @@ void SvMetaAttribute::FillSbxObject( SvIdlDataBase & rBase, //MI: pBaseType->GetSbxDataType() ); if ( GetReadonly() || IsMethod() ) xProp->ResetFlag( SBX_WRITE ); - xProp->SetUserData( MakeSlotValue( rBase, TRUE ) ); + xProp->SetUserData( MakeSlotValue( rBase, sal_True ) ); pType->FillSbxObject( xProp, bVariable ); pObj->Insert( &xProp ); @@ -327,7 +327,7 @@ void SvMetaAttribute::FillSbxObject( SvIdlDataBase & rBase, SbxMethodRef xMeth = new SbxMethod( GetName(), pRetBaseType->GetSbxDataType() ); xMeth->ResetFlag( SBX_WRITE ); - xMeth->SetUserData( MakeSlotValue( rBase, FALSE ) ); + xMeth->SetUserData( MakeSlotValue( rBase, sal_False ) ); pType->FillSbxObject( xMeth, bVariable ); pObj->Insert( &xMeth ); @@ -340,22 +340,22 @@ void SvMetaAttribute::FillSbxObject( SvIdlDataBase & rBase, |* |* Beschreibung *************************************************************************/ -BOOL SvMetaAttribute::Test( SvIdlDataBase & rBase, +sal_Bool SvMetaAttribute::Test( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { - BOOL bOk = TRUE; + sal_Bool bOk = sal_True; if( GetType()->IsItem() && !GetSlotId().IsSet() ) { rBase.SetError( "slot without id declared", rInStm.GetToken() ); rBase.WriteError( rInStm ); - bOk = FALSE; + bOk = sal_False; } /* if( !GetType()->IsItem() && GetSlotId().IsSet() ) { rBase.SetError( "slot without item declared", rInStm.GetToken() ); rBase.WriteError( rInStm ); - bOk = FALSE; + bOk = sal_False; } */ return bOk; @@ -366,20 +366,20 @@ BOOL SvMetaAttribute::Test( SvIdlDataBase & rBase, |* |* Beschreibung *************************************************************************/ -BOOL SvMetaAttribute::ReadSvIdl( SvIdlDataBase & rBase, +sal_Bool SvMetaAttribute::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { - UINT32 nTokPos = rInStm.Tell(); + sal_uInt32 nTokPos = rInStm.Tell(); if( !GetType() ) // Es wurde kein Typ im ctor mitgegeben aType = rBase.ReadKnownType( rInStm ); - BOOL bOk = FALSE; + sal_Bool bOk = sal_False; if( GetType() ) { ReadNameSvIdl( rBase, rInStm ); aSlotId.ReadSvIdl( rBase, rInStm ); - bOk = TRUE; + bOk = sal_True; SvToken * pTok = rInStm.GetToken(); if( bOk && pTok->IsChar() && pTok->GetChar() == '(' ) { @@ -408,7 +408,7 @@ void SvMetaAttribute::WriteSvIdl ( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab + sal_uInt16 nTab ) { SvMetaType * pType = GetType(); @@ -418,7 +418,7 @@ void SvMetaAttribute::WriteSvIdl rOutStm << ' ' << aSlotId.GetBuffer(); if( pType->GetType() == TYPE_METHOD ) pType->WriteMethodArgs( rBase, rOutStm, nTab, WRITE_IDL ); - ULONG nPos = rOutStm.Tell(); + sal_uLong nPos = rOutStm.Tell(); rOutStm << endl; SvMetaName::WriteSvIdl( rBase, rOutStm, nTab ); TestAndSeekSpaceOnly( rOutStm, nPos ); @@ -459,7 +459,7 @@ void SvMetaAttribute::WriteAttributesSvIdl ( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab + sal_uInt16 nTab ) { SvMetaReference::WriteAttributesSvIdl( rBase, rOutStm, nTab ); @@ -515,7 +515,7 @@ void SvMetaAttribute::WriteAttributesSvIdl *************************************************************************/ void SvMetaAttribute::WriteParam( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab, + sal_uInt16 nTab, WriteType nT ) { SvMetaType * pType = GetType(); @@ -529,8 +529,8 @@ void SvMetaAttribute::WriteParam( SvIdlDataBase & rBase, if( pBaseType->GetType() == TYPE_STRUCT ) { const SvMetaAttributeMemberList & rList = pBaseType->GetAttrList(); - ULONG nCount = rList.Count(); - for( ULONG i = 0; i < nCount; i++ ) + sal_uLong nCount = rList.Count(); + for( sal_uLong i = 0; i < nCount; i++ ) { rList.GetObject( i )->WriteParam( rBase, rOutStm, nTab, nT ); if( i+1<nCount ) @@ -584,10 +584,10 @@ void SvMetaAttribute::WriteParam( SvIdlDataBase & rBase, |* |* Beschreibung *************************************************************************/ -ULONG SvMetaAttribute::MakeSlotValue( SvIdlDataBase & rBase, BOOL bVar ) const +sal_uLong SvMetaAttribute::MakeSlotValue( SvIdlDataBase & rBase, sal_Bool bVar ) const { const SvNumberIdentifier & rId = GetSlotId(); - ULONG n = rId.GetValue(); + sal_uLong n = rId.GetValue(); if( rBase.aStructSlotId.Len() ) { n = n << 20; @@ -608,20 +608,20 @@ ULONG SvMetaAttribute::MakeSlotValue( SvIdlDataBase & rBase, BOOL bVar ) const |* Beschreibung *************************************************************************/ void SvMetaAttribute::WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab, + sal_uInt16 nTab, WriteType nT, WriteAttribute nA ) { if( nT == WRITE_ODL ) { const SvNumberIdentifier & rId = GetSlotId(); - BOOL bReadonly = GetReadonly() || ( nA & WA_READONLY ); + sal_Bool bReadonly = GetReadonly() || ( nA & WA_READONLY ); if( (rId.IsSet() && !(nA & WA_STRUCT)) || bReadonly ) { - BOOL bVar = IsVariable(); + sal_Bool bVar = IsVariable(); if( nA & WA_VARIABLE ) - bVar = TRUE; + bVar = sal_True; else if( nA & WA_METHOD ) - bVar = FALSE; + bVar = sal_False; WriteTab( rOutStm, nTab ); rOutStm << "//class SvMetaAttribute" << endl; @@ -647,14 +647,14 @@ void SvMetaAttribute::WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm |* Beschreibung *************************************************************************/ void SvMetaAttribute::WriteCSource( SvIdlDataBase & rBase, SvStream & rOutStm, - BOOL bSet ) + sal_Bool bSet ) { rOutStm << endl; SvMetaType * pType = GetType(); SvMetaType * pBaseType = pType->GetBaseType(); // Bei Set ist der Return immer void - BOOL bVoid = bSet; + sal_Bool bVoid = bSet; if( pBaseType->GetType() == TYPE_METHOD ) bVoid = pBaseType->GetReturnType()->GetBaseType()->GetName() == "void"; @@ -739,11 +739,11 @@ void SvMetaAttribute::WriteCSource( SvIdlDataBase & rBase, SvStream & rOutStm, |* Beschreibung *************************************************************************/ void SvMetaAttribute::WriteRecursiv_Impl( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab, + SvStream & rOutStm, sal_uInt16 nTab, WriteType nT, WriteAttribute nA ) { const SvMetaAttributeMemberList & rList = GetType()->GetBaseType()->GetAttrList(); - ULONG nCount = rList.Count(); + sal_uLong nCount = rList.Count(); SvNumberIdentifier slotId = rBase.aStructSlotId; if ( GetSlotId().Len() ) @@ -754,7 +754,7 @@ void SvMetaAttribute::WriteRecursiv_Impl( SvIdlDataBase & rBase, if ( GetReadonly() ) nA |= WA_READONLY; - for( ULONG i = 0; i < nCount; i++ ) + for( sal_uLong i = 0; i < nCount; i++ ) { SvMetaAttribute *pAttr = rList.GetObject( i ); if ( nT == WRITE_DOCU ) @@ -773,7 +773,7 @@ void SvMetaAttribute::WriteRecursiv_Impl( SvIdlDataBase & rBase, |* Beschreibung *************************************************************************/ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab, + sal_uInt16 nTab, WriteType nT, WriteAttribute nA ) { // keine Attribut fuer Automation @@ -785,11 +785,11 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm, else if ( !GetAutomation() || !GetExport() ) return; - BOOL bVariable; + sal_Bool bVariable; if( nA & WA_VARIABLE ) - bVariable = TRUE; + bVariable = sal_True; else if( nA & WA_METHOD ) - bVariable = FALSE; + bVariable = sal_False; else bVariable = IsVariable(); @@ -839,7 +839,7 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm, if( nT == WRITE_C_HEADER ) rOutStm << ';' << endl << endl; else - WriteCSource( rBase, rOutStm, FALSE ); + WriteCSource( rBase, rOutStm, sal_False ); } else if ( bVariable && IsVariable() ) { @@ -853,10 +853,10 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm, else { // Beispiel - // void SetValue( C_Object *, USHORT n ); + // void SetValue( C_Object *, sal_uInt16 n ); ByteString name = GetName(); - BOOL bReadonly = GetReadonly() || ( nA & WA_READONLY ); + sal_Bool bReadonly = GetReadonly() || ( nA & WA_READONLY ); if ( !bReadonly && !IsMethod() ) { // Zuweisung @@ -874,7 +874,7 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm, if( nT == WRITE_C_HEADER ) rOutStm << ';' << endl << endl; else - WriteCSource( rBase, rOutStm, TRUE ); + WriteCSource( rBase, rOutStm, sal_True ); } // Zugriff @@ -890,7 +890,7 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm, if( nT == WRITE_C_HEADER ) rOutStm << ';' << endl << endl; else - WriteCSource( rBase, rOutStm, FALSE ); + WriteCSource( rBase, rOutStm, sal_False ); } } } @@ -970,7 +970,7 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm, |* |* Beschreibung *************************************************************************/ -ULONG SvMetaAttribute::MakeSfx( ByteString * pAttrArray ) +sal_uLong SvMetaAttribute::MakeSfx( ByteString * pAttrArray ) { SvMetaType * pType = GetType(); DBG_ASSERT( pType, "no type for attribute" ); @@ -1017,13 +1017,13 @@ SV_IMPL_META_FACTORY1( SvMetaType, SvMetaExtern ); |* Beschreibung *************************************************************************/ #define CTOR \ - : aCall0( CALL_VALUE, FALSE ) \ - , aCall1( CALL_VALUE, FALSE ) \ - , aSbxDataType( 0, FALSE ) \ + : aCall0( CALL_VALUE, sal_False ) \ + , aCall1( CALL_VALUE, sal_False ) \ + , aSbxDataType( 0, sal_False ) \ , pAttrList( NULL ) \ , nType( TYPE_BASE ) \ - , bIsItem( FALSE ) \ - , bIsShell( FALSE ) \ + , bIsItem( sal_False ) \ + , bIsShell( sal_False ) \ , cParserChar( 'h' ) SvMetaType::SvMetaType() @@ -1063,7 +1063,7 @@ void SvMetaType::Load( SvPersistStream & rStm ) { SvMetaExtern::Load( rStm ); - USHORT nMask; + sal_uInt16 nMask; rStm >> nMask; if( nMask & 0x0001 ) rStm >> aIn; if( nMask & 0x0002 ) rStm >> aOut; @@ -1074,11 +1074,11 @@ void SvMetaType::Load( SvPersistStream & rStm ) if( nMask & 0x0040 ) rStm >> aSbxName; if( nMask & 0x0080 ) rStm >> aOdlName; if( nMask & 0x0100 ) rStm >> GetAttrList(); - if( nMask & 0x0200 ) bIsItem = TRUE; - if( nMask & 0x0400 ) bIsShell = TRUE; + if( nMask & 0x0200 ) bIsItem = sal_True; + if( nMask & 0x0400 ) bIsShell = sal_True; if( nMask & 0x0800 ) { - USHORT nT; + sal_uInt16 nT; rStm >> nT; nType = nT; } @@ -1093,7 +1093,7 @@ void SvMetaType::Save( SvPersistStream & rStm ) SvMetaExtern::Save( rStm ); // Maske erstellen - USHORT nMask = 0; + sal_uInt16 nMask = 0; if( aIn.IsSet() ) nMask |= 0x0001; if( aOut.IsSet() ) nMask |= 0x0002; if( aCall0.IsSet() ) nMask |= 0x0004; @@ -1122,7 +1122,7 @@ void SvMetaType::Save( SvPersistStream & rStm ) if( nMask & 0x0040 ) rStm << aSbxName; if( nMask & 0x0080 ) rStm << aOdlName; if( nMask & 0x0100 ) rStm << *pAttrList; - if( nMask & 0x0800 ) rStm << (USHORT)nType; + if( nMask & 0x0800 ) rStm << (sal_uInt16)nType; if( nMask & 0x1000 ) rStm << cParserChar; if( nMask & 0x2000 ) rStm << aCName; if( nMask & 0x4000 ) rStm << aBasicName; @@ -1245,7 +1245,7 @@ ByteString SvMetaType::GetBasicPostfix() const |* |* Beschreibung *************************************************************************/ -BOOL SvMetaType::GetIn() const +sal_Bool SvMetaType::GetIn() const { if( aIn.IsSet() || !GetRef() ) return aIn; @@ -1258,7 +1258,7 @@ BOOL SvMetaType::GetIn() const |* |* Beschreibung *************************************************************************/ -BOOL SvMetaType::GetOut() const +sal_Bool SvMetaType::GetOut() const { if( aOut.IsSet() || !GetRef() ) return aOut; @@ -1391,7 +1391,7 @@ const ByteString & SvMetaType::GetCName() const |* |* Beschreibung *************************************************************************/ -BOOL SvMetaType::SetName( const ByteString & rName, SvIdlDataBase * pBase ) +sal_Bool SvMetaType::SetName( const ByteString & rName, SvIdlDataBase * pBase ) { aSvName = rName; aSbxName = rName; @@ -1407,13 +1407,13 @@ BOOL SvMetaType::SetName( const ByteString & rName, SvIdlDataBase * pBase ) |* Beschreibung *************************************************************************/ /* -void SvMetaType::FillSbxObject( SbxVariable * pObj, BOOL bVariable ) +void SvMetaType::FillSbxObject( SbxVariable * pObj, sal_Bool bVariable ) { if( PTR_CAST( SbxMethod, pObj ) ) { if( GetType() == TYPE_METHOD ) { - ULONG nCount = GetAttrCount(); + sal_uLong nCount = GetAttrCount(); if( nCount ) { SbxInfoRef xInfo = pObj->GetInfo(); @@ -1422,7 +1422,7 @@ void SvMetaType::FillSbxObject( SbxVariable * pObj, BOOL bVariable ) xInfo = new SbxInfo(); pObj->SetInfo( xInfo ); } - for( ULONG n = nCount; n > 0; n-- ) + for( sal_uLong n = nCount; n > 0; n-- ) pAttrList->GetObject( n -1 )->FillSbxObject( xInfo ); } } @@ -1454,18 +1454,18 @@ ByteString SvMetaType::GetCString() const |* |* Beschreibung *************************************************************************/ -BOOL SvMetaType::ReadHeaderSvIdl( SvIdlDataBase & rBase, +sal_Bool SvMetaType::ReadHeaderSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { - BOOL bOk = FALSE; - UINT32 nTokPos = rInStm.Tell(); + sal_Bool bOk = sal_False; + sal_uInt32 nTokPos = rInStm.Tell(); SvToken * pTok = rInStm.GetToken_Next(); if( pTok->Is( SvHash_interface() ) || pTok->Is( SvHash_shell() ) ) { if( pTok->Is( SvHash_shell() ) ) - bIsShell = TRUE; + bIsShell = sal_True; SetType( TYPE_CLASS ); bOk = ReadNamesSvIdl( rBase, rInStm ); @@ -1479,7 +1479,7 @@ BOOL SvMetaType::ReadHeaderSvIdl( SvIdlDataBase & rBase, { SetType( TYPE_UNION ); if( ReadNameSvIdl( rBase, rInStm ) ) - return TRUE; + return sal_True; } else if( pTok->Is( SvHash_enum() ) ) { @@ -1490,7 +1490,7 @@ BOOL SvMetaType::ReadHeaderSvIdl( SvIdlDataBase & rBase, || pTok->Is( SvHash_item() ) ) { if( pTok->Is( SvHash_item() ) ) - bIsItem = TRUE; + bIsItem = sal_True; SvMetaType * pType = rBase.ReadKnownType( rInStm ); if( pType ) @@ -1508,12 +1508,12 @@ BOOL SvMetaType::ReadHeaderSvIdl( SvIdlDataBase & rBase, if( rInStm.Read( ')' ) ) { SetType( TYPE_METHOD ); - bOk = TRUE; + bOk = sal_True; } } else { - bOk = TRUE; + bOk = sal_True; } } } @@ -1536,7 +1536,7 @@ BOOL SvMetaType::ReadHeaderSvIdl( SvIdlDataBase & rBase, |* |* Beschreibung *************************************************************************/ -BOOL SvMetaType::ReadSvIdl( SvIdlDataBase & rBase, +sal_Bool SvMetaType::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { if( ReadHeaderSvIdl( rBase, rInStm ) ) @@ -1544,7 +1544,7 @@ BOOL SvMetaType::ReadSvIdl( SvIdlDataBase & rBase, rBase.Write( '.' ); return SvMetaExtern::ReadSvIdl( rBase, rInStm ); } - return FALSE; + return sal_False; } /************************************************************************* @@ -1556,14 +1556,14 @@ void SvMetaType::WriteSvIdl ( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab + sal_uInt16 nTab ) { WriteHeaderSvIdl( rBase, rOutStm, nTab ); if( GetType() == TYPE_METHOD ) WriteMethodArgs( rBase, rOutStm, nTab, WRITE_IDL ); - ULONG nOldPos = rOutStm.Tell(); + sal_uLong nOldPos = rOutStm.Tell(); rOutStm << endl; SvMetaExtern::WriteSvIdl( rBase, rOutStm, nTab ); if( TestAndSeekSpaceOnly( rOutStm, nOldPos ) ) @@ -1578,7 +1578,7 @@ void SvMetaType::WriteSvIdl |* Beschreibung *************************************************************************/ void SvMetaType::WriteContext( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab, + sal_uInt16 nTab, WriteType nT, WriteAttribute nA ) { if( GetAttrCount() ) @@ -1602,7 +1602,7 @@ void SvMetaType::WriteContext( SvIdlDataBase & rBase, SvStream & rOutStm, |* Beschreibung *************************************************************************/ void SvMetaType::Write( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab, + sal_uInt16 nTab, WriteType nT, WriteAttribute nA ) { if( nT == WRITE_C_HEADER && nType != TYPE_ENUM ) @@ -1686,14 +1686,14 @@ void SvMetaType::Write( SvIdlDataBase & rBase, SvStream & rOutStm, |* |* Beschreibung *************************************************************************/ -BOOL SvMetaType::ReadNamesSvIdl( SvIdlDataBase & rBase, +sal_Bool SvMetaType::ReadNamesSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { - BOOL bOk = ReadNameSvIdl( rBase, rInStm ); + sal_Bool bOk = ReadNameSvIdl( rBase, rInStm ); /* if( bOk ) { - UINT32 nTokPos = rInStm.Tell(); + sal_uInt32 nTokPos = rInStm.Tell(); SvToken * pTok = rInStm.GetToken_Next(); if( pTok->IsIdentifier() ) @@ -1721,7 +1721,7 @@ BOOL SvMetaType::ReadNamesSvIdl( SvIdlDataBase & rBase, *************************************************************************/ void SvMetaType::WriteHeaderSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab ) + sal_uInt16 nTab ) { switch( nType ) { @@ -1800,7 +1800,7 @@ void SvMetaType::ReadAttributesSvIdl( SvIdlDataBase & rBase, *************************************************************************/ void SvMetaType::WriteAttributesSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab ) + sal_uInt16 nTab ) { SvMetaExtern::WriteAttributesSvIdl( rBase, rOutStm, nTab ); ByteString name = GetName(); @@ -1854,7 +1854,7 @@ void SvMetaType::WriteContextSvIdl ( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab + sal_uInt16 nTab ) { if( GetAttrCount() ) @@ -1879,7 +1879,7 @@ void SvMetaType::WriteContextSvIdl |* Beschreibung *************************************************************************/ void SvMetaType::WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab, + sal_uInt16 nTab, WriteType nT, WriteAttribute nA ) { SvMetaExtern::WriteAttributes( rBase, rOutStm, nTab, nT, nA ); @@ -1890,15 +1890,15 @@ void SvMetaType::WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm, |* |* Beschreibung *************************************************************************/ -ULONG SvMetaType::MakeSfx( ByteString * pAttrArray ) +sal_uLong SvMetaType::MakeSfx( ByteString * pAttrArray ) { - ULONG nC = 0; + sal_uLong nC = 0; if( GetBaseType()->GetType() == TYPE_STRUCT ) { - ULONG nAttrCount = GetAttrCount(); + sal_uLong nAttrCount = GetAttrCount(); // Die einzelnen Attribute schreiben - for( ULONG n = 0; n < nAttrCount; n++ ) + for( sal_uLong n = 0; n < nAttrCount; n++ ) { nC += pAttrList->GetObject( n )->MakeSfx( pAttrArray ); if( n +1 < nAttrCount ) @@ -1918,8 +1918,8 @@ void SvMetaType::WriteSfxItem( ByteString aTypeName = "SfxType"; ByteString aAttrArray; - ULONG nAttrCount = MakeSfx( &aAttrArray ); - //ULONG nAttrCount = GetAttrCount(); + sal_uLong nAttrCount = MakeSfx( &aAttrArray ); + //sal_uLong nAttrCount = GetAttrCount(); ByteString aAttrCount( ByteString::CreateFromInt32( nAttrCount ) ); aTypeName += aAttrCount; @@ -1965,10 +1965,10 @@ void SvMetaType::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) |* |* Beschreibung *************************************************************************/ -BOOL SvMetaType::ReadMethodArgs( SvIdlDataBase & rBase, +sal_Bool SvMetaType::ReadMethodArgs( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { - UINT32 nTokPos = rInStm.Tell(); + sal_uInt32 nTokPos = rInStm.Tell(); if( rInStm.Read( '(' ) ) { //DoReadContextSvIdl( rBase, rInStm, ',' ); @@ -1976,11 +1976,11 @@ BOOL SvMetaType::ReadMethodArgs( SvIdlDataBase & rBase, if( rInStm.Read( ')' ) ) { SetType( TYPE_METHOD ); - return TRUE; + return sal_True; } } rInStm.Seek( nTokPos ); - return FALSE; + return sal_False; } /************************************************************************* @@ -1992,7 +1992,7 @@ void SvMetaType::WriteMethodArgs ( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab, WriteType nT + sal_uInt16 nTab, WriteType nT ) { if( nT == WRITE_IDL ) @@ -2068,7 +2068,7 @@ void SvMetaType::WriteMethodArgs default: { - DBG_ASSERT( FALSE, "WriteType not implemented" ); + DBG_ASSERT( sal_False, "WriteType not implemented" ); } } pAttr = pAttrList->Next(); @@ -2092,7 +2092,7 @@ void SvMetaType::WriteMethodArgs |* Beschreibung *************************************************************************/ void SvMetaType::WriteTypePrefix( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab, WriteType nT ) + sal_uInt16 nTab, WriteType nT ) { switch( nT ) { @@ -2110,8 +2110,8 @@ void SvMetaType::WriteTypePrefix( SvIdlDataBase & rBase, SvStream & rOutStm, case WRITE_ODL: { - BOOL bIn = GetIn(); - BOOL bOut = GetOut(); + sal_Bool bIn = GetIn(); + sal_Bool bOut = GetOut(); if( bIn || bOut ) { if( bIn && bOut ) @@ -2198,7 +2198,7 @@ void SvMetaType::WriteTypePrefix( SvIdlDataBase & rBase, SvStream & rOutStm, default: { - DBG_ASSERT( FALSE, "WriteType not implemented" ); + DBG_ASSERT( sal_False, "WriteType not implemented" ); } } } @@ -2209,7 +2209,7 @@ void SvMetaType::WriteTypePrefix( SvIdlDataBase & rBase, SvStream & rOutStm, |* Beschreibung *************************************************************************/ void SvMetaType::WriteTheType( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab, WriteType nT ) + sal_uInt16 nTab, WriteType nT ) { WriteTypePrefix( rBase, rOutStm, nTab, nT ); if( GetType() == TYPE_METHOD ) @@ -2232,9 +2232,9 @@ ByteString SvMetaType::GetParserString() const if( TYPE_METHOD == type || TYPE_STRUCT == type ) { - ULONG nAttrCount = GetAttrCount(); + sal_uLong nAttrCount = GetAttrCount(); // Die einzelnen Attribute schreiben - for( ULONG n = 0; n < nAttrCount; n++ ) + for( sal_uLong n = 0; n < nAttrCount; n++ ) { SvMetaAttribute * pT = pAttrList->GetObject( n ); aPStr += pT->GetType()->GetParserString(); @@ -2264,9 +2264,9 @@ void SvMetaType::WriteParamNames( SvIdlDataBase & rBase, if( TYPE_METHOD == type || TYPE_STRUCT == type ) { - ULONG nAttrCount = GetAttrCount(); + sal_uLong nAttrCount = GetAttrCount(); // Die einzelnen Attribute schreiben - for( ULONG n = 0; n < nAttrCount; n++ ) + for( sal_uLong n = 0; n < nAttrCount; n++ ) { SvMetaAttribute * pA = pAttrList->GetObject( n ); // Fuer Methoden ist rChief immer "" @@ -2329,7 +2329,7 @@ void SvMetaEnumValue::Load( SvPersistStream & rStm ) { SvMetaName::Load( rStm ); - BYTE nMask; + sal_uInt8 nMask; rStm >> nMask; if( nMask >= 0x02 ) { @@ -2345,7 +2345,7 @@ void SvMetaEnumValue::Save( SvPersistStream & rStm ) SvMetaName::Save( rStm ); // Maske erstellen - BYTE nMask = 0; + sal_uInt8 nMask = 0; if( aEnumValue.Len() ) nMask |= 0x01; // Daten schreiben @@ -2361,12 +2361,12 @@ void SvMetaEnumValue::Save( SvPersistStream & rStm ) |* Beschreibung |* *************************************************************************/ -BOOL SvMetaEnumValue::ReadSvIdl( SvIdlDataBase & rBase, +sal_Bool SvMetaEnumValue::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { if( !ReadNameSvIdl( rBase, rInStm ) ) - return FALSE; - return TRUE; + return sal_False; + return sal_True; } /************************************************************************* @@ -2376,7 +2376,7 @@ BOOL SvMetaEnumValue::ReadSvIdl( SvIdlDataBase & rBase, |* Beschreibung |* *************************************************************************/ -void SvMetaEnumValue::WriteSvIdl( SvIdlDataBase &, SvStream & rOutStm, USHORT ) +void SvMetaEnumValue::WriteSvIdl( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16 ) { rOutStm << GetName().GetBuffer(); } @@ -2388,7 +2388,7 @@ void SvMetaEnumValue::WriteSvIdl( SvIdlDataBase &, SvStream & rOutStm, USHORT ) |* Beschreibung |* *************************************************************************/ -void SvMetaEnumValue::Write( SvIdlDataBase &, SvStream & rOutStm, USHORT, +void SvMetaEnumValue::Write( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16, WriteType nT, WriteAttribute ) { if ( nT == WRITE_C_HEADER || nT == WRITE_C_SOURCE ) @@ -2417,7 +2417,7 @@ void SvMetaTypeEnum::Load( SvPersistStream & rStm ) { SvMetaType::Load( rStm ); - BYTE nMask; + sal_uInt8 nMask; rStm >> nMask; if( nMask >= 0x04 ) { @@ -2434,7 +2434,7 @@ void SvMetaTypeEnum::Save( SvPersistStream & rStm ) SvMetaType::Save( rStm ); // Maske erstellen - BYTE nMask = 0; + sal_uInt8 nMask = 0; if( aEnumValueList.Count() ) nMask |= 0x01; if( aPrefix.Len() ) nMask |= 0x02; @@ -2452,10 +2452,10 @@ void SvMetaTypeEnum::Save( SvPersistStream & rStm ) |* *************************************************************************/ /* -USHORT SvMetaTypeEnum::GetMaxValue() const +sal_uInt16 SvMetaTypeEnum::GetMaxValue() const { - USHORT nMax = 0; - for( ULONG n = 0; n < aEnumValueList.Count(); n++ ) + sal_uInt16 nMax = 0; + for( sal_uLong n = 0; n < aEnumValueList.Count(); n++ ) { SvMetaEnumValue * pObj = aEnumValueList.GetObject( n ); if( nMax < pObj->GetValue() ) @@ -2476,10 +2476,10 @@ USHORT SvMetaTypeEnum::GetMaxValue() const void SvMetaTypeEnum::ReadContextSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { - UINT32 nTokPos = rInStm.Tell(); + sal_uInt32 nTokPos = rInStm.Tell(); SvMetaEnumValueRef aEnumVal = new SvMetaEnumValue(); - BOOL bOk = aEnumVal->ReadSvIdl( rBase, rInStm ); + sal_Bool bOk = aEnumVal->ReadSvIdl( rBase, rInStm ); if( bOk ) { if( 0 == aEnumValueList.Count() ) @@ -2487,7 +2487,7 @@ void SvMetaTypeEnum::ReadContextSvIdl( SvIdlDataBase & rBase, aPrefix = aEnumVal->GetName(); else { - USHORT nPos = aPrefix.Match( aEnumVal->GetName() ); + sal_uInt16 nPos = aPrefix.Match( aEnumVal->GetName() ); if( nPos != aPrefix.Len() && nPos != STRING_MATCH ) aPrefix.Erase( nPos ); } @@ -2506,10 +2506,10 @@ void SvMetaTypeEnum::ReadContextSvIdl( SvIdlDataBase & rBase, *************************************************************************/ void SvMetaTypeEnum::WriteContextSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab ) + sal_uInt16 nTab ) { WriteTab( rOutStm, nTab +1 ); - for( ULONG n = 0; n < aEnumValueList.Count(); n++ ) + for( sal_uLong n = 0; n < aEnumValueList.Count(); n++ ) { aEnumValueList.GetObject( n )->WriteSvIdl( rBase, rOutStm, nTab ); if( n +1 != aEnumValueList.Count() ) @@ -2526,18 +2526,18 @@ void SvMetaTypeEnum::WriteContextSvIdl( SvIdlDataBase & rBase, |* Beschreibung |* *************************************************************************/ -BOOL SvMetaTypeEnum::ReadSvIdl( SvIdlDataBase & rBase, +sal_Bool SvMetaTypeEnum::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { - UINT32 nTokPos = rInStm.Tell(); + sal_uInt32 nTokPos = rInStm.Tell(); if( SvMetaType::ReadHeaderSvIdl( rBase, rInStm ) && GetType() == TYPE_ENUM ) { if( SvMetaName::ReadSvIdl( rBase, rInStm ) ) - return TRUE; + return sal_True; } rInStm.Seek( nTokPos ); - return FALSE; + return sal_False; } /************************************************************************* @@ -2548,7 +2548,7 @@ BOOL SvMetaTypeEnum::ReadSvIdl( SvIdlDataBase & rBase, |* *************************************************************************/ void SvMetaTypeEnum::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab ) + sal_uInt16 nTab ) { WriteHeaderSvIdl( rBase, rOutStm, nTab ); rOutStm << endl; @@ -2564,7 +2564,7 @@ void SvMetaTypeEnum::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, |* *************************************************************************/ void SvMetaTypeEnum::Write( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab, + sal_uInt16 nTab, WriteType nT, WriteAttribute nA ) { SvMetaType::Write( rBase, rOutStm, nTab, nT, nA ); @@ -2576,11 +2576,11 @@ void SvMetaTypeEnum::Write( SvIdlDataBase & rBase, SvStream & rOutStm, |* Beschreibung *************************************************************************/ void SvMetaTypeEnum::WriteContext( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab, + sal_uInt16 nTab, WriteType nT, WriteAttribute nA ) { WriteTab( rOutStm, nTab +1 ); - for( ULONG n = 0; n < aEnumValueList.Count(); n++ ) + for( sal_uLong n = 0; n < aEnumValueList.Count(); n++ ) { aEnumValueList.GetObject( n )->Write( rBase, rOutStm, nTab +1, nT, nA ); @@ -2645,7 +2645,7 @@ ByteString SvMetaAttribute::Compare( SvMetaAttribute* pAttr ) if ( aType->GetAttrCount() ) { - ULONG nCount = aType->GetAttrCount(); + sal_uLong nCount = aType->GetAttrCount(); SvMetaAttributeMemberList& rList = aType->GetAttrList(); SvMetaAttributeMemberList& rOtherList = pAttr->GetType()->GetAttrList(); if ( pAttr->GetType()->GetAttrCount() != nCount ) @@ -2654,7 +2654,7 @@ ByteString SvMetaAttribute::Compare( SvMetaAttribute* pAttr ) } else { - for ( USHORT n=0; n<nCount; n++ ) + for ( sal_uInt16 n=0; n<nCount; n++ ) { SvMetaAttribute *pAttr1 = rList.GetObject(n); SvMetaAttribute *pAttr2 = rOtherList.GetObject(n); diff --git a/idl/source/prj/command.cxx b/idl/source/prj/command.cxx index ce2025856676..616ed98d182a 100644..100755 --- a/idl/source/prj/command.cxx +++ b/idl/source/prj/command.cxx @@ -169,9 +169,9 @@ void DeInit() |* Beschreibung |* *************************************************************************/ -BOOL ReadIdl( SvIdlWorkingBase * pDataBase, const SvCommand & rCommand ) +sal_Bool ReadIdl( SvIdlWorkingBase * pDataBase, const SvCommand & rCommand ) { - for( USHORT n = 0; n < rCommand.aInFileList.Count(); n++ ) + for( sal_uInt16 n = 0; n < rCommand.aInFileList.Count(); n++ ) { String aFileName ( *rCommand.aInFileList.GetObject( n ) ); SvFileStream aStm( aFileName, STREAM_STD_READ | STREAM_NOCREATE ); @@ -191,24 +191,24 @@ BOOL ReadIdl( SvIdlWorkingBase * pDataBase, const SvCommand & rCommand ) aStr = "error during load, file "; aStr += ByteString( aFileName, RTL_TEXTENCODING_UTF8 ); fprintf( stderr, "%s\n", aStr.GetBuffer() ); - return FALSE; + return sal_False; } } else { SvTokenStream aTokStm( aStm, aFileName ); - if( !pDataBase->ReadSvIdl( aTokStm, FALSE, rCommand.aPath ) ) - return FALSE; + if( !pDataBase->ReadSvIdl( aTokStm, sal_False, rCommand.aPath ) ) + return sal_False; } } else { const ByteString aStr( aFileName, RTL_TEXTENCODING_UTF8 ); fprintf( stderr, "unable to read input file: %s\n", aStr.GetBuffer() ); - return FALSE; + return sal_False; } } - return TRUE; + return sal_True; } /************************************************************************* @@ -218,7 +218,7 @@ BOOL ReadIdl( SvIdlWorkingBase * pDataBase, const SvCommand & rCommand ) |* Beschreibung |* *************************************************************************/ -static BOOL ResponseFile( StringList * pList, int argc, char ** argv ) +static sal_Bool ResponseFile( StringList * pList, int argc, char ** argv ) { // Programmname pList->Insert( new String( String::CreateFromAscii(*argv) ), LIST_APPEND ); @@ -228,13 +228,13 @@ static BOOL ResponseFile( StringList * pList, int argc, char ** argv ) { // wenn @, dann Response-Datei SvFileStream aStm( String::CreateFromAscii((*(argv +i)) +1), STREAM_STD_READ | STREAM_NOCREATE ); if( aStm.GetError() != SVSTREAM_OK ) - return FALSE; + return sal_False; ByteString aStr; while( aStm.ReadLine( aStr ) ) { - USHORT n = 0; - USHORT nPos = 1; + sal_uInt16 n = 0; + sal_uInt16 nPos = 1; while( n != nPos ) { while( aStr.GetChar(n) && isspace( aStr.GetChar(n) ) ) @@ -250,7 +250,7 @@ static BOOL ResponseFile( StringList * pList, int argc, char ** argv ) else if( argv[ i ] ) pList->Insert( new String( String::CreateFromAscii( argv[ i ] ) ), LIST_APPEND ); } - return TRUE; + return sal_True; } /************************************************************************* @@ -264,7 +264,7 @@ SvCommand::SvCommand( int argc, char ** argv ) StringList aList; if( ResponseFile( &aList, argc, argv ) ) - for( ULONG i = 1; i < aList.Count(); i++ ) + for( sal_uLong i = 1; i < aList.Count(); i++ ) { String aParam( *aList.GetObject( i ) ); sal_Unicode aFirstChar( aParam.GetChar(0) ); diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx index 06e7e2d7c69c..dd199ea4261d 100644..100755 --- a/idl/source/prj/database.cxx +++ b/idl/source/prj/database.cxx @@ -44,7 +44,7 @@ *************************************************************************/ /* void PrimeNumber(){ - USHORT i, n; + sal_uInt16 i, n; for( i = 5001; i < 5500; i += 2 ){ for( n = 2; n < i && ((i % n) != 0); n++ ); if( n == i ){ @@ -56,10 +56,10 @@ void PrimeNumber(){ */ SvIdlDataBase::SvIdlDataBase( const SvCommand& rCmd ) - : bExport( FALSE ) + : bExport( sal_False ) , nUniqueId( 0 ) , nVerbosity( rCmd.nVerbosity ) - , bIsModified( FALSE ) + , bIsModified( sal_False ) , aPersStream( *IDLAPP->pClassMgr, NULL ) , pIdTable( NULL ) { @@ -111,8 +111,9 @@ SvMetaTypeMemberList & SvIdlDataBase::GetTypeList() ADD_TYPE( double, "double", 'F', "double", "Double", "#" ); ADD_TYPE( SbxObject, "VARIANT", 'o', "C_Object", "Object", "" ); + // A c h t u n g !!!, bei hinzufuegen von Typen werden alle - // binren Datenbasen inkompatibel + // bin�ren Datenbasen inkompatibel /* // So tun als ob die Init-Daten auf einem Stream gelesen wurden @@ -138,7 +139,7 @@ SvMetaTypeMemberList & SvIdlDataBase::GetTypeList() *************************************************************************/ SvMetaModule * SvIdlDataBase::GetModule( const ByteString & rName ) { - for( ULONG n = 0; n < aModuleList.Count(); n++ ) + for( sal_uLong n = 0; n < aModuleList.Count(); n++ ) if( aModuleList.GetObject( n )->GetName() == rName ) return aModuleList.GetObject( n ); return NULL; @@ -151,12 +152,12 @@ SvMetaModule * SvIdlDataBase::GetModule( const ByteString & rName ) |* Beschreibung |* *************************************************************************/ -#define DATABASE_SIGNATURE (UINT32)0x13B799F2 +#define DATABASE_SIGNATURE (sal_uInt32)0x13B799F2 #define DATABASE_VER 0x0006 -BOOL SvIdlDataBase::IsBinaryFormat( SvStream & rStm ) +sal_Bool SvIdlDataBase::IsBinaryFormat( SvStream & rStm ) { - UINT32 nSig = 0; - ULONG nPos = rStm.Tell(); + sal_uInt32 nSig = 0; + sal_uLong nPos = rStm.Tell(); rStm >> nSig; rStm.Seek( nPos ); @@ -175,8 +176,8 @@ void SvIdlDataBase::Load( SvStream & rStm ) DBG_ASSERT( aTypeList.Count() == 0, "type list already initialized" ); SvPersistStream aPStm( *IDLAPP->pClassMgr, &rStm ); - USHORT nVersion = 0; - UINT32 nSig = 0; + sal_uInt16 nVersion = 0; + sal_uInt32 nSig = 0; aPStm >> nSig; aPStm >> nVersion; @@ -205,22 +206,22 @@ void SvIdlDataBase::Load( SvStream & rStm ) |* |* Beschreibung *************************************************************************/ -void SvIdlDataBase::Save( SvStream & rStm, UINT32 nFlags ) +void SvIdlDataBase::Save( SvStream & rStm, sal_uInt32 nFlags ) { SvPersistStream aPStm( *IDLAPP->pClassMgr, &rStm ); aPStm.SetContextFlags( nFlags ); - aPStm << (UINT32)DATABASE_SIGNATURE; - aPStm << (USHORT)DATABASE_VER; + aPStm << (sal_uInt32)DATABASE_SIGNATURE; + aPStm << (sal_uInt16)DATABASE_VER; - BOOL bOnlyStreamedObjs = FALSE; + sal_Bool bOnlyStreamedObjs = sal_False; if( nFlags & IDL_WRITE_CALLING ) - bOnlyStreamedObjs = TRUE; + bOnlyStreamedObjs = sal_True; if( bOnlyStreamedObjs ) { SvMetaClassMemberList aList; - for( ULONG n = 0; n < GetModuleList().Count(); n++ ) + for( sal_uLong n = 0; n < GetModuleList().Count(); n++ ) { SvMetaModule * pModule = GetModuleList().GetObject( n ); if( !pModule->IsImported() ) @@ -274,18 +275,18 @@ void SvIdlDataBase::Push( SvMetaObject * pObj ) |* Beschreibung |* *************************************************************************/ -BOOL SvIdlDataBase::FindId( const ByteString & rIdName, ULONG * pVal ) +sal_Bool SvIdlDataBase::FindId( const ByteString & rIdName, sal_uLong * pVal ) { if( pIdTable ) { - UINT32 nHash; + sal_uInt32 nHash; if( pIdTable->Test( rIdName, &nHash ) ) { *pVal = pIdTable->Get( nHash )->GetValue(); - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } /************************************************************************* @@ -295,18 +296,18 @@ BOOL SvIdlDataBase::FindId( const ByteString & rIdName, ULONG * pVal ) |* Beschreibung |* *************************************************************************/ -BOOL SvIdlDataBase::InsertId( const ByteString & rIdName, ULONG nVal ) +sal_Bool SvIdlDataBase::InsertId( const ByteString & rIdName, sal_uLong nVal ) { if( !pIdTable ) pIdTable = new SvStringHashTable( 20003 ); - UINT32 nHash; + sal_uInt32 nHash; if( pIdTable->Insert( rIdName, &nHash ) ) { pIdTable->Get( nHash )->SetValue( nVal ); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } /************************************************************************* @@ -314,7 +315,7 @@ BOOL SvIdlDataBase::InsertId( const ByteString & rIdName, ULONG nVal ) |* |* Beschreibung *************************************************************************/ -BOOL SvIdlDataBase::ReadIdFile( const String & rFileName ) +sal_Bool SvIdlDataBase::ReadIdFile( const String & rFileName ) { DirEntry aFullName( rFileName ); aFullName.Find( GetPath() ); @@ -323,7 +324,7 @@ BOOL SvIdlDataBase::ReadIdFile( const String & rFileName ) while( pIdFile ) { if( *pIdFile == rFileName ) - return TRUE; // schon eingelesen + return sal_True; // schon eingelesen pIdFile = aIdFileList.Next(); } @@ -351,21 +352,21 @@ BOOL SvIdlDataBase::ReadIdFile( const String & rFileName ) // Fehler setzen SetError( aStr, pTok ); WriteError( aTokStm ); - return FALSE; + return sal_False; } - ULONG nVal = 0; - BOOL bOk = TRUE; + sal_uLong nVal = 0; + sal_Bool bOk = sal_True; while( bOk ) { pTok = aTokStm.GetToken_Next(); if( pTok->IsIdentifier() ) { - ULONG n; + sal_uLong n; if( FindId( pTok->GetString(), &n ) ) nVal += n; else - bOk = FALSE; + bOk = sal_False; } else if( pTok->IsChar() ) { @@ -383,7 +384,7 @@ BOOL SvIdlDataBase::ReadIdFile( const String & rFileName ) // Fehler setzen SetError( aStr, pTok ); WriteError( aTokStm ); - return FALSE; + return sal_False; } if( pTok->GetChar() != '+' && pTok->GetChar() != '(' @@ -406,7 +407,7 @@ BOOL SvIdlDataBase::ReadIdFile( const String & rFileName ) ByteString aStr = "hash table overflow: "; SetError( aStr, pTok ); WriteError( aTokStm ); - return FALSE; + return sal_False; } } } @@ -431,7 +432,7 @@ BOOL SvIdlDataBase::ReadIdFile( const String & rFileName ) // Fehler setzen SetError( aStr, pTok ); WriteError( aTokStm ); - return FALSE; + return sal_False; } } if( !ReadIdFile( String::CreateFromAscii(aName.GetBuffer()) ) ) @@ -440,7 +441,7 @@ BOOL SvIdlDataBase::ReadIdFile( const String & rFileName ) aStr += aName; SetError( aStr, pTok ); WriteError( aTokStm ); - return FALSE; + return sal_False; } } } @@ -449,8 +450,8 @@ BOOL SvIdlDataBase::ReadIdFile( const String & rFileName ) } } else - return FALSE; - return TRUE; + return sal_False; + return sal_True; } /************************************************************************* @@ -482,39 +483,39 @@ SvMetaType * SvIdlDataBase::FindType( const ByteString & rName ) *************************************************************************/ SvMetaType * SvIdlDataBase::ReadKnownType( SvTokenStream & rInStm ) { - BOOL bIn = FALSE; - BOOL bOut = FALSE; + sal_Bool bIn = sal_False; + sal_Bool bOut = sal_False; int nCall0 = CALL_VALUE; int nCall1 = CALL_VALUE; - BOOL bSet = FALSE; //irgent ein Attribut gesetzt + sal_Bool bSet = sal_False; //irgent ein Attribut gesetzt - UINT32 nTokPos = rInStm.Tell(); + sal_uInt32 nTokPos = rInStm.Tell(); SvToken * pTok = rInStm.GetToken_Next(); if( pTok->HasHash() ) { - UINT32 nBeginPos = 0; // kann mit Tell nicht vorkommen + sal_uInt32 nBeginPos = 0; // kann mit Tell nicht vorkommen while( nBeginPos != rInStm.Tell() ) { nBeginPos = rInStm.Tell(); if( pTok->Is( SvHash_in() ) ) { - bIn = TRUE; + bIn = sal_True; pTok = rInStm.GetToken_Next(); - bSet = TRUE; + bSet = sal_True; } if( pTok->Is( SvHash_out() ) ) { - bOut = TRUE; + bOut = sal_True; pTok = rInStm.GetToken_Next(); - bSet = TRUE; + bSet = sal_True; } if( pTok->Is( SvHash_inout() ) ) { - bIn = TRUE; - bOut = TRUE; + bIn = sal_True; + bOut = sal_True; pTok = rInStm.GetToken_Next(); - bSet = TRUE; + bSet = sal_True; } } } @@ -550,7 +551,7 @@ SvMetaType * SvIdlDataBase::ReadKnownType( SvTokenStream & rInStm ) CALL_POINTER; rInStm.GetToken_Next(); } - bSet = TRUE; + bSet = sal_True; } } /* @@ -602,7 +603,7 @@ SvMetaAttribute * SvIdlDataBase::ReadKnownAttr noch gelesen werden. */ ) { - UINT32 nTokPos = rInStm.Tell(); + sal_uInt32 nTokPos = rInStm.Tell(); if( !pType ) pType = ReadKnownType( rInStm ); @@ -614,7 +615,7 @@ SvMetaAttribute * SvIdlDataBase::ReadKnownAttr /* SvToken * pTok = rInStm.GetToken_Next(); if( pTok->IsIdentifier() ) - for( ULONG n = 0; n < aAttrList.Count(); n++ ) + for( sal_uLong n = 0; n < aAttrList.Count(); n++ ) { SvMetaAttribute * pAttr = aAttrList.GetObject( n ); if( pAttr->GetName() == pTok->GetString() ) @@ -628,10 +629,10 @@ SvMetaAttribute * SvIdlDataBase::ReadKnownAttr SvToken * pTok = rInStm.GetToken_Next(); if( pTok->IsIdentifier() ) { - ULONG n; + sal_uLong n; if( FindId( pTok->GetString(), &n ) ) { - for( ULONG i = 0; i < aAttrList.Count(); i++ ) + for( sal_uLong i = 0; i < aAttrList.Count(); i++ ) { SvMetaAttribute * pAttr = aAttrList.GetObject( i ); if( pAttr->GetSlotId() == pTok->GetString() ) @@ -654,10 +655,10 @@ SvMetaAttribute* SvIdlDataBase::SearchKnownAttr const SvNumberIdentifier& rId ) { - ULONG n; + sal_uLong n; if( FindId( rId, &n ) ) { - for( ULONG i = 0; i < aAttrList.Count(); i++ ) + for( sal_uLong i = 0; i < aAttrList.Count(); i++ ) { SvMetaAttribute * pAttr = aAttrList.GetObject( i ); if( pAttr->GetSlotId() == rId ) @@ -675,11 +676,11 @@ SvMetaAttribute* SvIdlDataBase::SearchKnownAttr *************************************************************************/ SvMetaClass * SvIdlDataBase::ReadKnownClass( SvTokenStream & rInStm ) { - UINT32 nTokPos = rInStm.Tell(); + sal_uInt32 nTokPos = rInStm.Tell(); SvToken * pTok = rInStm.GetToken_Next(); if( pTok->IsIdentifier() ) - for( ULONG n = 0; n < aClassList.Count(); n++ ) + for( sal_uLong n = 0; n < aClassList.Count(); n++ ) { SvMetaClass * pClass = aClassList.GetObject( n ); if( pClass->GetName() == pTok->GetString() ) @@ -709,7 +710,7 @@ void SvIdlDataBase::Write( const ByteString & rText ) void SvIdlDataBase::WriteError( const ByteString & rErrWrn, const ByteString & rFileName, const ByteString & rErrorText, - ULONG nRow, ULONG nColumn ) const + sal_uLong nRow, sal_uLong nColumn ) const { //Fehlerbehandlung fprintf( stderr, "\n%s --- %s: ( %ld, %ld )\n", @@ -731,7 +732,7 @@ void SvIdlDataBase::WriteError( SvTokenStream & rInStm ) //Fehlerbehandlung String aFileName( rInStm.GetFileName() ); ByteString aErrorText; - ULONG nRow = 0, nColumn = 0; + sal_uLong nRow = 0, nColumn = 0; rInStm.SeekEnd(); SvToken *pTok = rInStm.GetToken(); @@ -805,11 +806,11 @@ SvIdlWorkingBase::SvIdlWorkingBase(const SvCommand& rCmd) : SvIdlDataBase(rCmd) |* |* Beschreibung *************************************************************************/ -BOOL SvIdlWorkingBase::ReadSvIdl( SvTokenStream & rInStm, BOOL bImported, const String & rPath ) +sal_Bool SvIdlWorkingBase::ReadSvIdl( SvTokenStream & rInStm, sal_Bool bImported, const String & rPath ) { aPath = rPath; // nur fuer den durchlauf gueltig SvToken * pTok; - BOOL bOk = TRUE; + sal_Bool bOk = sal_True; pTok = rInStm.GetToken(); // nur ein import ganz am Anfang if( pTok->Is( SvHash_import() ) ) @@ -833,34 +834,34 @@ BOOL SvIdlWorkingBase::ReadSvIdl( SvTokenStream & rInStm, BOOL bImported, const aStr += ByteString( aFullName.GetFull(), RTL_TEXTENCODING_UTF8 ); SetError( aStr, pTok ); WriteError( rInStm ); - bOk = FALSE; + bOk = sal_False; } else { aStm.Seek( 0 ); aStm.ResetError(); SvTokenStream aTokStm( aStm, aFullName.GetFull() ); - bOk = ReadSvIdl( aTokStm, TRUE, rPath ); + bOk = ReadSvIdl( aTokStm, sal_True, rPath ); } } } else - bOk = FALSE; + bOk = sal_False; } else - bOk = FALSE; + bOk = sal_False; } - UINT32 nBeginPos = 0xFFFFFFFF; // kann mit Tell nicht vorkommen + sal_uInt32 nBeginPos = 0xFFFFFFFF; // kann mit Tell nicht vorkommen while( bOk && nBeginPos != rInStm.Tell() ) { nBeginPos = rInStm.Tell(); pTok = rInStm.GetToken(); if( pTok->IsEof() ) - return TRUE; + return sal_True; if( pTok->IsEmpty() ) - bOk = FALSE; + bOk = sal_False; // nur ein import ganz am Anfang /*else */if( pTok->Is( SvHash_module() ) ) @@ -869,18 +870,18 @@ BOOL SvIdlWorkingBase::ReadSvIdl( SvTokenStream & rInStm, BOOL bImported, const if( aModule->ReadSvIdl( *this, rInStm ) ) GetModuleList().Append( aModule ); else - bOk = FALSE; + bOk = sal_False; } else - bOk = FALSE; + bOk = sal_False; } if( !bOk || !pTok->IsEof() ) { //Fehlerbehandlung WriteError( rInStm ); - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } /************************************************************************* @@ -888,10 +889,10 @@ BOOL SvIdlWorkingBase::ReadSvIdl( SvTokenStream & rInStm, BOOL bImported, const |* |* Beschreibung *************************************************************************/ -BOOL SvIdlWorkingBase::WriteSvIdl( SvStream & rOutStm ) +sal_Bool SvIdlWorkingBase::WriteSvIdl( SvStream & rOutStm ) { if( rOutStm.GetError() != SVSTREAM_OK ) - return FALSE; + return sal_False; SvStringHashList aList; if( GetIdTable() ) @@ -909,13 +910,13 @@ BOOL SvIdlWorkingBase::WriteSvIdl( SvStream & rOutStm ) } } - for( ULONG n = 0; n < GetModuleList().Count(); n++ ) + for( sal_uLong n = 0; n < GetModuleList().Count(); n++ ) { SvMetaModule * pModule = GetModuleList().GetObject( n ); //if( !pModule->IsImported() ) pModule->WriteSvIdl( *this, rOutStm, 0 ); } - return TRUE; + return sal_True; } /************************************************************************* @@ -923,15 +924,15 @@ BOOL SvIdlWorkingBase::WriteSvIdl( SvStream & rOutStm ) |* |* Beschreibung *************************************************************************/ -BOOL SvIdlWorkingBase::WriteSfx( SvStream & rOutStm ) +sal_Bool SvIdlWorkingBase::WriteSfx( SvStream & rOutStm ) { if( rOutStm.GetError() != SVSTREAM_OK ) - return FALSE; + return sal_False; // alle Tmp-Variablen fuer das Schreiben zuruecksetzen WriteReset(); SvMemoryStream aTmpStm( 256000, 256000 ); - ULONG n; + sal_uLong n; for( n = 0; n < GetModuleList().Count(); n++ ) { SvMetaModule * pModule = GetModuleList().GetObject( n ); @@ -946,16 +947,16 @@ BOOL SvIdlWorkingBase::WriteSfx( SvStream & rOutStm ) } aUsedTypes.Clear(); rOutStm << aTmpStm; - return TRUE; + return sal_True; } -BOOL SvIdlWorkingBase::WriteHelpIds( SvStream& rOutStm ) +sal_Bool SvIdlWorkingBase::WriteHelpIds( SvStream& rOutStm ) { if( rOutStm.GetError() != SVSTREAM_OK ) - return FALSE; + return sal_False; Table aIdTable; - ULONG n; + sal_uLong n; for( n = 0; n < GetModuleList().Count(); n++ ) { SvMetaModule * pModule = GetModuleList().GetObject( n ); @@ -970,7 +971,7 @@ BOOL SvIdlWorkingBase::WriteHelpIds( SvStream& rOutStm ) pAttr->WriteHelpId( *this, rOutStm, &aIdTable ); } - return TRUE; + return sal_True; } /************************************************************************* @@ -978,9 +979,9 @@ BOOL SvIdlWorkingBase::WriteHelpIds( SvStream& rOutStm ) |* |* Beschreibung *************************************************************************/ -BOOL SvIdlWorkingBase::WriteSfxItem( SvStream & ) +sal_Bool SvIdlWorkingBase::WriteSfxItem( SvStream & ) { - return FALSE; + return sal_False; } void SvIdlDataBase::StartNewFile( const String& rName ) @@ -992,14 +993,14 @@ void SvIdlDataBase::AppendAttr( SvMetaAttribute *pAttr ) { aAttrList.Append( pAttr ); if ( bExport ) - pAttr->SetNewAttribute( TRUE ); + pAttr->SetNewAttribute( sal_True ); } -BOOL SvIdlWorkingBase::WriteCSV( SvStream& rStrm ) +sal_Bool SvIdlWorkingBase::WriteCSV( SvStream& rStrm ) { SvMetaAttributeMemberList &rList = GetAttrList(); - ULONG nCount = rList.Count(); - for ( ULONG n=0; n<nCount; n++ ) + sal_uLong nCount = rList.Count(); + for ( sal_uLong n=0; n<nCount; n++ ) { if ( rList.GetObject(n)->IsNewAttribute() ) { @@ -1008,9 +1009,9 @@ BOOL SvIdlWorkingBase::WriteCSV( SvStream& rStrm ) } if ( rStrm.GetError() != SVSTREAM_OK ) - return FALSE; + return sal_False; else - return TRUE; + return sal_True; } /************************************************************************* @@ -1018,18 +1019,18 @@ BOOL SvIdlWorkingBase::WriteCSV( SvStream& rStrm ) |* |* Beschreibung *************************************************************************/ -BOOL SvIdlWorkingBase::WriteDocumentation( SvStream & rOutStm ) +sal_Bool SvIdlWorkingBase::WriteDocumentation( SvStream & rOutStm ) { if( rOutStm.GetError() != SVSTREAM_OK ) - return FALSE; + return sal_False; - for( ULONG n = 0; n < GetModuleList().Count(); n++ ) + for( sal_uLong n = 0; n < GetModuleList().Count(); n++ ) { SvMetaModule * pModule = GetModuleList().GetObject( n ); if( !pModule->IsImported() ) pModule->Write( *this, rOutStm, 0, WRITE_DOCU ); } - return TRUE; + return sal_True; } diff --git a/idl/source/prj/globals.cxx b/idl/source/prj/globals.cxx index 4956cc9392a0..d213fc06b16a 100644..100755 --- a/idl/source/prj/globals.cxx +++ b/idl/source/prj/globals.cxx @@ -93,7 +93,7 @@ IdlDll::~IdlDll() *************************************************************************/ inline SvStringHashEntry * INS( const ByteString & rName ) { - UINT32 nIdx; + sal_uInt32 nIdx; IDLAPP->pHashTable->Insert( rName, &nIdx ); return (SvStringHashEntry * )IDLAPP->pHashTable->Get( nIdx ); } diff --git a/idl/source/prj/svidl.cxx b/idl/source/prj/svidl.cxx index d37bde0afc51..d2884464b5a7 100644..100755 --- a/idl/source/prj/svidl.cxx +++ b/idl/source/prj/svidl.cxx @@ -37,19 +37,19 @@ #include <tools/string.hxx> #define BR 0x8000 -BOOL FileMove_Impl( const String & rFile1, const String & rFile2, BOOL bImmerVerschieben ) +sal_Bool FileMove_Impl( const String & rFile1, const String & rFile2, sal_Bool bImmerVerschieben ) { //printf( "Move from %s to %s\n", rFile2.GetStr(), rFile1.GetStr() ); - ULONG nC1 = 0; - ULONG nC2 = 1; + sal_uLong nC1 = 0; + sal_uLong nC2 = 1; if( !bImmerVerschieben ) { SvFileStream aOutStm1( rFile1, STREAM_STD_READ ); SvFileStream aOutStm2( rFile2, STREAM_STD_READ ); if( aOutStm1.GetError() == SVSTREAM_OK ) { - BYTE * pBuf1 = new BYTE[ BR ]; - BYTE * pBuf2 = new BYTE[ BR ]; + sal_uInt8 * pBuf1 = new sal_uInt8[ BR ]; + sal_uInt8 * pBuf2 = new sal_uInt8[ BR ]; nC1 = aOutStm1.Read( pBuf1, BR ); nC2 = aOutStm2.Read( pBuf2, BR ); while( nC1 == nC2 ) @@ -82,7 +82,7 @@ BOOL FileMove_Impl( const String & rFile1, const String & rFile2, BOOL bImmerVer // Beide Dateien loeschen aF1.Kill(); aF2.Kill(); - return FALSE; + return sal_False; } /* else @@ -91,7 +91,7 @@ BOOL FileMove_Impl( const String & rFile1, const String & rFile2, BOOL bImmerVer rFile2.GetStr(), rFile1.GetStr() ); } */ - return TRUE; + return sal_True; } return 0 == aF2.Kill(); } @@ -312,8 +312,8 @@ int cdecl main ( int argc, char ** argv) if( nExit == 0 ) { - BOOL bErr = FALSE; - BOOL bDoMove = aCommand.aTargetFile.Len() == 0; + sal_Bool bErr = sal_False; + sal_Bool bDoMove = aCommand.aTargetFile.Len() == 0; String aErrFile, aErrFile2; if( !bErr && aCommand.aListFile.Len() ) { |