diff options
author | Noel Grandin <noel@peralex.com> | 2014-05-08 11:42:16 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-05-08 11:44:54 +0200 |
commit | f0268c9c1be546aa0b5fc9c359f514e5d8af5bbb (patch) | |
tree | 57ca82b332aa5c9ec13909ea2439c280dc9fe379 /idl/inc | |
parent | 9c117de4c1d291823d1588a99011ababab2112c8 (diff) |
idl: sal_Bool->bool
Change-Id: I8b15c97b1fcc6acaf567e8b1d2d37cbc99687a9d
Diffstat (limited to 'idl/inc')
-rw-r--r-- | idl/inc/basobj.hxx | 18 | ||||
-rw-r--r-- | idl/inc/bastype.hxx | 70 | ||||
-rw-r--r-- | idl/inc/command.hxx | 2 | ||||
-rw-r--r-- | idl/inc/database.hxx | 28 | ||||
-rw-r--r-- | idl/inc/hash.hxx | 28 | ||||
-rw-r--r-- | idl/inc/lex.hxx | 59 | ||||
-rw-r--r-- | idl/inc/module.hxx | 14 | ||||
-rw-r--r-- | idl/inc/object.hxx | 12 | ||||
-rw-r--r-- | idl/inc/slot.hxx | 114 | ||||
-rw-r--r-- | idl/inc/types.hxx | 82 |
10 files changed, 214 insertions, 213 deletions
diff --git a/idl/inc/basobj.hxx b/idl/inc/basobj.hxx index a3fce244a4c6..34d0b100e069 100644 --- a/idl/inc/basobj.hxx +++ b/idl/inc/basobj.hxx @@ -62,11 +62,11 @@ public: SvMetaObject(); static void WriteTab( SvStream & rOutStm, sal_uInt16 nTab ); - static sal_Bool TestAndSeekSpaceOnly( SvStream &, sal_uLong nBegPos ); + static bool TestAndSeekSpaceOnly( SvStream &, sal_uLong nBegPos ); static void Back2Delemitter( SvStream & ); static void WriteStars( SvStream & ); - virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + virtual 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, @@ -107,7 +107,7 @@ class SvMetaName : public SvMetaObject SvString aDescription; protected: - virtual sal_Bool ReadNameSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + virtual bool ReadNameSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); void DoReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm, char c = '\0' ); virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); @@ -125,7 +125,7 @@ public: SV_DECL_META_FACTORY1( SvMetaName, SvMetaObject, 15 ) SvMetaName(); - virtual sal_Bool SetName( const OString& rName, SvIdlDataBase * = NULL ); + virtual bool SetName( const OString& rName, SvIdlDataBase * = NULL ); void SetDescription( const OString& rText ) { aDescription.setString(rText); } const SvHelpContext& GetHelpContext() const { return aHelpContext; } @@ -134,8 +134,8 @@ public: virtual const SvString & GetConfigName() const{ return aConfigName; } virtual const SvString& GetDescription() const{ return aDescription; } - virtual sal_Bool Test( SvIdlDataBase &, SvTokenStream & rInStm ); - virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE; + virtual bool Test( SvIdlDataBase &, SvTokenStream & rInStm ); + virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE; virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE; virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0) SAL_OVERRIDE; @@ -201,8 +201,8 @@ class SvMetaExtern : public SvMetaReference SvUUId aUUId; SvVersion aVersion; - sal_Bool bReadUUId; - sal_Bool bReadVersion; + bool bReadUUId; + bool bReadVersion; public: SV_DECL_META_FACTORY1( SvMetaExtern, SvMetaName, 16 ) SvMetaExtern(); @@ -212,7 +212,7 @@ public: const SvGlobalName &GetUUId() const; const SvVersion & GetVersion() const { return aVersion; } void SetModule( SvIdlDataBase & rBase ); - virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE; + virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE; virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE; virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, diff --git a/idl/inc/bastype.hxx b/idl/inc/bastype.hxx index 0bd86515aac8..588f091ef532 100644 --- a/idl/inc/bastype.hxx +++ b/idl/inc/bastype.hxx @@ -52,45 +52,45 @@ public: class Svint { int nVal; - sal_Bool bSet; + bool bSet; public: - Svint() { nVal = bSet = 0; } - 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; } + Svint() { nVal = 0; bSet = false; } + 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; } operator int ()const { return nVal; } - sal_Bool IsSet() const { return bSet; } + bool IsSet() const { return bSet; } friend SvStream& WriteSvint(SvStream & rStm, const Svint & r ) { SvUINT32::Write( rStm, (sal_uInt32)r.nVal ); rStm.WriteUInt8( r.bSet ); return rStm; } friend SvStream& operator >> (SvStream & rStm, Svint & r ) - { r.nVal = (int)SvUINT32::Read( rStm ); rStm.ReadUChar( r.bSet ); return rStm; } + { r.nVal = (int)SvUINT32::Read( rStm ); rStm.ReadCharAsBool( r.bSet ); return rStm; } }; class SvBOOL { - sal_Bool nVal:1, + bool nVal:1, bSet:1; public: - 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; } + 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; } - operator sal_Bool() const { return nVal; } + operator bool() const { return nVal; } #ifdef STC operator int() const { return nVal; } #endif - sal_Bool Is() const { return nVal; } - sal_Bool IsSet() const { return bSet; } + bool Is() const { return nVal; } + bool IsSet() const { return bSet; } friend SvStream& WriteSvBOOL(SvStream &, const SvBOOL &); friend SvStream& operator >> (SvStream &, SvBOOL &); - sal_Bool ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ); - sal_Bool WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm ); + bool ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ); + bool WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm ); OString GetSvIdlString( SvStringHashEntry * pName ); }; @@ -114,12 +114,12 @@ public: friend SvStream& WriteSvIdentifier(SvStream &, const SvIdentifier &); friend SvStream& operator >> (SvStream &, SvIdentifier &); - sal_Bool IsSet() const + bool IsSet() const { return !m_aStr.isEmpty(); } - sal_Bool ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ); - sal_Bool WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm, + bool ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ); + bool WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm, sal_uInt16 nTab ); }; @@ -128,10 +128,10 @@ class SvNumberIdentifier : public SvIdentifier { sal_uInt32 nValue; // must not be used - sal_Bool ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ); + bool ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ); public: SvNumberIdentifier() : nValue( 0 ) {}; - sal_Bool IsSet() const + bool IsSet() const { return SvIdentifier::IsSet() || nValue != 0; } @@ -140,8 +140,8 @@ public: friend SvStream& WriteSvNumberIdentifier(SvStream &, const SvNumberIdentifier &); friend SvStream& operator >> (SvStream &, SvNumberIdentifier &); - sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - sal_Bool ReadSvIdl( SvIdlDataBase &, SvStringHashEntry * pName, + bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + bool ReadSvIdl( SvIdlDataBase &, SvStringHashEntry * pName, SvTokenStream & rInStm ); }; @@ -160,15 +160,15 @@ public: { return m_aStr; } - sal_Bool IsSet() const + bool IsSet() const { return !m_aStr.isEmpty(); } friend SvStream& WriteSvString(SvStream &, const SvString &); friend SvStream& operator >> (SvStream &, SvString &); - sal_Bool ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ); - sal_Bool WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm, + bool ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ); + bool WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm, sal_uInt16 nTab ); }; @@ -177,8 +177,8 @@ class SvHelpText : public SvString { public: SvHelpText() {} - sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - sal_Bool WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, + bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + bool WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); }; @@ -191,8 +191,8 @@ class SvUUId : public SvGlobalName { public: SvUUId() {} - sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - sal_Bool WriteSvIdl( SvStream & rOutStm ); + bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + bool WriteSvIdl( SvStream & rOutStm ); }; @@ -202,12 +202,12 @@ class SvVersion sal_uInt16 nMinorVersion; public: SvVersion() : nMajorVersion( 1 ), nMinorVersion( 0 ) {} - sal_Bool operator == ( const SvVersion & r ) + bool operator == ( const SvVersion & r ) { return (r.nMajorVersion == nMajorVersion) && (r.nMinorVersion == nMinorVersion); } - sal_Bool operator != ( const SvVersion & r ) + bool operator != ( const SvVersion & r ) { return !(*this == r); } @@ -217,8 +217,8 @@ public: friend SvStream& WriteSvVersion(SvStream &, const SvVersion &); friend SvStream& operator >> (SvStream &, SvVersion &); - sal_Bool ReadSvIdl( SvTokenStream & rInStm ); - sal_Bool WriteSvIdl( SvStream & rOutStm ); + bool ReadSvIdl( SvTokenStream & rInStm ); + bool WriteSvIdl( SvStream & rOutStm ); }; diff --git a/idl/inc/command.hxx b/idl/inc/command.hxx index bbf730d8cef6..3f47ad87bcb7 100644 --- a/idl/inc/command.hxx +++ b/idl/inc/command.hxx @@ -50,7 +50,7 @@ public: void Init(); class SvIdlWorkingBase; -sal_Bool ReadIdl( SvIdlWorkingBase * pDataBase, const SvCommand & rCommand ); +bool ReadIdl( SvIdlWorkingBase * pDataBase, const SvCommand & rCommand ); void DeInit(); #endif // INCLUDED_IDL_INC_COMMAND_HXX diff --git a/idl/inc/database.hxx b/idl/inc/database.hxx index 52fc9ef42205..805285d5aaf5 100644 --- a/idl/inc/database.hxx +++ b/idl/inc/database.hxx @@ -43,7 +43,7 @@ public: const OString& GetText() const { return aText; } void SetText( const OString& rT ) { aText = rT; } - sal_Bool IsError() const { return nLine != 0; } + bool IsError() const { return nLine != 0; } void Clear() { nLine = nColumn = 0; } SvIdlError & operator = ( const SvIdlError & rRef ) { aText = rRef.aText; @@ -55,7 +55,7 @@ public: class SvIdlDataBase { - sal_Bool bExport; + bool bExport; OUString aExportFile; sal_uInt32 nUniqueId; sal_uInt32 nVerbosity; @@ -85,7 +85,7 @@ public: explicit SvIdlDataBase( const SvCommand& rCmd ); ~SvIdlDataBase(); - static sal_Bool IsBinaryFormat( SvStream & rInStm ); + static bool IsBinaryFormat( SvStream & rInStm ); void Load( SvStream & rInStm ); void Save( SvStream & rInStm, sal_uInt32 nContextFlags ); @@ -121,7 +121,7 @@ public: void WriteError( SvTokenStream & rInStm ); void SetError( const OString& rError, SvToken * pTok ); void Push( SvMetaObject * pObj ); - sal_Bool Pop( sal_Bool bOk, SvTokenStream & rInStm, sal_uInt32 nTokPos ) + bool Pop( bool bOk, SvTokenStream & rInStm, sal_uInt32 nTokPos ) { GetStack().Pop(); if( bOk ) @@ -131,9 +131,9 @@ public: return bOk; } sal_uInt32 GetUniqueId() { return ++nUniqueId; } - sal_Bool FindId( const OString& rIdName, sal_uLong * pVal ); - sal_Bool InsertId( const OString& rIdName, sal_uLong nVal ); - sal_Bool ReadIdFile( const OUString & rFileName ); + bool FindId( const OString& rIdName, sal_uLong * pVal ); + bool InsertId( const OString& rIdName, sal_uLong nVal ); + bool ReadIdFile( const OUString & rFileName ); SvMetaType * FindType( const OString& rName ); static SvMetaType * FindType( const SvMetaType *, SvMetaTypeMemberList & ); @@ -152,14 +152,14 @@ class SvIdlWorkingBase : public SvIdlDataBase public: explicit SvIdlWorkingBase( const SvCommand& rCmd ); - sal_Bool ReadSvIdl( SvTokenStream &, sal_Bool bImported, const OUString & rPath ); - sal_Bool WriteSvIdl( SvStream & ); + bool ReadSvIdl( SvTokenStream &, bool bImported, const OUString & rPath ); + bool WriteSvIdl( SvStream & ); - sal_Bool WriteSfx( SvStream & ); - sal_Bool WriteHelpIds( SvStream & ); - sal_Bool WriteSfxItem( SvStream & ); - sal_Bool WriteCSV( SvStream& ); - sal_Bool WriteDocumentation( SvStream& ); + bool WriteSfx( SvStream & ); + bool WriteHelpIds( SvStream & ); + bool WriteSfxItem( SvStream & ); + bool WriteCSV( SvStream& ); + bool WriteDocumentation( SvStream& ); }; #endif // INCLUDED_IDL_INC_DATABASE_HXX diff --git a/idl/inc/hash.hxx b/idl/inc/hash.hxx index 71e95609f76d..42cf191d7bbd 100644 --- a/idl/inc/hash.hxx +++ b/idl/inc/hash.hxx @@ -32,29 +32,29 @@ class SvHashTable sal_uInt32 lAsk; // number of requests sal_uInt32 lTry; // number of tries protected: - sal_Bool Test_Insert( const OString&, sal_Bool bInsert, sal_uInt32 * pInsertPos ); + bool Test_Insert( const OString&, bool bInsert, sal_uInt32 * pInsertPos ); // compare element with entry - virtual bool equals( const OString& , sal_uInt32 ) const = 0; + virtual bool equals( const OString& , sal_uInt32 ) const = 0; // get hash value from subclass - virtual sal_uInt32 HashFunc( const OString& ) const = 0; + virtual sal_uInt32 HashFunc( const OString& ) const = 0; public: SvHashTable( sal_uInt32 nMaxEntries ); virtual ~SvHashTable(); - sal_uInt32 GetMax() const { return nMax; } + sal_uInt32 GetMax() const { return nMax; } - virtual sal_Bool IsEntry( sal_uInt32 ) const = 0; + virtual bool IsEntry( sal_uInt32 ) const = 0; }; class SvStringHashTable; class SvStringHashEntry : public SvRefBase { friend class SvStringHashTable; - OString aName; + OString aName; sal_uInt32 nHashId; sal_uLong nValue; - sal_Bool bHasId; + bool bHasId; public: SvStringHashEntry() : nHashId(0) @@ -72,15 +72,15 @@ public: virtual ~SvStringHashEntry(); const OString& GetName() const { return aName; } - sal_Bool HasId() const { return bHasId; } + bool HasId() const { return bHasId; } sal_uInt32 GetId() const { return nHashId; } void SetValue( sal_uLong n ) { nValue = n; } - sal_uLong GetValue() const { return nValue; } + sal_uLong GetValue() const { return nValue; } - sal_Bool operator == ( const SvStringHashEntry & rRef ) + bool operator == ( const SvStringHashEntry & rRef ) { return nHashId == rRef.nHashId; } - sal_Bool operator != ( const SvStringHashEntry & rRef ) + bool operator != ( const SvStringHashEntry & rRef ) { return ! operator == ( rRef ); } SvStringHashEntry & operator = ( const SvStringHashEntry & rRef ) { SvRefBase::operator=( rRef ); @@ -107,10 +107,10 @@ public: virtual ~SvStringHashTable(); OString GetNearString( const OString& rName ) const; - virtual sal_Bool IsEntry( sal_uInt32 nIndex ) const SAL_OVERRIDE; + virtual bool IsEntry( sal_uInt32 nIndex ) const SAL_OVERRIDE; - sal_Bool Insert( const OString& rStr, sal_uInt32 * pHash ); // insert string - sal_Bool Test( const OString& rStr, sal_uInt32 * pHash ) const; // test of insert string + bool Insert( const OString& rStr, sal_uInt32 * pHash ); // insert string + bool Test( const OString& 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 ]; } diff --git a/idl/inc/lex.hxx b/idl/inc/lex.hxx index 03900e14e314..a11bd6183ea9 100644 --- a/idl/inc/lex.hxx +++ b/idl/inc/lex.hxx @@ -41,7 +41,7 @@ friend class SvTokenStream; union { sal_uLong nLong; - sal_Bool bBool; + bool bBool; char cChar; SvStringHashEntry * pHash; }; @@ -49,37 +49,37 @@ public: SvToken(); SvToken( const SvToken & rObj ); SvToken( sal_uLong n ); - SvToken( SVTOKEN_ENUM nTypeP, sal_Bool b ); + SvToken( SVTOKEN_ENUM nTypeP, bool b ); SvToken( char c ); SvToken( SVTOKEN_ENUM nTypeP, const OString& rStr ); SvToken( SVTOKEN_ENUM nTypeP ); SvToken & operator = ( const SvToken & rObj ); - OString GetTokenAsString() const; + OString GetTokenAsString() const; SVTOKEN_ENUM GetType() const { return nType; } void SetLine( sal_uLong nLineP ) { nLine = nLineP; } - sal_uLong GetLine() const { return nLine; } + sal_uLong GetLine() const { return nLine; } void SetColumn( sal_uLong nColumnP ) { nColumn = nColumnP; } - sal_uLong GetColumn() const { return nColumn; } - - 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 + sal_uLong 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 { return nType == SVTOKEN_HASHID; } - sal_Bool IsIdentifier() const + bool IsIdentifier() const { return nType == SVTOKEN_IDENTIFIER || nType == SVTOKEN_HASHID; } - sal_Bool IsChar() const { return nType == SVTOKEN_CHAR; } - sal_Bool IsRttiBase() const { return nType == SVTOKEN_RTTIBASE; } - sal_Bool IsEof() const { return nType == SVTOKEN_EOF; } + bool IsChar() const { return nType == SVTOKEN_CHAR; } + bool IsRttiBase() const { return nType == SVTOKEN_RTTIBASE; } + bool IsEof() const { return nType == SVTOKEN_EOF; } const OString& GetString() const { @@ -87,16 +87,16 @@ public: ? pHash->GetName() : aString; } - sal_uLong GetNumber() const { return nLong; } - sal_Bool GetBool() const { return bBool; } + sal_uLong GetNumber() const { return nLong; } + bool GetBool() const { return bBool; } char GetChar() const { return cChar; } void SetHash( SvStringHashEntry * pHashP ) { pHash = pHashP; nType = SVTOKEN_HASHID; } - sal_Bool HasHash() const + bool HasHash() const { return nType == SVTOKEN_HASHID; } SvStringHashEntry * GetHash() const { return pHash; } - sal_Bool Is( SvStringHashEntry * pEntry ) const + bool Is( SvStringHashEntry * pEntry ) const { return IsIdentifierHash() && pHash == pEntry; } }; @@ -110,7 +110,7 @@ inline SvToken::SvToken() inline SvToken::SvToken( sal_uLong n ) : nType( SVTOKEN_INTEGER ), nLong( n ) {} -inline SvToken::SvToken( SVTOKEN_ENUM nTypeP, sal_Bool b ) +inline SvToken::SvToken( SVTOKEN_ENUM nTypeP, bool b ) : nType( nTypeP ), bBool( b ) {} inline SvToken::SvToken( char c ) @@ -138,9 +138,10 @@ class SvTokenStream boost::ptr_vector<SvToken> aTokList; boost::ptr_vector<SvToken>::iterator pCurToken; + OString aBufStr; + void InitCtor(); - OString aBufStr; int GetNextChar(); int GetFastNextChar() { @@ -150,9 +151,9 @@ class SvTokenStream } void FillTokenList(); - sal_uLong GetNumber(); - sal_Bool MakeToken( SvToken & ); - sal_Bool IsEof() const { return rInStream.IsEof(); } + sal_uLong GetNumber(); + bool MakeToken( SvToken & ); + bool IsEof() const { return rInStream.IsEof(); } void SetMax() { sal_uLong n = Tell(); @@ -213,19 +214,19 @@ public: SvToken* GetToken() const { return &(*pCurToken); } - sal_Bool Read( char cChar ) + bool Read( char cChar ) { if( pCurToken->IsChar() && cChar == pCurToken->GetChar() ) { GetToken_Next(); - return sal_True; + return true; } else - return sal_False; + return false; } - void ReadDelemiter() + void ReadDelemiter() { if( pCurToken->IsChar() && (';' == pCurToken->GetChar() diff --git a/idl/inc/module.hxx b/idl/inc/module.hxx index ce3ab0288a6a..848fe590470c 100644 --- a/idl/inc/module.hxx +++ b/idl/inc/module.hxx @@ -44,7 +44,7 @@ class SvMetaModule : public SvMetaExtern SvString aTypeLibFile; SvString aModulePrefix; - sal_Bool bImported : 1, + bool bImported : 1, bIsModified : 1; SvGlobalName aBeginName; SvGlobalName aEndName; @@ -61,7 +61,7 @@ public: const OUString & GetIdlFileName() const { return aIdlFileName; } const OString& GetModulePrefix() const { return aModulePrefix.getString(); } - virtual sal_Bool SetName( const OString& rName, SvIdlDataBase * = NULL ) SAL_OVERRIDE; + virtual bool SetName( const OString& rName, SvIdlDataBase * = NULL ) SAL_OVERRIDE; const OString& GetHelpFileName() const { return aHelpFileName.getString(); } const OString& GetTypeLibFileName() const { return aTypeLibFile.getString(); } @@ -71,13 +71,13 @@ public: const SvMetaClassMemberList & GetClassList() const { return aClassList; } SvMetaModule( const OUString & rIdlFileName, - sal_Bool bImported ); + bool bImported ); - sal_Bool FillNextName( SvGlobalName * ); - sal_Bool IsImported() const { return bImported; } - sal_Bool IsModified() const { return bIsModified; } + bool FillNextName( SvGlobalName * ); + bool IsImported() const { return bImported; } + bool IsModified() const { return bIsModified; } - virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE; + virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE; virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE; virtual void WriteAttributes( SvIdlDataBase & rBase, diff --git a/idl/inc/object.hxx b/idl/inc/object.hxx index 01b51e204cdf..1e1037c29281 100644 --- a/idl/inc/object.hxx +++ b/idl/inc/object.hxx @@ -54,9 +54,9 @@ public: const OString& GetPrefix() const { return aPrefix; } - void SetAutomation( sal_Bool rAutomation ) + void SetAutomation( bool rAutomation ) { aAutomation = rAutomation; } - sal_Bool GetAutomation() const + bool GetAutomation() const { return aAutomation; } void SetClass( SvMetaClass * pClass ) @@ -79,7 +79,7 @@ class SvMetaClass : public SvMetaType SvBOOL aAutomation; SvMetaClassRef xAutomationInterface; - sal_Bool TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm, + bool TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm, SvMetaAttribute & rAttr ) const; void WriteSlotStubs( const OString& rShellName, SvSlotElementList & rSlotList, @@ -107,14 +107,14 @@ protected: virtual void WriteContextSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE; void WriteOdlMembers( ByteStringList & rSuperList, - sal_Bool bVariable, sal_Bool bWriteTab, + bool bVariable, bool bWriteTab, SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); public: SV_DECL_META_FACTORY1( SvMetaClass, SvMetaType, 6 ) SvMetaClass(); - sal_Bool GetAutomation() const + bool GetAutomation() const { return aAutomation; } SvMetaClass * GetSuperClass() const { return aSuperClass; } @@ -125,7 +125,7 @@ public: GetClassList() const { return aClassList; } - virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE; + virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE; virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE; virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, diff --git a/idl/inc/slot.hxx b/idl/inc/slot.hxx index 787c4d30ea39..220c47866829 100644 --- a/idl/inc/slot.hxx +++ b/idl/inc/slot.hxx @@ -81,90 +81,90 @@ class SvMetaSlot : public SvMetaAttribute void SetEnumValue(SvMetaEnumValue *p) { pEnumValue = p; } protected: - void SetCachable( sal_Bool bSet ) + void SetCachable( bool bSet ) { aCachable = bSet; if( bSet ) - aVolatile = sal_False; + aVolatile = false; } - void SetVolatile( sal_Bool bSet ) + void SetVolatile( bool bSet ) { aVolatile = bSet; if( bSet ) - aCachable = sal_False; + aCachable = false; } - void SetToggle( sal_Bool bSet ) + void SetToggle( bool bSet ) { aToggle = bSet; } - void SetAutoUpdate( sal_Bool bSet ) + void SetAutoUpdate( bool bSet ) { aAutoUpdate = bSet; } - void SetSynchron( sal_Bool bSet ) + void SetSynchron( bool bSet ) { aSynchron = bSet; if( bSet ) - aAsynchron = sal_False; + aAsynchron = false; } - void SetAsynchron( sal_Bool bSet ) + void SetAsynchron( bool bSet ) { aAsynchron = bSet; if( bSet ) - aSynchron = sal_False; + aSynchron = false; } - void SetRecordPerItem( sal_Bool bSet ) + void SetRecordPerItem( bool bSet ) { aRecordPerItem = bSet; if( bSet ) - aRecordPerSet = aRecordManual = aNoRecord = sal_False; + aRecordPerSet = aRecordManual = aNoRecord = false; } - void SetRecordPerSet( sal_Bool bSet ) + void SetRecordPerSet( bool bSet ) { aRecordPerSet = bSet; if( bSet ) - aRecordPerItem = aRecordManual = aNoRecord = sal_False; + aRecordPerItem = aRecordManual = aNoRecord = false; } - void SetRecordManual( sal_Bool bSet ) + void SetRecordManual( bool bSet ) { aRecordManual = bSet; if( bSet ) - aRecordPerItem = aRecordPerSet = aNoRecord = sal_False; + aRecordPerItem = aRecordPerSet = aNoRecord = false; } - void SetNoRecord( sal_Bool bSet ) + void SetNoRecord( bool bSet ) { aNoRecord = bSet; if( bSet ) - aRecordPerItem = aRecordPerSet = aRecordManual = sal_False; + aRecordPerItem = aRecordPerSet = aRecordManual = false; } - void SetRecordAbsolute( sal_Bool bSet ) + void SetRecordAbsolute( bool bSet ) { aRecordAbsolute = bSet; } - void SetHasDialog( sal_Bool bSet ) + void SetHasDialog( bool bSet ) { aHasDialog = bSet; } - void SetMenuConfig( sal_Bool bSet ) + void SetMenuConfig( bool bSet ) { aMenuConfig = bSet; } - void SetToolBoxConfig( sal_Bool bSet ) + void SetToolBoxConfig( bool bSet ) { aToolBoxConfig = bSet; } - void SetStatusBarConfig( sal_Bool bSet ) + void SetStatusBarConfig( bool bSet ) { aStatusBarConfig = bSet; } - void SetAccelConfig( sal_Bool bSet ) + void SetAccelConfig( bool bSet ) { aAccelConfig = bSet; } - void SetAllConfig( sal_Bool bSet ) + void SetAllConfig( bool bSet ) { aMenuConfig = bSet; aToolBoxConfig = bSet; aStatusBarConfig = bSet; aAccelConfig = bSet; } - void SetFastCall( sal_Bool bSet ) + void SetFastCall( bool bSet ) { aFastCall = bSet; } - void SetContainer( sal_Bool bSet ) + void SetContainer( bool bSet ) { aContainer = bSet; } - void SetImageRotation( sal_Bool bSet ) + void SetImageRotation( bool bSet ) { aImageRotation = bSet; } - void SetImageReflection( sal_Bool bSet ) + void SetImageReflection( bool bSet ) { aImageReflection = bSet; } public: @@ -175,45 +175,45 @@ public: SvMetaSlot(); SvMetaSlot( SvMetaType * pType ); - virtual sal_Bool IsVariable() const SAL_OVERRIDE; - virtual sal_Bool IsMethod() const SAL_OVERRIDE; - virtual OString GetMangleName( sal_Bool bVariable ) const SAL_OVERRIDE; + virtual bool IsVariable() const SAL_OVERRIDE; + virtual bool IsMethod() const SAL_OVERRIDE; + virtual OString GetMangleName( bool bVariable ) const SAL_OVERRIDE; SvMetaAttribute * GetMethod() const; SvMetaType * GetSlotType() const; - sal_Bool GetHasCoreId() const; + bool GetHasCoreId() const; const OString& GetGroupId() const; const OString& GetConfigId() const; const OString& GetExecMethod() const; const OString& GetStateMethod() const; const OString& GetDefault() const; const OString& GetDisableFlags() const; - sal_Bool GetPseudoSlots() const; - sal_Bool GetCachable() const; - sal_Bool GetVolatile() const; - sal_Bool GetToggle() const; - sal_Bool GetAutoUpdate() const; + bool GetPseudoSlots() const; + bool GetCachable() const; + bool GetVolatile() const; + bool GetToggle() const; + bool GetAutoUpdate() const; - sal_Bool GetSynchron() const; - sal_Bool GetAsynchron() const; + bool GetSynchron() const; + bool GetAsynchron() const; - sal_Bool GetRecordPerItem() const; - sal_Bool GetRecordPerSet() const; - sal_Bool GetRecordManual() const; - sal_Bool GetNoRecord() const; - sal_Bool GetRecordAbsolute() const; + bool GetRecordPerItem() const; + bool GetRecordPerSet() const; + bool GetRecordManual() const; + bool GetNoRecord() const; + bool GetRecordAbsolute() const; - sal_Bool GetHasDialog() const; + bool GetHasDialog() const; const OString& GetPseudoPrefix() const; const OString& GetUnoName() 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; + bool GetMenuConfig() const; + bool GetToolBoxConfig() const; + bool GetStatusBarConfig() const; + bool GetAccelConfig() const; + bool GetFastCall() const; + bool GetContainer() const; + bool GetImageRotation() const; + bool GetImageReflection() const; SvMetaSlot* GetLinkedSlot() const { return pLinkedSlot; } SvMetaSlot* GetNextSlot() const @@ -227,12 +227,12 @@ public: SvMetaEnumValue* GetEnumValue() const { return pEnumValue; } - virtual sal_Bool Test( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE; + virtual bool Test( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE; virtual void ReadAttributesSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) SAL_OVERRIDE; virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE; - virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE; + virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE; virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE; virtual void Insert( SvSlotElementList&, const OString& rPrefix, @@ -247,7 +247,7 @@ public: const OString&, SvIdlDataBase & rBase, SvStream & rOutStm ); - sal_uInt16 WriteSlotParamArray( SvIdlDataBase & rBase, + sal_uInt16 WriteSlotParamArray( SvIdlDataBase & rBase, SvStream & rOutStm ); virtual void WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm, HelpIdTable& rIdTable ) SAL_OVERRIDE; diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx index 077b8768980b..4b08f7143e9c 100644 --- a/idl/inc/types.hxx +++ b/idl/inc/types.hxx @@ -44,12 +44,12 @@ class SvMetaAttribute : public SvMetaReference SvBOOL aIsCollection; SvBOOL aReadOnlyDoc; SvBOOL aHidden; - sal_Bool bNewAttr; + bool bNewAttr; protected: virtual void WriteCSource( SvIdlDataBase & rBase, - SvStream & rOutStm, sal_Bool bSet ); - sal_uLong MakeSlotValue( SvIdlDataBase & rBase, sal_Bool bVariable ) const; + SvStream & rOutStm, bool bSet ); + sal_uLong MakeSlotValue( SvIdlDataBase & rBase, bool bVariable ) const; virtual void WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0 ) SAL_OVERRIDE; @@ -62,45 +62,45 @@ public: SvMetaAttribute(); SvMetaAttribute( SvMetaType * ); - void SetNewAttribute( sal_Bool bNew ) + void SetNewAttribute( bool bNew ) { bNewAttr = bNew; } - sal_Bool IsNewAttribute() const + bool IsNewAttribute() const { return bNewAttr; } - sal_Bool GetReadonly() const; + bool GetReadonly() const; void SetSlotId( const SvNumberIdentifier & rId ) { aSlotId = rId; } const SvNumberIdentifier & GetSlotId() const; - void SetExport( sal_Bool bSet ) + void SetExport( bool bSet ) { aExport = bSet; } - sal_Bool GetExport() const; + bool GetExport() const; - void SetHidden( sal_Bool bSet ) + void SetHidden( bool bSet ) { aHidden = bSet; } - sal_Bool GetHidden() const; + bool GetHidden() const; - void SetAutomation( sal_Bool bSet ) + void SetAutomation( bool bSet ) { aAutomation = bSet; } - sal_Bool GetAutomation() const; + bool GetAutomation() const; - void SetIsCollection( sal_Bool bSet ) + void SetIsCollection( bool bSet ) { aIsCollection = bSet; } - sal_Bool GetIsCollection() const; - void SetReadOnlyDoc( sal_Bool bSet ) + bool GetIsCollection() const; + void SetReadOnlyDoc( bool bSet ) { aReadOnlyDoc = bSet; } - sal_Bool GetReadOnlyDoc() const; + bool GetReadOnlyDoc() const; void SetType( SvMetaType * pT ) { aType = pT; } SvMetaType * GetType() const; - virtual sal_Bool IsMethod() const; - virtual sal_Bool IsVariable() const; - virtual OString GetMangleName( sal_Bool bVariable ) const; + virtual bool IsMethod() const; + virtual bool IsVariable() const; + virtual OString GetMangleName( bool bVariable ) const; - virtual sal_Bool Test( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE; - virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE; + virtual bool Test( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE; + virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE; virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE; virtual void WriteParam( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType ); @@ -140,14 +140,14 @@ class SvMetaType : public SvMetaExtern SvIdentifier aBasicName; SvMetaAttributeMemberList * pAttrList; int nType; - sal_Bool bIsItem; - sal_Bool bIsShell; + bool bIsItem; + bool bIsShell; char cParserChar; void WriteSfxItem( const OString& rItemName, SvIdlDataBase & rBase, SvStream & rOutStm ); protected: - sal_Bool ReadNamesSvIdl( SvIdlDataBase & rBase, + bool ReadNamesSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ); virtual void ReadAttributesSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE; virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE; @@ -160,7 +160,7 @@ protected: WriteType, WriteAttribute = 0 ) SAL_OVERRIDE; virtual void WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0 ) SAL_OVERRIDE; - sal_Bool ReadHeaderSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + bool ReadHeaderSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); void WriteHeaderSvIdl( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16 nTab ); public: @@ -187,14 +187,14 @@ public: int GetType() const { return nType; } SvMetaType * GetBaseType() const; SvMetaType * GetReturnType() const; - sal_Bool IsItem() const { return bIsItem; } - sal_Bool IsShell() const { return bIsShell; } + bool IsItem() const { return bIsItem; } + bool IsShell() const { return bIsShell; } - void SetIn( sal_Bool b ) { aIn = b; } - sal_Bool GetIn() const; + void SetIn( bool b ) { aIn = b; } + bool GetIn() const; - void SetOut( sal_Bool b ) { aOut = b; } - sal_Bool GetOut() const; + void SetOut( bool b ) { aOut = b; } + bool GetOut() const; void SetCall0( int e ); int GetCall0() const; @@ -213,26 +213,26 @@ public: const OString& GetCName() const; char GetParserChar() const { return cParserChar; } - virtual sal_Bool SetName( const OString& rName, SvIdlDataBase * = NULL ) SAL_OVERRIDE; + virtual bool SetName( const OString& rName, SvIdlDataBase * = NULL ) SAL_OVERRIDE; - virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE; + virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE; virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE; virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0 ) SAL_OVERRIDE; - OString GetCString() const; + OString GetCString() const; void WriteSvIdlType( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); void WriteOdlType( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); sal_uLong MakeSfx( OStringBuffer& rAtrrArray ); virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ); - sal_Bool ReadMethodArgs( SvIdlDataBase & rBase, + bool ReadMethodArgs( SvIdlDataBase & rBase, SvTokenStream & rInStm ); 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 ); - OString GetParserString() const; + OString GetParserString() const; void WriteParamNames( SvIdlDataBase & rBase, SvStream & rOutStm, const OString& rChief ); }; @@ -256,7 +256,7 @@ public: SV_DECL_META_FACTORY1( SvMetaEnumValue, SvMetaName, 20 ) SvMetaEnumValue(); - virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE; + virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE; virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE; virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0 ) SAL_OVERRIDE; @@ -279,13 +279,13 @@ public: SV_DECL_META_FACTORY1( SvMetaTypeEnum, SvMetaType, 21 ) SvMetaTypeEnum(); - sal_uInt16 GetMaxValue() const; - sal_uLong Count() const { return aEnumValueList.size(); } - const OString& GetPrefix() const { return aPrefix; } + sal_uInt16 GetMaxValue() const; + sal_uLong Count() const { return aEnumValueList.size(); } + const OString& GetPrefix() const { return aPrefix; } SvMetaEnumValue * GetObject( sal_uLong n ) const { return aEnumValueList[n]; } - virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE; + virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE; virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE; virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, |