svtools/svparser.hxx: sal_Bool->bool

Change-Id: I130c40227a756b396c4f858468457867d53454b1
This commit is contained in:
Noel Grandin
2014-03-24 11:31:45 +02:00
parent b4d4ede795
commit bdd2df7723
5 changed files with 28 additions and 28 deletions

View File

@@ -84,7 +84,7 @@ OHTMLReader::OHTMLReader(SvStream& rIn,const SharedConnection& _rxConnection,
SAL_INFO("dbaccess.ui", "OHTMLReader::OHTMLReader" ); SAL_INFO("dbaccess.ui", "OHTMLReader::OHTMLReader" );
SetSrcEncoding( GetExtendedCompatibilityTextEncoding( RTL_TEXTENCODING_ISO_8859_1 ) ); SetSrcEncoding( GetExtendedCompatibilityTextEncoding( RTL_TEXTENCODING_ISO_8859_1 ) );
// If the file starts with a BOM, switch to UCS2. // If the file starts with a BOM, switch to UCS2.
SetSwitchToUCS2( sal_True ); SetSwitchToUCS2( true );
} }
OHTMLReader::OHTMLReader(SvStream& rIn, OHTMLReader::OHTMLReader(SvStream& rIn,
@@ -106,7 +106,7 @@ OHTMLReader::OHTMLReader(SvStream& rIn,
SAL_INFO("dbaccess.ui", "OHTMLReader::OHTMLReader" ); SAL_INFO("dbaccess.ui", "OHTMLReader::OHTMLReader" );
SetSrcEncoding( GetExtendedCompatibilityTextEncoding( RTL_TEXTENCODING_ISO_8859_1 ) ); SetSrcEncoding( GetExtendedCompatibilityTextEncoding( RTL_TEXTENCODING_ISO_8859_1 ) );
// If the file starts with a BOM, switch to UCS2. // If the file starts with a BOM, switch to UCS2.
SetSwitchToUCS2( sal_True ); SetSwitchToUCS2( true );
} }
OHTMLReader::~OHTMLReader() OHTMLReader::~OHTMLReader()

View File

@@ -54,7 +54,7 @@ protected:
SvParser_Impl *pImplData; // interne Daten SvParser_Impl *pImplData; // interne Daten
long nTokenValue; // zusaetzlicher Wert (RTF) long nTokenValue; // zusaetzlicher Wert (RTF)
sal_Bool bTokenHasValue; // indicates whether nTokenValue is valid bool bTokenHasValue; // indicates whether nTokenValue is valid
SvParserState eState; // Status auch in abgl. Klassen SvParserState eState; // Status auch in abgl. Klassen
rtl_TextEncoding eSrcEnc; // Source encoding rtl_TextEncoding eSrcEnc; // Source encoding
@@ -63,7 +63,7 @@ protected:
sal_Unicode nNextCh; // Akt. Zeichen fuer die "lex" sal_Unicode nNextCh; // Akt. Zeichen fuer die "lex"
sal_Bool bDownloadingFile : 1;// sal_True: Es wird gerade ein externes bool bDownloadingFile : 1;// sal_True: Es wird gerade ein externes
// File geladen. d.h. alle // File geladen. d.h. alle
// DataAvailable Links muessen // DataAvailable Links muessen
// ignoriert werden. // ignoriert werden.
@@ -72,16 +72,16 @@ protected:
// Stream als ANSI gelesen, // Stream als ANSI gelesen,
// aber als CharSet DONTKNOW // aber als CharSet DONTKNOW
// zurueckgegeben. // zurueckgegeben.
sal_Bool bUCS2BSrcEnc : 1; // oder als big-endian UCS2 bool bUCS2BSrcEnc : 1; // oder als big-endian UCS2
sal_Bool bSwitchToUCS2 : 1; // Umschalten des ist erlaubt bool bSwitchToUCS2 : 1; // Umschalten des ist erlaubt
sal_Bool bRTF_InTextRead : 1; // only for RTF-Parser!!! bool bRTF_InTextRead : 1; // only for RTF-Parser!!!
struct TokenStackType struct TokenStackType
{ {
OUString sToken; OUString sToken;
long nTokenValue; long nTokenValue;
sal_Bool bTokenHasValue; bool bTokenHasValue;
int nTokenId; int nTokenId;
inline TokenStackType() { nTokenId = 0; } inline TokenStackType() { nTokenId = 0; }
@@ -142,21 +142,21 @@ public:
/*virtual*/ void RestoreState(); /*virtual*/ void RestoreState();
virtual void Continue( int nToken ); virtual void Continue( int nToken );
inline void SetDownloadingFile( sal_Bool bSet ) { bDownloadingFile = bSet; } inline void SetDownloadingFile( bool bSet ) { bDownloadingFile = bSet; }
inline sal_Bool IsDownloadingFile() const { return bDownloadingFile; } inline bool IsDownloadingFile() const { return bDownloadingFile; }
// Set/get source encoding. The UCS2BEncoding flag is valid if source // Set/get source encoding. The UCS2BEncoding flag is valid if source
// encoding is UCS2. It specifies a big endian encoding. // encoding is UCS2. It specifies a big endian encoding.
void SetSrcEncoding( rtl_TextEncoding eSrcEnc ); void SetSrcEncoding( rtl_TextEncoding eSrcEnc );
rtl_TextEncoding GetSrcEncoding() const { return eSrcEnc; } rtl_TextEncoding GetSrcEncoding() const { return eSrcEnc; }
void SetSrcUCS2BEncoding( sal_Bool bSet ) { bUCS2BSrcEnc = bSet; } void SetSrcUCS2BEncoding( bool bSet ) { bUCS2BSrcEnc = bSet; }
sal_Bool IsSrcUCS2BEncoding() const { return bUCS2BSrcEnc; } bool IsSrcUCS2BEncoding() const { return bUCS2BSrcEnc; }
// Darf der Zeichensatz auf UCS/2 umgeschaltet werden, wenn // Darf der Zeichensatz auf UCS/2 umgeschaltet werden, wenn
// in den ersten beiden Zeichen im Stream eine BOM steht? // in den ersten beiden Zeichen im Stream eine BOM steht?
void SetSwitchToUCS2( sal_Bool bSet ) { bSwitchToUCS2 = bSet; } void SetSwitchToUCS2( bool bSet ) { bSwitchToUCS2 = bSet; }
sal_Bool IsSwitchToUCS2() const { return bSwitchToUCS2; } bool IsSwitchToUCS2() const { return bSwitchToUCS2; }
// Aus wie vielen Bytes betseht ein Zeichen // Aus wie vielen Bytes betseht ein Zeichen
inline sal_uInt16 GetCharSize() const; inline sal_uInt16 GetCharSize() const;
@@ -266,8 +266,8 @@ public:
/** Operation. /** Operation.
*/ */
virtual sal_Bool GetFirst (SvKeyValue &rKeyVal); virtual bool GetFirst (SvKeyValue &rKeyVal);
virtual sal_Bool GetNext (SvKeyValue &rKeyVal); virtual bool GetNext (SvKeyValue &rKeyVal);
virtual void Append (const SvKeyValue &rKeyVal); virtual void Append (const SvKeyValue &rKeyVal);
}; };

View File

@@ -76,7 +76,7 @@ SfxHTMLParser::SfxHTMLParser( SvStream& rStream, bool bIsNewDoc,
"SfxHTMLParser::SfxHTMLParser: Switch to UCS2?" ); "SfxHTMLParser::SfxHTMLParser: Switch to UCS2?" );
// If the file starts with a BOM, switch to UCS2. // If the file starts with a BOM, switch to UCS2.
SetSwitchToUCS2( sal_True ); SetSwitchToUCS2( true );
} }
SfxHTMLParser::~SfxHTMLParser() SfxHTMLParser::~SfxHTMLParser()

View File

@@ -148,8 +148,8 @@ public:
xIter( pSh->GetMedium()->GetHeaderAttributes_Impl() ), xIter( pSh->GetMedium()->GetHeaderAttributes_Impl() ),
bAlert( false ) {} bAlert( false ) {}
virtual sal_Bool GetFirst( SvKeyValue& rKV ) { return xIter->GetFirst( rKV ); } virtual bool GetFirst( SvKeyValue& rKV ) { return xIter->GetFirst( rKV ); }
virtual sal_Bool GetNext( SvKeyValue& rKV ) { return xIter->GetNext( rKV ); } virtual bool GetNext( SvKeyValue& rKV ) { return xIter->GetNext( rKV ); }
virtual void Append( const SvKeyValue& rKV ); virtual void Append( const SvKeyValue& rKV );
void ClearForSourceView() { xIter = new SvKeyValueIterator; bAlert = false; } void ClearForSourceView() { xIter = new SvKeyValueIterator; bAlert = false; }

View File

@@ -164,14 +164,14 @@ sal_Unicode SvParser::GetNextChar()
if( 0xfe == c1 && 0xff == c2 ) if( 0xfe == c1 && 0xff == c2 )
{ {
eSrcEnc = RTL_TEXTENCODING_UCS2; eSrcEnc = RTL_TEXTENCODING_UCS2;
bUCS2BSrcEnc = sal_True; bUCS2BSrcEnc = true;
bSeekBack = sal_False; bSeekBack = false;
} }
else if( 0xff == c1 && 0xfe == c2 ) else if( 0xff == c1 && 0xfe == c2 )
{ {
eSrcEnc = RTL_TEXTENCODING_UCS2; eSrcEnc = RTL_TEXTENCODING_UCS2;
bUCS2BSrcEnc = sal_False; bUCS2BSrcEnc = false;
bSeekBack = sal_False; bSeekBack = false;
} }
} }
} }
@@ -179,7 +179,7 @@ sal_Unicode SvParser::GetNextChar()
if( bSeekBack ) if( bSeekBack )
rInput.Seek( 0 ); rInput.Seek( 0 );
bSwitchToUCS2 = sal_False; bSwitchToUCS2 = false;
} }
nNextChPos = rInput.Tell(); nNextChPos = rInput.Tell();
@@ -641,7 +641,7 @@ SvKeyValueIterator::~SvKeyValueIterator (void)
/* /*
* GetFirst. * GetFirst.
*/ */
sal_Bool SvKeyValueIterator::GetFirst (SvKeyValue &rKeyVal) bool SvKeyValueIterator::GetFirst (SvKeyValue &rKeyVal)
{ {
m_nPos = m_pList->size(); m_nPos = m_pList->size();
return GetNext (rKeyVal); return GetNext (rKeyVal);
@@ -650,17 +650,17 @@ sal_Bool SvKeyValueIterator::GetFirst (SvKeyValue &rKeyVal)
/* /*
* GetNext. * GetNext.
*/ */
sal_Bool SvKeyValueIterator::GetNext (SvKeyValue &rKeyVal) bool SvKeyValueIterator::GetNext (SvKeyValue &rKeyVal)
{ {
if (m_nPos > 0) if (m_nPos > 0)
{ {
rKeyVal = (*m_pList)[--m_nPos]; rKeyVal = (*m_pList)[--m_nPos];
return sal_True; return true;
} }
else else
{ {
// Nothing to do. // Nothing to do.
return sal_False; return false;
} }
} }