From 01b3628d420ed30b5c61376f4f5fcb491a5aa0a1 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Wed, 3 Nov 2010 15:49:08 +0100 Subject: removetooltypes01: #i112600# remove tooltypes from idl, and other small changes --- idl/inc/basobj.hxx | 50 +++---- idl/inc/bastype.hxx | 126 ++++++++--------- idl/inc/command.hxx | 6 +- idl/inc/database.hxx | 38 ++--- idl/inc/hash.hxx | 60 ++++---- idl/inc/lex.hxx | 84 +++++------ idl/inc/module.hxx | 32 ++--- idl/inc/object.hxx | 38 ++--- idl/inc/slot.hxx | 138 +++++++++--------- idl/inc/types.hxx | 140 +++++++++---------- idl/source/cmptools/char.cxx | 12 +- idl/source/cmptools/hash.cxx | 60 ++++---- idl/source/cmptools/lex.cxx | 32 ++--- idl/source/objects/basobj.cxx | 114 +++++++-------- idl/source/objects/bastype.cxx | 150 ++++++++++---------- idl/source/objects/module.cxx | 96 ++++++------- idl/source/objects/object.cxx | 130 ++++++++--------- idl/source/objects/slot.cxx | 246 ++++++++++++++++---------------- idl/source/objects/types.cxx | 308 ++++++++++++++++++++--------------------- idl/source/prj/command.cxx | 28 ++-- idl/source/prj/database.cxx | 195 +++++++++++++------------- idl/source/prj/globals.cxx | 2 +- idl/source/prj/svidl.cxx | 18 +-- 23 files changed, 1052 insertions(+), 1051 deletions(-) (limited to 'idl') diff --git a/idl/inc/basobj.hxx b/idl/inc/basobj.hxx index f6705dae8be6..60d12a69e6b5 100644 --- a/idl/inc/basobj.hxx +++ b/idl/inc/basobj.hxx @@ -104,19 +104,19 @@ public: SvMetaObject(); #ifdef IDL_COMPILER - static void WriteTab( SvStream & rOutStm, USHORT nTab ); - static BOOL TestAndSeekSpaceOnly( SvStream &, ULONG nBegPos ); + static void WriteTab( SvStream & rOutStm, sal_uInt16 nTab ); + static sal_Bool TestAndSeekSpaceOnly( SvStream &, sal_uIntPtr nBegPos ); static void Back2Delemitter( SvStream & ); static void WriteStars( SvStream & ); - virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); + virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); - virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, + virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0 ); - virtual void WriteCxx( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); - virtual void WriteHxx( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); + virtual void WriteCxx( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); + virtual void WriteHxx( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); #endif }; SV_DECL_IMPL_REF(SvMetaObject) @@ -136,7 +136,7 @@ public: SvMetaObject * Pop() { return aList.Remove( aList.Count() -1 ); } SvMetaObject * Top() const { return aList.GetObject( aList.Count() -1 ); } void Clear() { aList.Clear(); } - ULONG Count() const { return aList.Count(); } + sal_uIntPtr Count() const { return aList.Count(); } SvMetaObject * Get( TypeId nType ) { @@ -162,26 +162,26 @@ class SvMetaName : public SvMetaObject protected: #ifdef IDL_COMPILER - virtual BOOL ReadNameSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + virtual sal_Bool ReadNameSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); void DoReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm, char c = '\0' ); virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); virtual void WriteContextSvIdl( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab ); + SvStream & rOutStm, sal_uInt16 nTab ); virtual void ReadAttributesSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ); virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab ); - virtual void WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, + SvStream & rOutStm, sal_uInt16 nTab ); + virtual void WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0); - virtual void WriteContext( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, + virtual void WriteContext( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0); #endif public: SV_DECL_META_FACTORY1( SvMetaName, SvMetaObject, 15 ) SvMetaName(); - virtual BOOL SetName( const ByteString & rName, SvIdlDataBase * = NULL ); + virtual sal_Bool SetName( const ByteString & rName, SvIdlDataBase * = NULL ); void SetDescription( const ByteString& rText ) { aDescription = rText; } const SvHelpContext& GetHelpContext() const { return aHelpContext; } @@ -191,10 +191,10 @@ public: virtual const SvString& GetDescription() const{ return aDescription; } #ifdef IDL_COMPILER - virtual BOOL Test( SvIdlDataBase &, SvTokenStream & rInStm ); - virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); - virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, + virtual sal_Bool Test( SvIdlDataBase &, SvTokenStream & rInStm ); + virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); + virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0); void WriteDescription( SvStream& rOutStm ); #endif @@ -260,8 +260,8 @@ class SvMetaExtern : public SvMetaReference SvUUId aUUId; SvVersion aVersion; - BOOL bReadUUId; - BOOL bReadVersion; + sal_Bool bReadUUId; + sal_Bool bReadVersion; public: SV_DECL_META_FACTORY1( SvMetaExtern, SvMetaName, 16 ) SvMetaExtern(); @@ -272,16 +272,16 @@ public: const SvVersion & GetVersion() const { return aVersion; } #ifdef IDL_COMPILER void SetModule( SvIdlDataBase & rBase ); - virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); + virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); - virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, + virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0); protected: virtual void ReadAttributesSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab ); - virtual void WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, + SvStream & rOutStm, sal_uInt16 nTab ); + virtual void WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0); #endif }; diff --git a/idl/inc/bastype.hxx b/idl/inc/bastype.hxx index 99d14ac93432..0fe59e2c86eb 100644 --- a/idl/inc/bastype.hxx +++ b/idl/inc/bastype.hxx @@ -42,16 +42,16 @@ class SvTokenStream; /******************** class SvUINT32 **********************************/ class SvUINT32 { - UINT32 nVal; + sal_uInt32 nVal; public: SvUINT32() { nVal = 0; } - SvUINT32( UINT32 n ) : nVal( n ) {} - SvUINT32 & operator = ( UINT32 n ) { nVal = n; return *this; } + SvUINT32( sal_uInt32 n ) : nVal( n ) {} + SvUINT32 & operator = ( sal_uInt32 n ) { nVal = n; return *this; } - operator UINT32 &() { return nVal; } + operator sal_uInt32 &() { return nVal; } - static UINT32 Read( SvStream & rStm ); - static void Write( SvStream & rStm, UINT32 nVal ); + static sal_uInt32 Read( SvStream & rStm ); + static void Write( SvStream & rStm, sal_uInt32 nVal ); friend SvStream& operator << (SvStream & rStm, const SvUINT32 & r ) { SvUINT32::Write( rStm, r.nVal ); return rStm; } @@ -72,7 +72,7 @@ public: operator short &() { return nVal; } friend SvStream& operator << (SvStream & rStm, const SvINT16 & r ) - { SvUINT32::Write( rStm, (UINT32)r.nVal ); return rStm; } + { SvUINT32::Write( rStm, (sal_uInt32)r.nVal ); return rStm; } friend SvStream& operator >> (SvStream & rStm, SvINT16 & r ) { r.nVal = (short)SvUINT32::Read( rStm ); return rStm; } }; @@ -81,36 +81,36 @@ public: /******************** class SvUINT16 **********************************/ class SvUINT16 { - USHORT nVal; + sal_uInt16 nVal; public: SvUINT16() { nVal = 0; } - SvUINT16( USHORT n ) : nVal( n ) {} - SvUINT16 & operator = ( USHORT n ) { nVal = n; return *this; } + SvUINT16( sal_uInt16 n ) : nVal( n ) {} + SvUINT16 & operator = ( sal_uInt16 n ) { nVal = n; return *this; } - operator UINT16 &() { return nVal; } + operator sal_uInt16 &() { return nVal; } friend SvStream& operator << (SvStream & rStm, const SvUINT16 & r ) - { SvUINT32::Write( rStm, (UINT32)r.nVal ); return rStm; } + { SvUINT32::Write( rStm, (sal_uInt32)r.nVal ); return rStm; } friend SvStream& operator >> (SvStream & rStm, SvUINT16 & r ) - { r.nVal = (USHORT)SvUINT32::Read( rStm ); return rStm; } + { r.nVal = (sal_uInt16)SvUINT32::Read( rStm ); return rStm; } }; /******************** class SvINT32 **********************************/ class SvINT32 { - INT32 nVal; + sal_Int32 nVal; public: SvINT32() { nVal = 0; } - SvINT32( INT32 n ) : nVal( n ) {} - SvINT32 & operator = ( INT32 n ) { nVal = n; return *this; } + SvINT32( sal_Int32 n ) : nVal( n ) {} + SvINT32 & operator = ( sal_Int32 n ) { nVal = n; return *this; } - operator INT32 &() { return nVal; } + operator sal_Int32 &() { return nVal; } friend SvStream& operator << (SvStream & rStm, const SvINT32 & r ) - { SvUINT32::Write( rStm, (UINT32)r.nVal ); return rStm; } + { SvUINT32::Write( rStm, (sal_uInt32)r.nVal ); return rStm; } friend SvStream& operator >> (SvStream & rStm, SvINT32 & r ) - { r.nVal = (INT32)SvUINT32::Read( rStm ); return rStm; } + { r.nVal = (sal_Int32)SvUINT32::Read( rStm ); return rStm; } }; @@ -118,18 +118,18 @@ public: class Svint { int nVal; - BOOL bSet; + sal_Bool bSet; public: Svint() { nVal = bSet = 0; } - Svint( int n ) : nVal( n ), bSet( TRUE ) {} - Svint( int n, BOOL bSetP ) : nVal( n ), bSet( bSetP ) {} - Svint & operator = ( int n ) { nVal = n; bSet = TRUE; return *this; } + Svint( int n ) : nVal( n ), bSet( sal_True ) {} + Svint( int n, sal_Bool bSetP ) : nVal( n ), bSet( bSetP ) {} + Svint & operator = ( int n ) { nVal = n; bSet = sal_True; return *this; } operator int ()const { return nVal; } - BOOL IsSet() const { return bSet; } + sal_Bool IsSet() const { return bSet; } friend SvStream& operator << (SvStream & rStm, const Svint & r ) - { SvUINT32::Write( rStm, (UINT32)r.nVal ); rStm << r.bSet; return rStm; } + { SvUINT32::Write( rStm, (sal_uInt32)r.nVal ); rStm << r.bSet; return rStm; } friend SvStream& operator >> (SvStream & rStm, Svint & r ) { r.nVal = (int)SvUINT32::Read( rStm ); rStm >> r.bSet ; return rStm; } }; @@ -138,27 +138,27 @@ public: /******************** class SvBOOL **********************************/ class SvBOOL { - BOOL nVal:1, + sal_Bool nVal:1, bSet:1; public: - SvBOOL() { bSet = nVal = FALSE; } - SvBOOL( BOOL n ) : nVal( n ), bSet( TRUE ) {} - SvBOOL( BOOL n, BOOL bSetP ) : nVal( n ), bSet( bSetP ) {} - SvBOOL & operator = ( BOOL n ) { nVal = n; bSet = TRUE; return *this; } + SvBOOL() { bSet = nVal = sal_False; } + SvBOOL( sal_Bool n ) : nVal( n ), bSet( sal_True ) {} + SvBOOL( sal_Bool n, sal_Bool bSetP ) : nVal( n ), bSet( bSetP ) {} + SvBOOL & operator = ( sal_Bool n ) { nVal = n; bSet = sal_True; return *this; } - operator BOOL() const { return nVal; } + operator sal_Bool() const { return nVal; } #ifdef STC operator int() const { return nVal; } #endif - BOOL Is() const { return nVal; } - BOOL IsSet() const { return bSet; } + sal_Bool Is() const { return nVal; } + sal_Bool IsSet() const { return bSet; } friend SvStream& operator << (SvStream &, const SvBOOL &); friend SvStream& operator >> (SvStream &, SvBOOL &); #ifdef IDL_COMPILER - BOOL ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ); - BOOL WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm ); + sal_Bool ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ); + sal_Bool WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm ); ByteString GetSvIdlString( SvStringHashEntry * pName ); #endif }; @@ -174,11 +174,11 @@ public: friend SvStream& operator << (SvStream &, const SvIdentifier &); friend SvStream& operator >> (SvStream &, SvIdentifier &); - BOOL IsSet() const { return Len() != 0; } + sal_Bool IsSet() const { return Len() != 0; } #ifdef IDL_COMPILER - BOOL ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ); - BOOL WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm, - USHORT nTab ); + sal_Bool ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ); + sal_Bool WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm, + sal_uInt16 nTab ); #endif }; @@ -186,23 +186,23 @@ public: /******************** class SvIdentifier **********************************/ class SvNumberIdentifier : public SvIdentifier { - UINT32 nValue; + sal_uInt32 nValue; // darf nicht benutzt werden - BOOL ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ); + sal_Bool ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ); public: SvNumberIdentifier() : nValue( 0 ) {}; - BOOL IsSet() const + sal_Bool IsSet() const { return SvIdentifier::IsSet() || nValue != 0; } - UINT32 GetValue() const { return nValue; } - void SetValue( UINT32 nVal ) { nValue = nVal; } + sal_uInt32 GetValue() const { return nValue; } + void SetValue( sal_uInt32 nVal ) { nValue = nVal; } friend SvStream& operator << (SvStream &, const SvNumberIdentifier &); friend SvStream& operator >> (SvStream &, SvNumberIdentifier &); #ifdef IDL_COMPILER - BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - BOOL ReadSvIdl( SvIdlDataBase &, SvStringHashEntry * pName, + sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + sal_Bool ReadSvIdl( SvIdlDataBase &, SvStringHashEntry * pName, SvTokenStream & rInStm ); #endif }; @@ -215,14 +215,14 @@ public: SvString(){}; SvString & operator = ( const ByteString & rStr ) { ByteString::operator =( rStr ); return *this; } - BOOL IsSet() const { return Len() != 0; } + sal_Bool IsSet() const { return Len() != 0; } friend SvStream& operator << (SvStream &, const SvString &); friend SvStream& operator >> (SvStream &, SvString &); #ifdef IDL_COMPILER - BOOL ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ); - BOOL WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm, - USHORT nTab ); + sal_Bool ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ); + sal_Bool WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm, + sal_uInt16 nTab ); #endif }; @@ -233,9 +233,9 @@ class SvHelpText : public SvString public: SvHelpText() {} #ifdef IDL_COMPILER - BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - BOOL WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab ); + sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + sal_Bool WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, + sal_uInt16 nTab ); #endif }; @@ -251,8 +251,8 @@ class SvUUId : public SvGlobalName public: SvUUId() {} #ifdef IDL_COMPILER - BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - BOOL WriteSvIdl( SvStream & rOutStm ); + sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + sal_Bool WriteSvIdl( SvStream & rOutStm ); #endif }; @@ -260,28 +260,28 @@ public: /******************** class SvVersion **********************************/ class SvVersion { - USHORT nMajorVersion; - USHORT nMinorVersion; + sal_uInt16 nMajorVersion; + sal_uInt16 nMinorVersion; public: SvVersion() : nMajorVersion( 1 ), nMinorVersion( 0 ) {} - BOOL operator == ( const SvVersion & r ) + sal_Bool operator == ( const SvVersion & r ) { return (r.nMajorVersion == nMajorVersion) && (r.nMinorVersion == nMinorVersion); } - BOOL operator != ( const SvVersion & r ) + sal_Bool operator != ( const SvVersion & r ) { return !(*this == r); } - USHORT GetMajorVersion() const { return nMajorVersion; } - USHORT GetMinorVersion() const { return nMinorVersion; } + sal_uInt16 GetMajorVersion() const { return nMajorVersion; } + sal_uInt16 GetMinorVersion() const { return nMinorVersion; } friend SvStream& operator << (SvStream &, const SvVersion &); friend SvStream& operator >> (SvStream &, SvVersion &); #ifdef IDL_COMPILER - BOOL ReadSvIdl( SvTokenStream & rInStm ); - BOOL WriteSvIdl( SvStream & rOutStm ); + sal_Bool ReadSvIdl( SvTokenStream & rInStm ); + sal_Bool WriteSvIdl( SvStream & rOutStm ); #endif }; diff --git a/idl/inc/command.hxx b/idl/inc/command.hxx index 53512f4854d8..5a9577178193 100644 --- a/idl/inc/command.hxx +++ b/idl/inc/command.hxx @@ -62,8 +62,8 @@ public: String aCSVFile; String aExportFile; String aDocuFile; - UINT32 nVerbosity; - UINT32 nFlags; + sal_uInt32 nVerbosity; + sal_uInt32 nFlags; SvCommand( int argc, char ** argv ); ~SvCommand(); @@ -71,7 +71,7 @@ public: void Init(); class SvIdlWorkingBase; -BOOL ReadIdl( SvIdlWorkingBase * pDataBase, const SvCommand & rCommand ); +sal_Bool ReadIdl( SvIdlWorkingBase * pDataBase, const SvCommand & rCommand ); void DeInit(); #endif // _COMMAND_HXX diff --git a/idl/inc/database.hxx b/idl/inc/database.hxx index 0f207b64aef8..1d5ead23c907 100644 --- a/idl/inc/database.hxx +++ b/idl/inc/database.hxx @@ -44,15 +44,15 @@ class SvIdlError { ByteString aText; public: - UINT32 nLine, nColumn; + sal_uInt32 nLine, nColumn; SvIdlError() : nLine(0), nColumn(0) {} - SvIdlError( UINT32 nL, UINT32 nC ) + SvIdlError( sal_uInt32 nL, sal_uInt32 nC ) : nLine(nL), nColumn(nC) {} const ByteString & GetText() const { return aText; } void SetText( const ByteString & rT ) { aText = rT; } - BOOL IsError() const { return nLine != 0; } + sal_Bool IsError() const { return nLine != 0; } void Clear() { nLine = nColumn = 0; } SvIdlError & operator = ( const SvIdlError & rRef ) { aText = rRef.aText; @@ -66,13 +66,13 @@ public: /******************** class SvIdlDataBase ********************************/ class SvIdlDataBase { - BOOL bExport; + sal_Bool bExport; String aExportFile; sal_uInt32 nUniqueId; sal_uInt32 nVerbosity; String aDataBaseFile; SvFileStream * pStm; - BOOL bIsModified; + sal_Bool bIsModified; SvPersistStream aPersStream; StringList aIdFileList; SvStringHashTable * pIdTable; @@ -98,10 +98,10 @@ protected: public: explicit SvIdlDataBase( const SvCommand& rCmd ); ~SvIdlDataBase(); - static BOOL IsBinaryFormat( SvStream & rInStm ); + static sal_Bool IsBinaryFormat( SvStream & rInStm ); void Load( SvStream & rInStm ); - void Save( SvStream & rInStm, UINT32 nContextFlags ); + void Save( SvStream & rInStm, sal_uInt32 nContextFlags ); SvMetaAttributeMemberList& GetAttrList() { return aAttrList; } SvStringHashTable * GetIdTable() { return pIdTable; } @@ -132,11 +132,11 @@ public: void WriteError( const ByteString & rErrWrn, const ByteString & rFileName, const ByteString & rErrorText, - ULONG nRow = 0, ULONG nColumn = 0 ) const; + sal_uIntPtr nRow = 0, sal_uIntPtr nColumn = 0 ) const; void WriteError( SvTokenStream & rInStm ); void SetError( const ByteString & rError, SvToken * pTok ); void Push( SvMetaObject * pObj ); - BOOL Pop( BOOL bOk, SvTokenStream & rInStm, UINT32 nTokPos ) + sal_Bool Pop( sal_Bool bOk, SvTokenStream & rInStm, sal_uInt32 nTokPos ) { GetStack().Pop(); if( bOk ) @@ -146,9 +146,9 @@ public: return bOk; } sal_uInt32 GetUniqueId() { return ++nUniqueId; } - BOOL FindId( const ByteString & rIdName, ULONG * pVal ); - BOOL InsertId( const ByteString & rIdName, ULONG nVal ); - BOOL ReadIdFile( const String & rFileName ); + sal_Bool FindId( const ByteString & rIdName, sal_uIntPtr * pVal ); + sal_Bool InsertId( const ByteString & rIdName, sal_uIntPtr nVal ); + sal_Bool ReadIdFile( const String & rFileName ); SvMetaType * FindType( const ByteString & rName ); static SvMetaType * FindType( const SvMetaType *, SvMetaTypeMemberList & ); @@ -167,14 +167,14 @@ class SvIdlWorkingBase : public SvIdlDataBase public: explicit SvIdlWorkingBase( const SvCommand& rCmd ); - BOOL ReadSvIdl( SvTokenStream &, BOOL bImported, const String & rPath ); - BOOL WriteSvIdl( SvStream & ); + sal_Bool ReadSvIdl( SvTokenStream &, sal_Bool bImported, const String & rPath ); + sal_Bool WriteSvIdl( SvStream & ); - BOOL WriteSfx( SvStream & ); - BOOL WriteHelpIds( SvStream & ); - BOOL WriteSfxItem( SvStream & ); - BOOL WriteCSV( SvStream& ); - BOOL WriteDocumentation( SvStream& ); + sal_Bool WriteSfx( SvStream & ); + sal_Bool WriteHelpIds( SvStream & ); + sal_Bool WriteSfxItem( SvStream & ); + sal_Bool WriteCSV( SvStream& ); + sal_Bool WriteDocumentation( SvStream& ); }; #endif diff --git a/idl/inc/hash.hxx b/idl/inc/hash.hxx index 2749181d5966..4e25ebd98ca9 100644 --- a/idl/inc/hash.hxx +++ b/idl/inc/hash.hxx @@ -36,24 +36,24 @@ /****************** H a s h - T a b l e **********************************/ class SvHashTable { - UINT32 nMax; // size of hash-tabel - UINT32 nFill; // elements in hash-tabel - UINT32 lAsk; // Anzahl der Anfragen - UINT32 lTry; // Anzahl der Versuche + sal_uInt32 nMax; // size of hash-tabel + sal_uInt32 nFill; // elements in hash-tabel + sal_uInt32 lAsk; // Anzahl der Anfragen + sal_uInt32 lTry; // Anzahl der Versuche protected: - BOOL Test_Insert( const void *, BOOL bInsert, UINT32 * pInsertPos ); + sal_Bool Test_Insert( const void *, sal_Bool bInsert, sal_uInt32 * pInsertPos ); // compare element with entry - virtual StringCompare Compare( const void * , UINT32 ) const = 0; + virtual StringCompare Compare( const void * , sal_uInt32 ) const = 0; // get hash value from subclass - virtual UINT32 HashFunc( const void * ) const = 0; + virtual sal_uInt32 HashFunc( const void * ) const = 0; public: - SvHashTable( UINT32 nMaxEntries ); + SvHashTable( sal_uInt32 nMaxEntries ); virtual ~SvHashTable(); - UINT32 GetMax() const { return nMax; } + sal_uInt32 GetMax() const { return nMax; } - virtual BOOL IsEntry( UINT32 ) const = 0; + virtual sal_Bool IsEntry( sal_uInt32 ) const = 0; }; /************** S t r i n g H a s h T a b l e E n t r y ******************/ @@ -62,28 +62,28 @@ class SvStringHashEntry : public SvRefBase { friend class SvStringHashTable; ByteString aName; - UINT32 nHashId; - ULONG nValue; - BOOL bHasId; + sal_uInt32 nHashId; + sal_uIntPtr nValue; + sal_Bool bHasId; public: - SvStringHashEntry() : bHasId( FALSE ) {;} - SvStringHashEntry( const ByteString & rName, UINT32 nIdx ) + SvStringHashEntry() : bHasId( sal_False ) {;} + SvStringHashEntry( const ByteString & rName, sal_uInt32 nIdx ) : aName( rName ) , nHashId( nIdx ) , nValue( 0 ) - , bHasId( TRUE ) {} + , bHasId( sal_True ) {} ~SvStringHashEntry(); const ByteString & GetName() const { return aName; } - BOOL HasId() const { return bHasId; } - UINT32 GetId() const { return nHashId; } + sal_Bool HasId() const { return bHasId; } + sal_uInt32 GetId() const { return nHashId; } - void SetValue( ULONG n ) { nValue = n; } - ULONG GetValue() const { return nValue; } + void SetValue( sal_uIntPtr n ) { nValue = n; } + sal_uIntPtr GetValue() const { return nValue; } - BOOL operator == ( const SvStringHashEntry & rRef ) + sal_Bool operator == ( const SvStringHashEntry & rRef ) { return nHashId == rRef.nHashId; } - BOOL operator != ( const SvStringHashEntry & rRef ) + sal_Bool operator != ( const SvStringHashEntry & rRef ) { return ! operator == ( rRef ); } SvStringHashEntry & operator = ( const SvStringHashEntry & rRef ) { SvRefBase::operator=( rRef ); @@ -104,19 +104,19 @@ class SvStringHashTable : public SvHashTable { SvStringHashEntry * pEntries; protected: - virtual UINT32 HashFunc( const void * pElement ) const; - virtual StringCompare Compare( const void * pElement, UINT32 nIndex ) const; + virtual sal_uInt32 HashFunc( const void * pElement ) const; + virtual StringCompare Compare( const void * pElement, sal_uInt32 nIndex ) const; public: - SvStringHashTable( UINT32 nMaxEntries ); // max size of hash-tabel + SvStringHashTable( sal_uInt32 nMaxEntries ); // max size of hash-tabel virtual ~SvStringHashTable(); ByteString GetNearString( const ByteString & rName ) const; - virtual BOOL IsEntry( UINT32 nIndex ) const; + virtual sal_Bool IsEntry( sal_uInt32 nIndex ) const; - BOOL Insert( const ByteString & rStr, UINT32 * pHash ); // insert string - BOOL Test( const ByteString & rStr, UINT32 * pHash ) const; // test of insert string - SvStringHashEntry * Get ( UINT32 nIndex ) const; // return pointer to string - SvStringHashEntry & operator []( UINT32 nPos ) const + sal_Bool Insert( const ByteString & rStr, sal_uInt32 * pHash ); // insert string + sal_Bool Test( const ByteString & rStr, sal_uInt32 * pHash ) const; // test of insert string + SvStringHashEntry * Get ( sal_uInt32 nIndex ) const; // return pointer to string + SvStringHashEntry & operator []( sal_uInt32 nPos ) const { return pEntries[ nPos ]; } void FillHashList( SvStringHashList * rList ) const; diff --git a/idl/inc/lex.hxx b/idl/inc/lex.hxx index b42a7ce4b0f2..b276ad49c9d9 100644 --- a/idl/inc/lex.hxx +++ b/idl/inc/lex.hxx @@ -44,13 +44,13 @@ class BigInt; class SvToken { friend class SvTokenStream; - ULONG nLine, nColumn; + sal_uIntPtr nLine, nColumn; SVTOKEN_ENUM nType; ByteString aString; union { - ULONG nLong; - BOOL bBool; + sal_uIntPtr nLong; + sal_Bool bBool; char cChar; // SvRttiBase * pComplexObj; SvStringHashEntry * pHash; @@ -58,8 +58,8 @@ friend class SvTokenStream; public: SvToken(); SvToken( const SvToken & rObj ); - SvToken( ULONG n ); - SvToken( SVTOKEN_ENUM nTypeP, BOOL b ); + SvToken( sal_uIntPtr n ); + SvToken( SVTOKEN_ENUM nTypeP, sal_Bool b ); SvToken( char c ); SvToken( SVTOKEN_ENUM nTypeP, const ByteString & rStr ); // SvToken( SvRttiBase * pComplexObj ); @@ -70,27 +70,27 @@ public: ByteString GetTokenAsString() const; SVTOKEN_ENUM GetType() const { return nType; } - void SetLine( ULONG nLineP ) { nLine = nLineP; } - ULONG GetLine() const { return nLine; } + void SetLine( sal_uIntPtr nLineP ) { nLine = nLineP; } + sal_uIntPtr GetLine() const { return nLine; } - void SetColumn( ULONG nColumnP ) { nColumn = nColumnP; } - ULONG GetColumn() const { return nColumn; } + void SetColumn( sal_uIntPtr nColumnP ) { nColumn = nColumnP; } + sal_uIntPtr GetColumn() const { return nColumn; } - BOOL IsEmpty() const { return nType == SVTOKEN_EMPTY; } - BOOL IsComment() const { return nType == SVTOKEN_COMMENT; } - BOOL IsInteger() const { return nType == SVTOKEN_INTEGER; } - BOOL IsString() const { return nType == SVTOKEN_STRING; } - BOOL IsBool() const { return nType == SVTOKEN_BOOL; } - BOOL IsIdentifierHash() const + sal_Bool IsEmpty() const { return nType == SVTOKEN_EMPTY; } + sal_Bool IsComment() const { return nType == SVTOKEN_COMMENT; } + sal_Bool IsInteger() const { return nType == SVTOKEN_INTEGER; } + sal_Bool IsString() const { return nType == SVTOKEN_STRING; } + sal_Bool IsBool() const { return nType == SVTOKEN_BOOL; } + sal_Bool IsIdentifierHash() const { return nType == SVTOKEN_HASHID; } - BOOL IsIdentifier() const + sal_Bool IsIdentifier() const { return nType == SVTOKEN_IDENTIFIER || nType == SVTOKEN_HASHID; } - BOOL IsChar() const { return nType == SVTOKEN_CHAR; } - BOOL IsRttiBase() const { return nType == SVTOKEN_RTTIBASE; } - BOOL IsEof() const { return nType == SVTOKEN_EOF; } + sal_Bool IsChar() const { return nType == SVTOKEN_CHAR; } + sal_Bool IsRttiBase() const { return nType == SVTOKEN_RTTIBASE; } + sal_Bool IsEof() const { return nType == SVTOKEN_EOF; } const ByteString & GetString() const { @@ -98,27 +98,27 @@ public: ? pHash->GetName() : aString; } - ULONG GetNumber() const { return nLong; } - BOOL GetBool() const { return bBool; } + sal_uIntPtr GetNumber() const { return nLong; } + sal_Bool GetBool() const { return bBool; } char GetChar() const { return cChar; } // SvRttiBase *GetObject() const { return pComplexObj; } void SetHash( SvStringHashEntry * pHashP ) { pHash = pHashP; nType = SVTOKEN_HASHID; } - BOOL HasHash() const + sal_Bool HasHash() const { return nType == SVTOKEN_HASHID; } SvStringHashEntry * GetHash() const { return pHash; } - BOOL Is( SvStringHashEntry * pEntry ) const + sal_Bool Is( SvStringHashEntry * pEntry ) const { return IsIdentifierHash() && pHash == pEntry; } }; inline SvToken::SvToken() : nType( SVTOKEN_EMPTY ) {} -inline SvToken::SvToken( ULONG n ) +inline SvToken::SvToken( sal_uIntPtr n ) : nType( SVTOKEN_INTEGER ), nLong( n ) {} -inline SvToken::SvToken( SVTOKEN_ENUM nTypeP, BOOL b ) +inline SvToken::SvToken( SVTOKEN_ENUM nTypeP, sal_Bool b ) : nType( nTypeP ), bBool( b ) {} inline SvToken::SvToken( char c ) @@ -141,15 +141,15 @@ DECLARE_LIST( SvTokenList, SvToken * ) /******************** class SvTokenStream ********************************/ class SvTokenStream { - ULONG nLine, nColumn; + sal_uIntPtr nLine, nColumn; int nBufPos; int c; // naechstes Zeichen CharSet nCharSet; char * pCharTab; // Zeiger auf die Konverierungstabelle - USHORT nTabSize; // Tabulator Laenge + sal_uInt16 nTabSize; // Tabulator Laenge ByteString aStrTrue; ByteString aStrFalse; - ULONG nMaxPos; + sal_uIntPtr nMaxPos; SvFileStream * pInStream; SvStream & rInStream; @@ -163,16 +163,16 @@ class SvTokenStream int GetNextChar(); int GetFastNextChar() { - return aBufStr.GetChar((USHORT)nBufPos++); + return aBufStr.GetChar((sal_uInt16)nBufPos++); } void FillTokenList(); - ULONG GetNumber(); - BOOL MakeToken( SvToken & ); - BOOL IsEof() const { return rInStream.IsEof(); } + sal_uIntPtr GetNumber(); + sal_Bool MakeToken( SvToken & ); + sal_Bool IsEof() const { return rInStream.IsEof(); } void SetMax() { - ULONG n = Tell(); + sal_uIntPtr n = Tell(); if( n > nMaxPos ) nMaxPos = n; } @@ -181,7 +181,7 @@ class SvTokenStream // wenn Zeilenende berechnung sparen if( 0 != c ) { - USHORT n = 0; + sal_uInt16 n = 0; nColumn = 0; while( n < nBufPos ) nColumn += aBufStr.GetChar(n++) == '\t' ? nTabSize : 1; @@ -198,9 +198,9 @@ public: void SetCharSet( CharSet nSet ); CharSet GetCharSet() const { return nCharSet; } - void SetTabSize( USHORT nTabSizeP ) + void SetTabSize( sal_uInt16 nTabSizeP ) { nTabSize = nTabSizeP; } - USHORT GetTabSize() const { return nTabSize; } + sal_uInt16 GetTabSize() const { return nTabSize; } SvToken * GetToken_PrevAll() { @@ -226,16 +226,16 @@ public: return GetToken_NextAll(); } SvToken * GetToken() const { return pCurToken; } - BOOL Read( char cChar ) + sal_Bool Read( char cChar ) { if( pCurToken->IsChar() && cChar == pCurToken->GetChar() ) { GetToken_Next(); - return TRUE; + return sal_True; } else - return FALSE; + return sal_False; } void ReadDelemiter() { @@ -247,14 +247,14 @@ public: } } - UINT32 Tell() const + sal_uInt32 Tell() const { return aTokList.GetCurPos(); } - void Seek( UINT32 nPos ) + void Seek( sal_uInt32 nPos ) { pCurToken = aTokList.Seek( nPos ); SetMax(); } - void SeekRel( INT32 nRelPos ) + void SeekRel( sal_Int32 nRelPos ) { pCurToken = aTokList.Seek( Tell() + nRelPos ); SetMax(); diff --git a/idl/inc/module.hxx b/idl/inc/module.hxx index d35ed24affc2..5ffd670d6202 100644 --- a/idl/inc/module.hxx +++ b/idl/inc/module.hxx @@ -34,8 +34,8 @@ struct SvNamePos { SvGlobalName aUUId; - UINT32 nStmPos; - SvNamePos( const SvGlobalName & rName, UINT32 nPos ) + sal_uInt32 nStmPos; + SvNamePos( const SvGlobalName & rName, sal_uInt32 nPos ) : aUUId( rName ) , nStmPos( nPos ) {} }; @@ -55,16 +55,16 @@ class SvMetaModule : public SvMetaExtern SvString aModulePrefix; #ifdef IDL_COMPILER - BOOL bImported : 1, + sal_Bool bImported : 1, bIsModified : 1; SvGlobalName aBeginName; SvGlobalName aEndName; SvGlobalName aNextName; protected: virtual void ReadAttributesSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); + virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - virtual void WriteContextSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); + virtual void WriteContextSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); #endif public: SV_DECL_META_FACTORY1( SvMetaModule, SvMetaExtern, 13 ) @@ -73,7 +73,7 @@ public: const String & GetIdlFileName() const { return aIdlFileName; } const ByteString & GetModulePrefix() const { return aModulePrefix; } - virtual BOOL SetName( const ByteString & rName, SvIdlDataBase * = NULL ); + virtual sal_Bool SetName( const ByteString & rName, SvIdlDataBase * = NULL ); const ByteString & GetHelpFileName() const { return aHelpFileName; } const ByteString & GetTypeLibFileName() const { return aTypeLibFile; } @@ -84,20 +84,20 @@ public: #ifdef IDL_COMPILER SvMetaModule( const String & rIdlFileName, - BOOL bImported ); + sal_Bool bImported ); - BOOL FillNextName( SvGlobalName * ); - BOOL IsImported() const { return bImported; } - BOOL IsModified() const { return bIsModified; } + sal_Bool FillNextName( SvGlobalName * ); + sal_Bool IsImported() const { return bImported; } + sal_Bool IsModified() const { return bIsModified; } - virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); + virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); virtual void WriteAttributes( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab, + SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0 ); // virtual void WriteSbx( SvIdlDataBase & rBase, SvStream & rOutStm, SvNamePosList & rList ); - virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, + virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0 ); virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ); virtual void WriteHelpIds( SvIdlDataBase & rBase, SvStream & rOutStm, @@ -105,8 +105,8 @@ public: virtual void WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm, Table *pIdTable ); - virtual void WriteCxx( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); - virtual void WriteHxx( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); + virtual void WriteCxx( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); + virtual void WriteHxx( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); #endif }; SV_DECL_IMPL_REF(SvMetaModule) diff --git a/idl/inc/object.hxx b/idl/inc/object.hxx index 377c5bf0a959..ac9d193d4d83 100644 --- a/idl/inc/object.hxx +++ b/idl/inc/object.hxx @@ -49,9 +49,9 @@ DECLARE_LIST( SvMetaClassList, SvMetaClass* ) class SvULongs : public List { public: - void Insert( ULONG& rId, ULONG nPos ) { ULONG nId(rId ); List::Insert( (void*) nId, nPos ); } - void Remove( ULONG& rId ){ ULONG nId(rId ); List::Remove( (void*) nId ); } - ULONG GetObject( ULONG nPos ){ return (ULONG) List::GetObject( nPos ); } + void Insert( sal_uIntPtr& rId, sal_uIntPtr nPos ) { sal_uIntPtr nId(rId ); List::Insert( (void*) nId, nPos ); } + void Remove( sal_uIntPtr& rId ){ sal_uIntPtr nId(rId ); List::Remove( (void*) nId ); } + sal_uIntPtr GetObject( sal_uIntPtr nPos ){ return (sal_uIntPtr) List::GetObject( nPos ); } }; /******************** class SvClassElement *******************************/ @@ -70,9 +70,9 @@ public: const ByteString & GetPrefix() const { return aPrefix; } - void SetAutomation( BOOL rAutomation ) + void SetAutomation( sal_Bool rAutomation ) { aAutomation = rAutomation; } - BOOL GetAutomation() const + sal_Bool GetAutomation() const { return aAutomation; } void SetClass( SvMetaClass * pClass ) @@ -97,18 +97,18 @@ class SvMetaClass : public SvMetaType // void FillSbxMemberObject( SvIdlDataBase & rBase, // SbxObject *, StringList &, -// BOOL bVariable ); - BOOL TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm, +// sal_Bool bVariable ); + sal_Bool TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm, SvMetaAttribute & rAttr ) const; #ifdef IDL_COMPILER void WriteSlotStubs( const ByteString & rShellName, SvSlotElementList & rSlotList, ByteStringList & rList, SvStream & rOutStm ); - USHORT WriteSlotParamArray( SvIdlDataBase & rBase, + sal_uInt16 WriteSlotParamArray( SvIdlDataBase & rBase, SvSlotElementList & rSlotList, SvStream & rOutStm ); - USHORT WriteSlots( const ByteString & rShellName, USHORT nCount, + sal_uInt16 WriteSlots( const ByteString & rShellName, sal_uInt16 nCount, SvSlotElementList & rSlotList, SvIdlDataBase & rBase, SvStream & rOutStm ); @@ -121,21 +121,21 @@ protected: virtual void ReadAttributesSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ); virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab ); + SvStream & rOutStm, sal_uInt16 nTab ); virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); virtual void WriteContextSvIdl( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab ); + SvStream & rOutStm, sal_uInt16 nTab ); void WriteOdlMembers( ByteStringList & rSuperList, - BOOL bVariable, BOOL bWriteTab, + sal_Bool bVariable, sal_Bool bWriteTab, SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab ); + SvStream & rOutStm, sal_uInt16 nTab ); #endif public: SV_DECL_META_FACTORY1( SvMetaClass, SvMetaType, 6 ) SvMetaClass(); - BOOL GetAutomation() const + sal_Bool GetAutomation() const { return aAutomation; } SvMetaClass * GetSuperClass() const { return aSuperClass; } @@ -148,18 +148,18 @@ public: { return aClassList; } #ifdef IDL_COMPILER - virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); + virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab, + sal_uInt16 nTab, WriteType, WriteAttribute = 0 ); virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ); virtual void WriteHelpIds( SvIdlDataBase & rBase, SvStream & rOutStm, Table* pTable ); virtual void WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm, Table * pTable ); - virtual void WriteCxx( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); - virtual void WriteHxx( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); + virtual void WriteCxx( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); + virtual void WriteHxx( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); #endif }; SV_IMPL_REF(SvMetaClass) diff --git a/idl/inc/slot.hxx b/idl/inc/slot.hxx index e44df5bd5af6..a29331ef8e4c 100644 --- a/idl/inc/slot.hxx +++ b/idl/inc/slot.hxx @@ -75,108 +75,108 @@ class SvMetaSlot : public SvMetaAttribute SvString aDisableFlags; SvMetaSlot* pLinkedSlot; SvMetaSlot* pNextSlot; - ULONG nListPos; + sal_uIntPtr nListPos; SvMetaEnumValue* pEnumValue; SvString aUnoName; #ifdef IDL_COMPILER void WriteSlot( const ByteString & rShellName, - USHORT nCount, const ByteString & rSlotId, + sal_uInt16 nCount, const ByteString & rSlotId, SvSlotElementList &rList, const ByteString & rPrefix, SvIdlDataBase & rBase, SvStream & rOutStm ); virtual void Write( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab, + SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0 ); void SetEnumValue(SvMetaEnumValue *p) { pEnumValue = p; } #endif protected: - void SetCachable( BOOL bSet ) + void SetCachable( sal_Bool bSet ) { aCachable = bSet; if( bSet ) - aVolatile = FALSE; + aVolatile = sal_False; } - void SetVolatile( BOOL bSet ) + void SetVolatile( sal_Bool bSet ) { aVolatile = bSet; if( bSet ) - aCachable = FALSE; + aCachable = sal_False; } - void SetToggle( BOOL bSet ) + void SetToggle( sal_Bool bSet ) { aToggle = bSet; } - void SetAutoUpdate( BOOL bSet ) + void SetAutoUpdate( sal_Bool bSet ) { aAutoUpdate = bSet; } - void SetSynchron( BOOL bSet ) + void SetSynchron( sal_Bool bSet ) { aSynchron = bSet; if( bSet ) - aAsynchron = FALSE; + aAsynchron = sal_False; } - void SetAsynchron( BOOL bSet ) + void SetAsynchron( sal_Bool bSet ) { aAsynchron = bSet; if( bSet ) - aSynchron = FALSE; + aSynchron = sal_False; } - void SetRecordPerItem( BOOL bSet ) + void SetRecordPerItem( sal_Bool bSet ) { aRecordPerItem = bSet; if( bSet ) - aRecordPerSet = aRecordManual = aNoRecord = FALSE; + aRecordPerSet = aRecordManual = aNoRecord = sal_False; } - void SetRecordPerSet( BOOL bSet ) + void SetRecordPerSet( sal_Bool bSet ) { aRecordPerSet = bSet; if( bSet ) - aRecordPerItem = aRecordManual = aNoRecord = FALSE; + aRecordPerItem = aRecordManual = aNoRecord = sal_False; } - void SetRecordManual( BOOL bSet ) + void SetRecordManual( sal_Bool bSet ) { aRecordManual = bSet; if( bSet ) - aRecordPerItem = aRecordPerSet = aNoRecord = FALSE; + aRecordPerItem = aRecordPerSet = aNoRecord = sal_False; } - void SetNoRecord( BOOL bSet ) + void SetNoRecord( sal_Bool bSet ) { aNoRecord = bSet; if( bSet ) - aRecordPerItem = aRecordPerSet = aRecordManual = FALSE; + aRecordPerItem = aRecordPerSet = aRecordManual = sal_False; } - void SetRecordAbsolute( BOOL bSet ) + void SetRecordAbsolute( sal_Bool bSet ) { aRecordAbsolute = bSet; } - void SetHasDialog( BOOL bSet ) + void SetHasDialog( sal_Bool bSet ) { aHasDialog = bSet; } - void SetMenuConfig( BOOL bSet ) + void SetMenuConfig( sal_Bool bSet ) { aMenuConfig = bSet; } - void SetToolBoxConfig( BOOL bSet ) + void SetToolBoxConfig( sal_Bool bSet ) { aToolBoxConfig = bSet; } - void SetStatusBarConfig( BOOL bSet ) + void SetStatusBarConfig( sal_Bool bSet ) { aStatusBarConfig = bSet; } - void SetAccelConfig( BOOL bSet ) + void SetAccelConfig( sal_Bool bSet ) { aAccelConfig = bSet; } - void SetAllConfig( BOOL bSet ) + void SetAllConfig( sal_Bool bSet ) { aMenuConfig = bSet; aToolBoxConfig = bSet; aStatusBarConfig = bSet; aAccelConfig = bSet; } - void SetFastCall( BOOL bSet ) + void SetFastCall( sal_Bool bSet ) { aFastCall = bSet; } - void SetContainer( BOOL bSet ) + void SetContainer( sal_Bool bSet ) { aContainer = bSet; } - void SetImageRotation( BOOL bSet ) + void SetImageRotation( sal_Bool bSet ) { aImageRotation = bSet; } - void SetImageReflection( BOOL bSet ) + void SetImageReflection( sal_Bool bSet ) { aImageReflection = bSet; } public: @@ -187,84 +187,84 @@ public: SvMetaSlot(); SvMetaSlot( SvMetaType * pType ); - virtual BOOL IsVariable() const; - virtual BOOL IsMethod() const; - virtual ByteString GetMangleName( BOOL bVariable ) const; + virtual sal_Bool IsVariable() const; + virtual sal_Bool IsMethod() const; + virtual ByteString GetMangleName( sal_Bool bVariable ) const; SvMetaAttribute * GetMethod() const; SvMetaType * GetSlotType() const; - BOOL GetHasCoreId() const; + sal_Bool GetHasCoreId() const; const ByteString & GetGroupId() const; const ByteString & GetConfigId() const; const ByteString & GetExecMethod() const; const ByteString & GetStateMethod() const; const ByteString & GetDefault() const; const ByteString & GetDisableFlags() const; - BOOL GetPseudoSlots() const; + sal_Bool GetPseudoSlots() const; /* - BOOL GetGet() const; - BOOL GetSet() const; + sal_Bool GetGet() const; + sal_Bool GetSet() const; */ - BOOL GetCachable() const; - BOOL GetVolatile() const; - BOOL GetToggle() const; - BOOL GetAutoUpdate() const; + sal_Bool GetCachable() const; + sal_Bool GetVolatile() const; + sal_Bool GetToggle() const; + sal_Bool GetAutoUpdate() const; - BOOL GetSynchron() const; - BOOL GetAsynchron() const; + sal_Bool GetSynchron() const; + sal_Bool GetAsynchron() const; - BOOL GetRecordPerItem() const; - BOOL GetRecordPerSet() const; - BOOL GetRecordManual() const; - BOOL GetNoRecord() const; - BOOL GetRecordAbsolute() const; + sal_Bool GetRecordPerItem() const; + sal_Bool GetRecordPerSet() const; + sal_Bool GetRecordManual() const; + sal_Bool GetNoRecord() const; + sal_Bool GetRecordAbsolute() const; - BOOL GetHasDialog() const; + sal_Bool GetHasDialog() const; const ByteString & GetPseudoPrefix() const; const ByteString & GetUnoName() const; - BOOL GetMenuConfig() const; - BOOL GetToolBoxConfig() const; - BOOL GetStatusBarConfig() const; - BOOL GetAccelConfig() const; - BOOL GetFastCall() const; - BOOL GetContainer() const; - BOOL GetImageRotation() const; - BOOL GetImageReflection() const; + sal_Bool GetMenuConfig() const; + sal_Bool GetToolBoxConfig() const; + sal_Bool GetStatusBarConfig() const; + sal_Bool GetAccelConfig() const; + sal_Bool GetFastCall() const; + sal_Bool GetContainer() const; + sal_Bool GetImageRotation() const; + sal_Bool GetImageReflection() const; SvMetaSlot* GetLinkedSlot() const { return pLinkedSlot; } SvMetaSlot* GetNextSlot() const { return pNextSlot; } - ULONG GetListPos() const + sal_uIntPtr GetListPos() const { return nListPos; } - void SetListPos(ULONG n) + void SetListPos(sal_uIntPtr n) { nListPos = n; } void ResetSlotPointer() { pNextSlot = pLinkedSlot = 0; } -// void FillSbxObject( SvIdlDataBase & rBase, SbxObject *, BOOL bProp ); +// void FillSbxObject( SvIdlDataBase & rBase, SbxObject *, sal_Bool bProp ); #ifdef IDL_COMPILER SvMetaEnumValue* GetEnumValue() const { return pEnumValue; } - virtual BOOL Test( SvIdlDataBase &, SvTokenStream & rInStm ); + virtual sal_Bool Test( SvIdlDataBase &, SvTokenStream & rInStm ); virtual void ReadAttributesSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ); virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab ); - virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + SvStream & rOutStm, sal_uInt16 nTab ); + virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); virtual void WriteSvIdl( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab ); + SvStream & rOutStm, sal_uInt16 nTab ); virtual void Insert( SvSlotElementList&, const ByteString & rPrefix, SvIdlDataBase& ); void WriteSlotStubs( const ByteString & rShellName, ByteStringList & rList, SvStream & rOutStm ); - USHORT WriteSlotMap( const ByteString & rShellName, - USHORT nCount, + sal_uInt16 WriteSlotMap( const ByteString & rShellName, + sal_uInt16 nCount, SvSlotElementList&, const ByteString &, SvIdlDataBase & rBase, SvStream & rOutStm ); - USHORT WriteSlotParamArray( SvIdlDataBase & rBase, + sal_uInt16 WriteSlotParamArray( SvIdlDataBase & rBase, SvStream & rOutStm ); virtual void WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm, Table * pIdTable ); diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx index 5393981a7a4f..56c3f2e6271b 100644 --- a/idl/inc/types.hxx +++ b/idl/inc/types.hxx @@ -48,77 +48,77 @@ class SvMetaAttribute : public SvMetaReference SvBOOL aIsCollection; SvBOOL aReadOnlyDoc; SvBOOL aHidden; - BOOL bNewAttr; + sal_Bool bNewAttr; protected: #ifdef IDL_COMPILER virtual void WriteCSource( SvIdlDataBase & rBase, - SvStream & rOutStm, BOOL bSet ); - ULONG MakeSlotValue( SvIdlDataBase & rBase, BOOL bVariable ) const; + SvStream & rOutStm, sal_Bool bSet ); + sal_uIntPtr MakeSlotValue( SvIdlDataBase & rBase, sal_Bool bVariable ) const; virtual void WriteAttributes( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab, + SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0 ); virtual void ReadAttributesSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ); virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab ); + SvStream & rOutStm, sal_uInt16 nTab ); #endif public: SV_DECL_META_FACTORY1( SvMetaAttribute, SvMetaReference, 2 ) SvMetaAttribute(); SvMetaAttribute( SvMetaType * ); - void SetNewAttribute( BOOL bNew ) + void SetNewAttribute( sal_Bool bNew ) { bNewAttr = bNew; } - BOOL IsNewAttribute() const + sal_Bool IsNewAttribute() const { return bNewAttr; } - BOOL GetReadonly() const; + sal_Bool GetReadonly() const; void SetSlotId( const SvNumberIdentifier & rId ) { aSlotId = rId; } const SvNumberIdentifier & GetSlotId() const; - void SetExport( BOOL bSet ) + void SetExport( sal_Bool bSet ) { aExport = bSet; } - BOOL GetExport() const; + sal_Bool GetExport() const; - void SetHidden( BOOL bSet ) + void SetHidden( sal_Bool bSet ) { aHidden = bSet; } - BOOL GetHidden() const; + sal_Bool GetHidden() const; - void SetAutomation( BOOL bSet ) + void SetAutomation( sal_Bool bSet ) { aAutomation = bSet; } - BOOL GetAutomation() const; + sal_Bool GetAutomation() const; - void SetIsCollection( BOOL bSet ) + void SetIsCollection( sal_Bool bSet ) { aIsCollection = bSet; } - BOOL GetIsCollection() const; - void SetReadOnlyDoc( BOOL bSet ) + sal_Bool GetIsCollection() const; + void SetReadOnlyDoc( sal_Bool bSet ) { aReadOnlyDoc = bSet; } - BOOL GetReadOnlyDoc() const; + sal_Bool GetReadOnlyDoc() const; void SetType( SvMetaType * pT ) { aType = pT; } SvMetaType * GetType() const; - virtual BOOL IsMethod() const; - virtual BOOL IsVariable() const; - virtual ByteString GetMangleName( BOOL bVariable ) const; + virtual sal_Bool IsMethod() const; + virtual sal_Bool IsVariable() const; + virtual ByteString GetMangleName( sal_Bool bVariable ) const; -// void FillSbxObject( SbxInfo * pInfo, USHORT nSbxFlags = 0 ); -// virtual void FillSbxObject( SvIdlDataBase & rBase, SbxObject * pObj, BOOL bVariable ); +// void FillSbxObject( SbxInfo * pInfo, sal_uInt16 nSbxFlags = 0 ); +// virtual void FillSbxObject( SvIdlDataBase & rBase, SbxObject * pObj, sal_Bool bVariable ); #ifdef IDL_COMPILER - virtual BOOL Test( SvIdlDataBase &, SvTokenStream & rInStm ); - virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); - virtual void WriteParam( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, + virtual sal_Bool Test( SvIdlDataBase &, SvTokenStream & rInStm ); + virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); + virtual void WriteParam( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType ); void WriteRecursiv_Impl( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab, + SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute ); - virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, + virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0 ); - ULONG MakeSfx( ByteString * pAtrrArray ); + sal_uIntPtr MakeSfx( ByteString * pAtrrArray ); virtual void Insert( SvSlotElementList&, const ByteString & rPrefix, SvIdlDataBase& ); virtual void WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm, @@ -152,30 +152,30 @@ class SvMetaType : public SvMetaExtern SvIdentifier aBasicName; SvMetaAttributeMemberList * pAttrList; int nType; - BOOL bIsItem; - BOOL bIsShell; + sal_Bool bIsItem; + sal_Bool bIsShell; char cParserChar; #ifdef IDL_COMPILER void WriteSfxItem( const ByteString & rItemName, SvIdlDataBase & rBase, SvStream & rOutStm ); protected: - BOOL ReadNamesSvIdl( SvIdlDataBase & rBase, + sal_Bool ReadNamesSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ); virtual void ReadAttributesSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); + virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); virtual void WriteContextSvIdl( SvIdlDataBase &, SvStream & rOutStm, - USHORT nTab ); + sal_uInt16 nTab ); virtual void WriteContext( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab, + sal_uInt16 nTab, WriteType, WriteAttribute = 0 ); - virtual void WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, + virtual void WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0 ); - BOOL ReadHeaderSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + sal_Bool ReadHeaderSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); void WriteHeaderSvIdl( SvIdlDataBase &, SvStream & rOutStm, - USHORT nTab ); + sal_uInt16 nTab ); #endif public: SV_DECL_META_FACTORY1( SvMetaType, SvMetaExtern, 18 ) @@ -188,7 +188,7 @@ public: const ByteString & rBasicPostfix/*, SbxDataType nT = SbxEMPTY */); SvMetaAttributeMemberList & GetAttrList() const; - ULONG GetAttrCount() const + sal_uIntPtr GetAttrCount() const { return pAttrList ? pAttrList->Count() : 0L; } @@ -201,18 +201,18 @@ public: int GetType() const { return nType; } SvMetaType * GetBaseType() const; SvMetaType * GetReturnType() const; - BOOL IsItem() const { return bIsItem; } - BOOL IsShell() const { return bIsShell; } + sal_Bool IsItem() const { return bIsItem; } + sal_Bool IsShell() const { return bIsShell; } // void SetSbxDataType( SbxDataType nT ) // { aSbxDataType = (int)nT; } // SbxDataType GetSbxDataType() const; - void SetIn( BOOL b ) { aIn = b; } - BOOL GetIn() const; + void SetIn( sal_Bool b ) { aIn = b; } + sal_Bool GetIn() const; - void SetOut( BOOL b ) { aOut = b; } - BOOL GetOut() const; + void SetOut( sal_Bool b ) { aOut = b; } + sal_Bool GetOut() const; void SetCall0( int e ); int GetCall0() const; @@ -231,29 +231,29 @@ public: const ByteString & GetCName() const; char GetParserChar() const { return cParserChar; } - virtual BOOL SetName( const ByteString & rName, SvIdlDataBase * = NULL ); + virtual sal_Bool SetName( const ByteString & rName, SvIdlDataBase * = NULL ); -// void FillSbxObject( SbxVariable * pObj, BOOL bVariable ); +// void FillSbxObject( SbxVariable * pObj, sal_Bool bVariable ); #ifdef IDL_COMPILER - virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); virtual void WriteSvIdl( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab ); - virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, + SvStream & rOutStm, sal_uInt16 nTab ); + virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0 ); ByteString GetCString() const; - void WriteSvIdlType( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); - void WriteOdlType( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); + void WriteSvIdlType( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); + void WriteOdlType( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); void AppendParserString (ByteString &rString); - ULONG MakeSfx( ByteString * pAtrrArray ); + sal_uIntPtr MakeSfx( ByteString * pAtrrArray ); virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ); - //BOOL ReadTypePrefix( SvIdlDataBase &, SvTokenStream & rInStm ); - BOOL ReadMethodArgs( SvIdlDataBase & rBase, + //sal_Bool ReadTypePrefix( SvIdlDataBase &, SvTokenStream & rInStm ); + sal_Bool ReadMethodArgs( SvIdlDataBase & rBase, SvTokenStream & rInStm ); - void WriteTypePrefix( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, WriteType ); - void WriteMethodArgs( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, WriteType ); - void WriteTheType( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, WriteType ); + void WriteTypePrefix( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType ); + void WriteMethodArgs( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType ); + void WriteTheType( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType ); ByteString GetParserString() const; void WriteParamNames( SvIdlDataBase & rBase, SvStream & rOutStm, const ByteString & rChief ); @@ -284,9 +284,9 @@ public: SvMetaEnumValue(); #ifdef IDL_COMPILER - virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); - virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, + virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); + virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0 ); #endif }; @@ -303,26 +303,26 @@ protected: #ifdef IDL_COMPILER virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); virtual void WriteContextSvIdl( SvIdlDataBase &, SvStream & rOutStm, - USHORT nTab ); - virtual void WriteContext( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, + sal_uInt16 nTab ); + virtual void WriteContext( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0 ); #endif public: SV_DECL_META_FACTORY1( SvMetaTypeEnum, SvMetaType, 21 ) SvMetaTypeEnum(); - USHORT GetMaxValue() const; - ULONG Count() const { return aEnumValueList.Count(); } + sal_uInt16 GetMaxValue() const; + sal_uIntPtr Count() const { return aEnumValueList.Count(); } const ByteString & GetPrefix() const { return aPrefix; } - SvMetaEnumValue * GetObject( ULONG n ) const + SvMetaEnumValue * GetObject( sal_uIntPtr n ) const { return aEnumValueList.GetObject( n ); } #ifdef IDL_COMPILER - virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); + virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab, + sal_uInt16 nTab, WriteType, WriteAttribute = 0 ); #endif }; diff --git a/idl/source/cmptools/char.cxx b/idl/source/cmptools/char.cxx index 9f7272ee4524..45dda7d68fe7 100644 --- 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_uIntPtr)nSource << 16) + (sal_uIntPtr)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_uIntPtr)nSource << 16) + (sal_uIntPtr)nDest, pSet ); } return (char *)pSet; diff --git a/idl/source/cmptools/hash.cxx b/idl/source/cmptools/hash.cxx index 0c7985e05ec3..cf78e9664233 100644 --- a/idl/source/cmptools/hash.cxx +++ b/idl/source/cmptools/hash.cxx @@ -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 @@ -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,11 +138,11 @@ BOOL SvHashTable::Test_Insert( const void * pElement, BOOL bInsert, |* Beschreibung |* *************************************************************************/ -SvStringHashTable::SvStringHashTable( UINT32 nMaxEntries ) +SvStringHashTable::SvStringHashTable( sal_uInt32 nMaxEntries ) : SvHashTable( nMaxEntries ) { #ifdef WIN - DBG_ASSERT( (UINT32)nMaxEntries * sizeof( SvStringHashEntry ) <= 0xFF00, + DBG_ASSERT( (sal_uInt32)nMaxEntries * sizeof( SvStringHashEntry ) <= 0xFF00, "Hash table size cannot exeed 64k byte" ) #endif pEntries = new SvStringHashEntry[ nMaxEntries ]; @@ -181,7 +181,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 @@ -196,18 +196,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 @@ -226,7 +226,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 ) @@ -245,10 +245,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(); } @@ -259,18 +259,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; } /************************************************************************* @@ -280,10 +280,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 ); } /************************************************************************* @@ -293,7 +293,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; @@ -308,7 +308,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() ); } @@ -322,7 +322,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 38b8d8260bb2..f52185e80e4b 100644 --- a/idl/source/cmptools/lex.cxx +++ b/idl/source/cmptools/lex.cxx @@ -282,7 +282,7 @@ int SvTokenStream::GetNextChar() return '\0'; } } - nChar = aBufStr.GetChar( (USHORT)nBufPos++ ); + nChar = aBufStr.GetChar( (sal_uInt16)nBufPos++ ); nColumn += nChar == '\t' ? nTabSize : 1; return nChar; } @@ -292,9 +292,9 @@ int SvTokenStream::GetNextChar() |* |* Beschreibung *************************************************************************/ -ULONG SvTokenStream::GetNumber() +sal_uIntPtr SvTokenStream::GetNumber() { - ULONG l = 0; + sal_uIntPtr l = 0; short nLog = 10; if( '0' == c ) @@ -335,10 +335,10 @@ ULONG SvTokenStream::GetNumber() |* |* Beschreibung *************************************************************************/ -BOOL SvTokenStream::MakeToken( SvToken & rToken ) +sal_Bool SvTokenStream::MakeToken( SvToken & rToken ) { int c1; - USHORT i; + sal_uInt16 i; do { @@ -353,8 +353,8 @@ BOOL SvTokenStream::MakeToken( SvToken & rToken ) } while( 0 == c && !IsEof() && ( SVSTREAM_OK == rInStream.GetError() ) ); - ULONG nLastLine = nLine; - ULONG nLastColumn = nColumn; + sal_uIntPtr nLastLine = nLine; + sal_uIntPtr nLastColumn = nColumn; // Kommentar if( '/' == c ) { @@ -386,7 +386,7 @@ BOOL SvTokenStream::MakeToken( SvToken & rToken ) { c = GetNextChar(); if( IsEof() ) - return FALSE; + return sal_False; } else c = GetFastNextChar(); @@ -396,7 +396,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; @@ -413,7 +413,7 @@ BOOL SvTokenStream::MakeToken( SvToken & rToken ) { ByteString aStr; i = 0; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; while( !bDone && !IsEof() && c ) { c = GetFastNextChar(); @@ -423,7 +423,7 @@ BOOL SvTokenStream::MakeToken( SvToken & rToken ) aStr += '\n'; c = GetNextChar(); if( IsEof() ) - return FALSE; + return sal_False; } if( c == '"' ) { @@ -434,7 +434,7 @@ BOOL SvTokenStream::MakeToken( SvToken & rToken ) aStr += '"'; } else - bDone = TRUE; + bDone = sal_True; } else if( c == '\\' ) { @@ -447,7 +447,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 ) { @@ -475,16 +475,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..57e1ecd01e5e 100644 --- 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_uIntPtr nBegPos ) { // keine leeren Klammern schreiben - ULONG nPos = rOutStm.Tell(); + sal_uIntPtr 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_uIntPtr 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 << "" << 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_uIntPtr nBeginPos = rOutStm.Tell(); WriteTab( rOutStm, nTab ); rOutStm << '[' << endl; - ULONG nOldPos = rOutStm.Tell(); + sal_uIntPtr 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_uIntPtr nBeginPos = rOutStm.Tell(); WriteTab( rOutStm, nTab ); rOutStm << '[' << endl; - ULONG nOldPos = rOutStm.Tell(); + sal_uIntPtr nOldPos = rOutStm.Tell(); WriteAttributes( rBase, rOutStm, nTab +1, nT, nA ); // keine leeren Klammern schreiben - ULONG nPos = rOutStm.Tell(); + sal_uIntPtr 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..1d274a2563a3 100644 --- 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_uIntPtr nMin, sal_uIntPtr nMax, sal_uIntPtr* 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_uIntPtr 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; + rOutStm << pName->GetName().GetBuffer() << "(sal_False)"; + return sal_True; } /************************************************************************* @@ -244,7 +244,7 @@ ByteString SvBOOL::GetSvIdlString( SvStringHashEntry * pName ) else { ByteString aTmp( pName->GetName() ); - aTmp += "(FALSE)"; + aTmp += "(sal_False)"; return aTmp; } } @@ -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_uIntPtr 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_uIntPtr 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_uIntPtr 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..1c0b0dced62b 100644 --- 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_uIntPtr nLenPos = rStm.Tell(); rStm << nCmpLen; #ifdef IDL_COMPILER rStm << aBeginName; rStm << aEndName; rStm << aNextName; // Laenge der Compiler Daten schreiben - ULONG nPos = rStm.Tell(); + sal_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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 << "" << endl << endl; rOutStm << "" << endl; - for( ULONG n = 0; n < aClassList.Count(); n++ ) + for( sal_uIntPtr 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; mGetClass(); @@ -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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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..abfa6c7c8621 100644 --- 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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 << "" << endl << endl; // alle Attribute schreiben - ULONG n; + sal_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr n; for( n = 0; n < aAttrList.Count(); n++ ) { SvMetaAttribute * pAttr = aAttrList.GetObject( n ); - ULONG nId = pAttr->GetSlotId().GetValue(); - USHORT nPos; + sal_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr n; for ( n=0; nSetListPos(n); } - ULONG nSlotCount = aSlotList.Count(); + sal_uIntPtr 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; nWriteHelpId( 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; nWriteSrc( 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..1664d75971fc 100644 --- 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr)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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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..c9874ecbe292 100644 --- 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_uIntPtr nCount = rList.Count(); + for( sal_uIntPtr 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_uIntPtr nCount = rList.Count(); + for( sal_uIntPtr 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_uIntPtr 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_uIntPtr nCount = rList.Count(); + for( sal_uIntPtr i = 0; i < nCount; i++ ) { rList.GetObject( i )->WriteParam( rBase, rOutStm, nTab, nT ); if( i+1GetBaseType(); // 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr SvMetaType::MakeSfx( ByteString * pAttrArray ) { - ULONG nC = 0; + sal_uIntPtr nC = 0; if( GetBaseType()->GetType() == TYPE_STRUCT ) { - ULONG nAttrCount = GetAttrCount(); + sal_uIntPtr nAttrCount = GetAttrCount(); // Die einzelnen Attribute schreiben - for( ULONG n = 0; n < nAttrCount; n++ ) + for( sal_uIntPtr 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_uIntPtr nAttrCount = MakeSfx( &aAttrArray ); + //sal_uIntPtr 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_uIntPtr nAttrCount = GetAttrCount(); // Die einzelnen Attribute schreiben - for( ULONG n = 0; n < nAttrCount; n++ ) + for( sal_uIntPtr 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_uIntPtr nAttrCount = GetAttrCount(); // Die einzelnen Attribute schreiben - for( ULONG n = 0; n < nAttrCount; n++ ) + for( sal_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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; nReadSvIdl( aTokStm, FALSE, rCommand.aPath ) ) - return FALSE; + if( !pDataBase->ReadSvIdl( aTokStm, sal_False, rCommand.aPath ) ) + return sal_False; } } else - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } /************************************************************************* @@ -214,7 +214,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 ); @@ -224,13 +224,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) ) ) @@ -246,7 +246,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; } /************************************************************************* @@ -260,7 +260,7 @@ SvCommand::SvCommand( int argc, char ** argv ) StringList aList; if( ResponseFile( &aList, argc, argv ) ) - for( ULONG i = 1; i < aList.Count(); i++ ) + for( sal_uIntPtr 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 e8c5bf1f0470..4050e593d870 100644 --- 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,6 +111,7 @@ 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 // bin„ren Datenbasen inkompatibel @@ -138,7 +139,7 @@ SvMetaTypeMemberList & SvIdlDataBase::GetTypeList() *************************************************************************/ SvMetaModule * SvIdlDataBase::GetModule( const ByteString & rName ) { - for( ULONG n = 0; n < aModuleList.Count(); n++ ) + for( sal_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr * 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_uIntPtr 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_uIntPtr nVal = 0; + sal_Bool bOk = sal_True; while( bOk ) { pTok = aTokStm.GetToken_Next(); if( pTok->IsIdentifier() ) { - ULONG n; + sal_uIntPtr 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_uIntPtr 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_uIntPtr n; if( FindId( pTok->GetString(), &n ) ) { - for( ULONG i = 0; i < aAttrList.Count(); i++ ) + for( sal_uIntPtr 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_uIntPtr n; if( FindId( rId, &n ) ) { - for( ULONG i = 0; i < aAttrList.Count(); i++ ) + for( sal_uIntPtr 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_uIntPtr n = 0; n < aClassList.Count(); n++ ) { SvMetaClass * pClass = aClassList.GetObject( n ); if( pClass->GetName() == pTok->GetString() ) @@ -711,7 +712,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_uIntPtr nRow, sal_uIntPtr nColumn ) const { //Fehlerbehandlung #ifndef W31 @@ -736,7 +737,7 @@ void SvIdlDataBase::WriteError( SvTokenStream & rInStm ) #ifndef W31 String aFileName( rInStm.GetFileName() ); ByteString aErrorText; - ULONG nRow = 0, nColumn = 0; + sal_uIntPtr nRow = 0, nColumn = 0; rInStm.SeekEnd(); SvToken *pTok = rInStm.GetToken(); @@ -811,11 +812,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() ) ) @@ -839,34 +840,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() ) ) @@ -875,18 +876,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; } /************************************************************************* @@ -894,10 +895,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() ) @@ -915,13 +916,13 @@ BOOL SvIdlWorkingBase::WriteSvIdl( SvStream & rOutStm ) } } - for( ULONG n = 0; n < GetModuleList().Count(); n++ ) + for( sal_uIntPtr n = 0; n < GetModuleList().Count(); n++ ) { SvMetaModule * pModule = GetModuleList().GetObject( n ); //if( !pModule->IsImported() ) pModule->WriteSvIdl( *this, rOutStm, 0 ); } - return TRUE; + return sal_True; } /************************************************************************* @@ -929,15 +930,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_uIntPtr n; for( n = 0; n < GetModuleList().Count(); n++ ) { SvMetaModule * pModule = GetModuleList().GetObject( n ); @@ -952,16 +953,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_uIntPtr n; for( n = 0; n < GetModuleList().Count(); n++ ) { SvMetaModule * pModule = GetModuleList().GetObject( n ); @@ -976,7 +977,7 @@ BOOL SvIdlWorkingBase::WriteHelpIds( SvStream& rOutStm ) pAttr->WriteHelpId( *this, rOutStm, &aIdTable ); } - return TRUE; + return sal_True; } /************************************************************************* @@ -984,9 +985,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 ) @@ -998,14 +999,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; nIsNewAttribute() ) { @@ -1014,9 +1015,9 @@ BOOL SvIdlWorkingBase::WriteCSV( SvStream& rStrm ) } if ( rStrm.GetError() != SVSTREAM_OK ) - return FALSE; + return sal_False; else - return TRUE; + return sal_True; } /************************************************************************* @@ -1024,18 +1025,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_uIntPtr 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 83a730e404ad..9966b85fb344 100644 --- a/idl/source/prj/globals.cxx +++ b/idl/source/prj/globals.cxx @@ -103,7 +103,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..a4600fd43ba9 100644 --- a/idl/source/prj/svidl.cxx +++ b/idl/source/prj/svidl.cxx @@ -37,19 +37,19 @@ #include #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_uIntPtr nC1 = 0; + sal_uIntPtr 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() ) { -- cgit