Kaydet (Commit) 706fee2f authored tarafından Noel Grandin's avatar Noel Grandin

editeng: sal_Bool->bool

Change-Id: I69c210b79f4d1b64863ac0ab2b012f033f40fe10
üst 2a4a74a4
...@@ -213,7 +213,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) ...@@ -213,7 +213,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
FontUnderline eUnderline; FontUnderline eUnderline;
FontUnderline eOverline; FontUnderline eOverline;
FontEmphasisMark eEmphasis; FontEmphasisMark eEmphasis;
bPardTokenRead = sal_False; bPardTokenRead = false;
RTF_CharTypeDef eCharType = NOTDEF_CHARTYPE; RTF_CharTypeDef eCharType = NOTDEF_CHARTYPE;
sal_uInt16 nFontAlign; sal_uInt16 nFontAlign;
...@@ -227,7 +227,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) ...@@ -227,7 +227,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
RTFPardPlain( sal_True, &pSet ); RTFPardPlain( sal_True, &pSet );
ResetPard(); ResetPard();
nStyleNo = 0; nStyleNo = 0;
bPardTokenRead = sal_True; bPardTokenRead = true;
break; break;
case RTF_PLAIN: case RTF_PLAIN:
...@@ -987,10 +987,10 @@ ATTR_SETOVERLINE: ...@@ -987,10 +987,10 @@ ATTR_SETOVERLINE:
break; break;
case RTF_RTLCH: case RTF_RTLCH:
bIsLeftToRightDef = sal_False; bIsLeftToRightDef = false;
break; break;
case RTF_LTRCH: case RTF_LTRCH:
bIsLeftToRightDef = sal_True; bIsLeftToRightDef = true;
break; break;
case RTF_RTLPAR: case RTF_RTLPAR:
if (PARDID->nDirection) if (PARDID->nDirection)
...@@ -1821,10 +1821,10 @@ void SvxRTFParser::SetDefault( int nToken, int nValue ) ...@@ -1821,10 +1821,10 @@ void SvxRTFParser::SetDefault( int nToken, int nValue )
SfxItemSet aTmp( *pAttrPool, &aWhichMap[0] ); SfxItemSet aTmp( *pAttrPool, &aWhichMap[0] );
sal_Bool bOldFlag = bIsLeftToRightDef; sal_Bool bOldFlag = bIsLeftToRightDef;
bIsLeftToRightDef = sal_True; bIsLeftToRightDef = true;
switch( nToken ) switch( nToken )
{ {
case RTF_ADEFF: bIsLeftToRightDef = sal_False; // no break! case RTF_ADEFF: bIsLeftToRightDef = false; // no break!
case RTF_DEFF: case RTF_DEFF:
{ {
if( -1 == nValue ) if( -1 == nValue )
...@@ -1838,7 +1838,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue ) ...@@ -1838,7 +1838,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue )
} }
break; break;
case RTF_ADEFLANG: bIsLeftToRightDef = sal_False; // no break! case RTF_ADEFLANG: bIsLeftToRightDef = false; // no break!
case RTF_DEFLANG: case RTF_DEFLANG:
// store default Language // store default Language
if( -1 != nValue ) if( -1 != nValue )
...@@ -1853,7 +1853,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue ) ...@@ -1853,7 +1853,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue )
if( PARDID->nTabStop ) if( PARDID->nTabStop )
{ {
// RTF defines 720 twips as default // RTF defines 720 twips as default
bIsSetDfltTab = sal_True; bIsSetDfltTab = true;
if( -1 == nValue || !nValue ) if( -1 == nValue || !nValue )
nValue = 720; nValue = 720;
......
...@@ -70,14 +70,14 @@ SvxRTFParser::SvxRTFParser( SfxItemPool& rPool, SvStream& rIn, ...@@ -70,14 +70,14 @@ SvxRTFParser::SvxRTFParser( SfxItemPool& rPool, SvStream& rIn,
, nVersionNo( 0 ) , nVersionNo( 0 )
, nDfltFont( 0) , nDfltFont( 0)
, bNewDoc( bReadNewDoc ) , bNewDoc( bReadNewDoc )
, bNewGroup( sal_False) , bNewGroup( false)
, bIsSetDfltTab( sal_False) , bIsSetDfltTab( false)
, bChkStyleAttr( sal_False ) , bChkStyleAttr( false )
, bCalcValue( sal_False ) , bCalcValue( false )
, bPardTokenRead( sal_False) , bPardTokenRead( false)
, bReadDocInfo( sal_False ) , bReadDocInfo( false )
, bIsLeftToRightDef( sal_True) , bIsLeftToRightDef( true)
, bIsInReadStyleTab( sal_False) , bIsInReadStyleTab( false)
{ {
{ {
...@@ -143,8 +143,8 @@ SvParserState SvxRTFParser::CallParser() ...@@ -143,8 +143,8 @@ SvParserState SvxRTFParser::CallParser()
if( !aAttrStack.empty() ) if( !aAttrStack.empty() )
ClearAttrStack(); ClearAttrStack();
bIsSetDfltTab = sal_False; bIsSetDfltTab = false;
bNewGroup = sal_False; bNewGroup = false;
nDfltFont = 0; nDfltFont = 0;
sBaseURL = ""; sBaseURL = "";
...@@ -321,14 +321,14 @@ INSINGLECHAR: ...@@ -321,14 +321,14 @@ INSINGLECHAR:
void SvxRTFParser::ReadStyleTable() void SvxRTFParser::ReadStyleTable()
{ {
int nToken, bSaveChkStyleAttr = bChkStyleAttr; int nToken, bSaveChkStyleAttr = bChkStyleAttr ? 1 : 0;
sal_uInt16 nStyleNo = 0; sal_uInt16 nStyleNo = 0;
int _nOpenBrakets = 1; // the first was already detected earlier!! int _nOpenBrakets = 1; // the first was already detected earlier!!
SvxRTFStyleType* pStyle = new SvxRTFStyleType( *pAttrPool, &aWhichMap[0] ); SvxRTFStyleType* pStyle = new SvxRTFStyleType( *pAttrPool, &aWhichMap[0] );
pStyle->aAttrSet.Put( GetRTFDefaults() ); pStyle->aAttrSet.Put( GetRTFDefaults() );
bIsInReadStyleTab = sal_True; bIsInReadStyleTab = true;
bChkStyleAttr = sal_False; // Do not check Attribute against the Styles bChkStyleAttr = false; // Do not check Attribute against the Styles
while( _nOpenBrakets && IsParserWorking() ) while( _nOpenBrakets && IsParserWorking() )
{ {
...@@ -359,13 +359,13 @@ void SvxRTFParser::ReadStyleTable() ...@@ -359,13 +359,13 @@ void SvxRTFParser::ReadStyleTable()
} }
break; break;
case RTF_SBASEDON: pStyle->nBasedOn = sal_uInt16(nTokenValue); pStyle->bBasedOnIsSet=sal_True; break; case RTF_SBASEDON: pStyle->nBasedOn = sal_uInt16(nTokenValue); pStyle->bBasedOnIsSet=true; break;
case RTF_SNEXT: pStyle->nNext = sal_uInt16(nTokenValue); break; case RTF_SNEXT: pStyle->nNext = sal_uInt16(nTokenValue); break;
case RTF_OUTLINELEVEL: case RTF_OUTLINELEVEL:
case RTF_SOUTLVL: pStyle->nOutlineNo = sal_uInt8(nTokenValue); break; case RTF_SOUTLVL: pStyle->nOutlineNo = sal_uInt8(nTokenValue); break;
case RTF_S: nStyleNo = (short)nTokenValue; break; case RTF_S: nStyleNo = (short)nTokenValue; break;
case RTF_CS: nStyleNo = (short)nTokenValue; case RTF_CS: nStyleNo = (short)nTokenValue;
pStyle->bIsCharFmt = sal_True; pStyle->bIsCharFmt = true;
break; break;
case RTF_TEXTTOKEN: case RTF_TEXTTOKEN:
...@@ -415,7 +415,7 @@ void SvxRTFParser::ReadStyleTable() ...@@ -415,7 +415,7 @@ void SvxRTFParser::ReadStyleTable()
// Flag back to old state // Flag back to old state
bChkStyleAttr = bSaveChkStyleAttr; bChkStyleAttr = bSaveChkStyleAttr;
bIsInReadStyleTab = sal_False; bIsInReadStyleTab = false;
} }
void SvxRTFParser::ReadColorTable() void SvxRTFParser::ReadColorTable()
...@@ -468,7 +468,7 @@ void SvxRTFParser::ReadFontTable() ...@@ -468,7 +468,7 @@ void SvxRTFParser::ReadFontTable()
Font* pFont = new Font(); Font* pFont = new Font();
short nFontNo(0), nInsFontNo (0); short nFontNo(0), nInsFontNo (0);
OUString sAltNm, sFntNm; OUString sAltNm, sFntNm;
sal_Bool bIsAltFntNm = sal_False, bCheckNewFont; bool bIsAltFntNm = false, bCheckNewFont;
rtl_TextEncoding nSystemChar = lcl_GetDefaultTextEncodingForRTF(); rtl_TextEncoding nSystemChar = lcl_GetDefaultTextEncodingForRTF();
pFont->SetCharSet( nSystemChar ); pFont->SetCharSet( nSystemChar );
...@@ -476,16 +476,16 @@ void SvxRTFParser::ReadFontTable() ...@@ -476,16 +476,16 @@ void SvxRTFParser::ReadFontTable()
while( _nOpenBrakets && IsParserWorking() ) while( _nOpenBrakets && IsParserWorking() )
{ {
bCheckNewFont = sal_False; bCheckNewFont = false;
switch( ( nToken = GetNextToken() )) switch( ( nToken = GetNextToken() ))
{ {
case '}': case '}':
bIsAltFntNm = sal_False; bIsAltFntNm = false;
// Style has been completely read, // Style has been completely read,
// so this is still a stable status // so this is still a stable status
if( --_nOpenBrakets <= 1 && IsParserWorking() ) if( --_nOpenBrakets <= 1 && IsParserWorking() )
SaveState( RTF_FONTTBL ); SaveState( RTF_FONTTBL );
bCheckNewFont = sal_True; bCheckNewFont = true;
nInsFontNo = nFontNo; nInsFontNo = nFontNo;
break; break;
case '{': case '{':
...@@ -555,12 +555,12 @@ void SvxRTFParser::ReadFontTable() ...@@ -555,12 +555,12 @@ void SvxRTFParser::ReadFontTable()
} }
break; break;
case RTF_F: case RTF_F:
bCheckNewFont = sal_True; bCheckNewFont = true;
nInsFontNo = nFontNo; nInsFontNo = nFontNo;
nFontNo = (short)nTokenValue; nFontNo = (short)nTokenValue;
break; break;
case RTF_FALT: case RTF_FALT:
bIsAltFntNm = sal_True; bIsAltFntNm = true;
break; break;
case RTF_TEXTTOKEN: case RTF_TEXTTOKEN:
DelCharAtEnd( aToken, ';' ); DelCharAtEnd( aToken, ';' );
...@@ -648,7 +648,7 @@ OUString& SvxRTFParser::GetTextToEndGroup( OUString& rStr ) ...@@ -648,7 +648,7 @@ OUString& SvxRTFParser::GetTextToEndGroup( OUString& rStr )
util::DateTime SvxRTFParser::GetDateTimeStamp( ) util::DateTime SvxRTFParser::GetDateTimeStamp( )
{ {
util::DateTime aDT; util::DateTime aDT;
sal_Bool bContinue = sal_True; bool bContinue = true;
while( bContinue && IsParserWorking() ) while( bContinue && IsParserWorking() )
{ {
...@@ -661,7 +661,7 @@ util::DateTime SvxRTFParser::GetDateTimeStamp( ) ...@@ -661,7 +661,7 @@ util::DateTime SvxRTFParser::GetDateTimeStamp( )
case RTF_HR: aDT.Hours = (sal_uInt16)nTokenValue; break; case RTF_HR: aDT.Hours = (sal_uInt16)nTokenValue; break;
case RTF_MIN: aDT.Minutes = (sal_uInt16)nTokenValue; break; case RTF_MIN: aDT.Minutes = (sal_uInt16)nTokenValue; break;
default: default:
bContinue = sal_False; bContinue = false;
} }
} }
SkipToken( -1 ); // the closing brace is evaluated "above" SkipToken( -1 ); // the closing brace is evaluated "above"
...@@ -844,7 +844,7 @@ SvxRTFItemStackType* SvxRTFParser::_GetAttrSet( int bCopyAttr ) ...@@ -844,7 +844,7 @@ SvxRTFItemStackType* SvxRTFParser::_GetAttrSet( int bCopyAttr )
pNew->SetRTFDefaults( GetRTFDefaults() ); pNew->SetRTFDefaults( GetRTFDefaults() );
aAttrStack.push_back( pNew ); aAttrStack.push_back( pNew );
bNewGroup = sal_False; bNewGroup = false;
return pNew; return pNew;
} }
...@@ -1064,7 +1064,7 @@ void SvxRTFParser::AttrGroupEnd() // process the current, delete from Stack ...@@ -1064,7 +1064,7 @@ void SvxRTFParser::AttrGroupEnd() // process the current, delete from Stack
if( pOld ) if( pOld )
delete pOld; delete pOld;
bNewGroup = sal_False; bNewGroup = false;
} }
} }
...@@ -1149,9 +1149,9 @@ SvxRTFStyleType::SvxRTFStyleType( SfxItemPool& rPool, const sal_uInt16* pWhichRa ...@@ -1149,9 +1149,9 @@ SvxRTFStyleType::SvxRTFStyleType( SfxItemPool& rPool, const sal_uInt16* pWhichRa
{ {
nOutlineNo = sal_uInt8(-1); // not set nOutlineNo = sal_uInt8(-1); // not set
nBasedOn = 0; nBasedOn = 0;
bBasedOnIsSet = sal_False; //$flr #117411# bBasedOnIsSet = false; //$flr #117411#
nNext = 0; nNext = 0;
bIsCharFmt = sal_False; bIsCharFmt = false;
} }
......
...@@ -91,9 +91,9 @@ struct SvxRTFStyleType ...@@ -91,9 +91,9 @@ struct SvxRTFStyleType
SfxItemSet aAttrSet; // the attributes of Style (+ derivate!) SfxItemSet aAttrSet; // the attributes of Style (+ derivate!)
OUString sName; OUString sName;
sal_uInt16 nBasedOn, nNext; sal_uInt16 nBasedOn, nNext;
sal_Bool bBasedOnIsSet; bool bBasedOnIsSet;
sal_uInt8 nOutlineNo; sal_uInt8 nOutlineNo;
sal_Bool bIsCharFmt; bool bIsCharFmt;
SvxRTFStyleType( SfxItemPool& rPool, const sal_uInt16* pWhichRange ); SvxRTFStyleType( SfxItemPool& rPool, const sal_uInt16* pWhichRange );
}; };
...@@ -198,16 +198,16 @@ class EDITENG_DLLPUBLIC SvxRTFParser : public SvRTFParser ...@@ -198,16 +198,16 @@ class EDITENG_DLLPUBLIC SvxRTFParser : public SvRTFParser
long nVersionNo; long nVersionNo;
int nDfltFont; int nDfltFont;
sal_Bool bNewDoc : 1; // sal_False - Reading in an existing bool bNewDoc : 1; // sal_False - Reading in an existing
sal_Bool bNewGroup : 1; // sal_True - there was an opening parenthesis bool bNewGroup : 1; // sal_True - there was an opening parenthesis
sal_Bool bIsSetDfltTab : 1; // sal_True - DefTab was loaded bool bIsSetDfltTab : 1; // sal_True - DefTab was loaded
sal_Bool bChkStyleAttr : 1; // sal_True - StyleSheets are evaluated bool bChkStyleAttr : 1; // sal_True - StyleSheets are evaluated
sal_Bool bCalcValue : 1; // sal_True - Twip values adapt to App bool bCalcValue : 1; // sal_True - Twip values adapt to App
sal_Bool bPardTokenRead : 1; // sal_True - Token \pard was detected bool bPardTokenRead : 1; // sal_True - Token \pard was detected
sal_Bool bReadDocInfo : 1; // sal_True - DocInfo to read bool bReadDocInfo : 1; // sal_True - DocInfo to read
sal_Bool bIsLeftToRightDef : 1; // sal_True - in LeftToRight char run def. bool bIsLeftToRightDef : 1; // sal_True - in LeftToRight char run def.
// sal_False - in RightToLeft char run def. // sal_False - in RightToLeft char run def.
sal_Bool bIsInReadStyleTab : 1; // sal_True - in ReadStyleTable bool bIsInReadStyleTab : 1; // sal_True - in ReadStyleTable
void ClearColorTbl(); void ClearColorTbl();
void ClearFontTbl(); void ClearFontTbl();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment