Kaydet (Commit) 38b29bbc authored tarafından Takeshi Abe's avatar Takeshi Abe

sal_Bool to bool

Change-Id: Ib9a6f3ecbe38cdad6e28b4d8a9ae13d1f5bc4265
üst 5ae27819
...@@ -469,7 +469,7 @@ extern sal_uInt16 aCharAutoFmtSetRange[]; ...@@ -469,7 +469,7 @@ extern sal_uInt16 aCharAutoFmtSetRange[];
extern sal_uInt16 aPgFrmFmtSetRange[]; extern sal_uInt16 aPgFrmFmtSetRange[];
// check if ID is InRange of AttrSet-Ids // check if ID is InRange of AttrSet-Ids
sal_Bool IsInRange( const sal_uInt16* pRange, const sal_uInt16 nId ); bool IsInRange( const sal_uInt16* pRange, const sal_uInt16 nId );
#endif #endif
......
...@@ -68,7 +68,7 @@ public: ...@@ -68,7 +68,7 @@ public:
SwTabCols( sal_uInt16 nSize = 0 ); SwTabCols( sal_uInt16 nSize = 0 );
SwTabCols( const SwTabCols& ); SwTabCols( const SwTabCols& );
SwTabCols &operator=( const SwTabCols& ); SwTabCols &operator=( const SwTabCols& );
sal_Bool operator==( const SwTabCols& rCmp ) const; bool operator==( const SwTabCols& rCmp ) const;
long& operator[]( sal_uInt16 nPos ) { return aData[nPos].nPos; } long& operator[]( sal_uInt16 nPos ) { return aData[nPos].nPos; }
long operator[]( sal_uInt16 nPos ) const { return aData[nPos].nPos; } long operator[]( sal_uInt16 nPos ) const { return aData[nPos].nPos; }
sal_uInt16 Count() const { return sal::static_int_cast< sal_uInt16 >(aData.size()); } sal_uInt16 Count() const { return sal::static_int_cast< sal_uInt16 >(aData.size()); }
......
...@@ -249,7 +249,7 @@ SwFmt::~SwFmt() ...@@ -249,7 +249,7 @@ SwFmt::~SwFmt()
void SwFmt::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue ) void SwFmt::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue )
{ {
sal_Bool bContinue = sal_True; // sal_True = pass on to dependent ones bool bContinue = true; // true = pass on to dependent ones
sal_uInt16 nWhich = pOldValue ? pOldValue->Which() : sal_uInt16 nWhich = pOldValue ? pOldValue->Which() :
pNewValue ? pNewValue->Which() : 0 ; pNewValue ? pNewValue->Which() : 0 ;
...@@ -293,7 +293,7 @@ void SwFmt::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue ) ...@@ -293,7 +293,7 @@ void SwFmt::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue )
if( aNew.Count() ) if( aNew.Count() )
NotifyClients( &aOld, &aNew ); NotifyClients( &aOld, &aNew );
bContinue = sal_False; bContinue = false;
} }
break; break;
case RES_FMT_CHG: case RES_FMT_CHG:
...@@ -318,7 +318,7 @@ void SwFmt::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue ) ...@@ -318,7 +318,7 @@ void SwFmt::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue )
// pass Hint only to dependent formats (no Frames) // pass Hint only to dependent formats (no Frames)
ModifyBroadcast( pOldValue, pNewValue, TYPE(SwFmt) ); ModifyBroadcast( pOldValue, pNewValue, TYPE(SwFmt) );
bContinue = sal_False; bContinue = false;
} }
break; break;
default: default:
...@@ -328,7 +328,7 @@ void SwFmt::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue ) ...@@ -328,7 +328,7 @@ void SwFmt::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue )
{ {
// DropCaps might come into this block // DropCaps might come into this block
OSL_ENSURE( RES_PARATR_DROP == nWhich, "Modify was sent without sender" ); OSL_ENSURE( RES_PARATR_DROP == nWhich, "Modify was sent without sender" );
bContinue = sal_False; bContinue = false;
} }
} }
} }
...@@ -529,7 +529,7 @@ sal_uInt16 SwFmt::ResetAllFmtAttr() ...@@ -529,7 +529,7 @@ sal_uInt16 SwFmt::ResetAllFmtAttr()
SwAttrSet aOld( *aSet.GetPool(), aSet.GetRanges() ), SwAttrSet aOld( *aSet.GetPool(), aSet.GetRanges() ),
aNew( *aSet.GetPool(), aSet.GetRanges() ); aNew( *aSet.GetPool(), aSet.GetRanges() );
sal_Bool bRet = 0 != aSet.ClearItem_BC( 0, &aOld, &aNew ); bool bRet = 0 != aSet.ClearItem_BC( 0, &aOld, &aNew );
if( bRet ) if( bRet )
{ {
SwAttrSetChg aChgOld( aSet, aOld ); SwAttrSetChg aChgOld( aSet, aOld );
...@@ -566,7 +566,7 @@ void SwFmt::DelDiffs( const SfxItemSet& rSet ) ...@@ -566,7 +566,7 @@ void SwFmt::DelDiffs( const SfxItemSet& rSet )
SwAttrSet aOld( *aSet.GetPool(), aSet.GetRanges() ), SwAttrSet aOld( *aSet.GetPool(), aSet.GetRanges() ),
aNew( *aSet.GetPool(), aSet.GetRanges() ); aNew( *aSet.GetPool(), aSet.GetRanges() );
sal_Bool bRet = 0 != aSet.Intersect_BC( rSet, &aOld, &aNew ); bool bRet = 0 != aSet.Intersect_BC( rSet, &aOld, &aNew );
if( bRet ) if( bRet )
{ {
SwAttrSetChg aChgOld( aSet, aOld ); SwAttrSetChg aChgOld( aSet, aOld );
......
...@@ -373,15 +373,15 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const ...@@ -373,15 +373,15 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
} }
/// check if ID is in range of attribute set IDs /// check if ID is in range of attribute set IDs
sal_Bool IsInRange( const sal_uInt16* pRange, const sal_uInt16 nId ) bool IsInRange( const sal_uInt16* pRange, const sal_uInt16 nId )
{ {
while( *pRange ) while( *pRange )
{ {
if( *pRange <= nId && nId <= *(pRange+1) ) if( *pRange <= nId && nId <= *(pRange+1) )
return sal_True; return true;
pRange += 2; pRange += 2;
} }
return sal_False; return false;
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -671,13 +671,13 @@ SwCalcOper SwCalc::GetToken() ...@@ -671,13 +671,13 @@ SwCalcOper SwCalc::GetToken()
coStartFlags, aEmptyStr, coStartFlags, aEmptyStr,
coContFlags, aEmptyStr ); coContFlags, aEmptyStr );
sal_Bool bSetError = sal_True; bool bSetError = true;
xub_StrLen nRealStt = nCommandPos + (xub_StrLen)aRes.LeadingWhiteSpace; xub_StrLen nRealStt = nCommandPos + (xub_StrLen)aRes.LeadingWhiteSpace;
if( aRes.TokenType & (KParseType::ASC_NUMBER | KParseType::UNI_NUMBER) ) if( aRes.TokenType & (KParseType::ASC_NUMBER | KParseType::UNI_NUMBER) )
{ {
nNumberValue.PutDouble( aRes.Value ); nNumberValue.PutDouble( aRes.Value );
eCurrOper = CALC_NUMBER; eCurrOper = CALC_NUMBER;
bSetError = sal_False; bSetError = false;
} }
else if( aRes.TokenType & KParseType::IDENTNAME ) else if( aRes.TokenType & KParseType::IDENTNAME )
{ {
...@@ -721,13 +721,13 @@ SwCalcOper SwCalc::GetToken() ...@@ -721,13 +721,13 @@ SwCalcOper SwCalc::GetToken()
} }
aVarName = aName; aVarName = aName;
eCurrOper = CALC_NAME; eCurrOper = CALC_NAME;
bSetError = sal_False; bSetError = false;
} }
else if ( aRes.TokenType & KParseType::DOUBLE_QUOTE_STRING ) else if ( aRes.TokenType & KParseType::DOUBLE_QUOTE_STRING )
{ {
nNumberValue.PutString( String( aRes.DequotedNameOrString )); nNumberValue.PutString( String( aRes.DequotedNameOrString ));
eCurrOper = CALC_NUMBER; eCurrOper = CALC_NUMBER;
bSetError = sal_False; bSetError = false;
} }
else if( aRes.TokenType & KParseType::ONE_SINGLE_CHAR ) else if( aRes.TokenType & KParseType::ONE_SINGLE_CHAR )
{ {
...@@ -735,7 +735,7 @@ SwCalcOper SwCalc::GetToken() ...@@ -735,7 +735,7 @@ SwCalcOper SwCalc::GetToken()
static_cast<xub_StrLen>(aRes.EndPos) - nRealStt )); static_cast<xub_StrLen>(aRes.EndPos) - nRealStt ));
if( 1 == aName.Len() ) if( 1 == aName.Len() )
{ {
bSetError = sal_False; bSetError = false;
sal_Unicode ch = aName.GetChar( 0 ); sal_Unicode ch = aName.GetChar( 0 );
switch( ch ) switch( ch )
{ {
...@@ -815,16 +815,16 @@ SwCalcOper SwCalc::GetToken() ...@@ -815,16 +815,16 @@ SwCalcOper SwCalc::GetToken()
eCurrOper = CALC_NAME; eCurrOper = CALC_NAME;
} }
else else
bSetError = sal_True; bSetError = true;
} }
else else
{ {
bSetError = sal_True; bSetError = true;
} }
break; break;
default: default:
bSetError = sal_True; bSetError = true;
break; break;
} }
} }
...@@ -837,10 +837,10 @@ SwCalcOper SwCalc::GetToken() ...@@ -837,10 +837,10 @@ SwCalcOper SwCalc::GetToken()
{ {
sal_Unicode ch = aName.GetChar(0); sal_Unicode ch = aName.GetChar(0);
bSetError = sal_True; bSetError = true;
if ('<' == ch || '>' == ch) if ('<' == ch || '>' == ch)
{ {
bSetError = sal_False; bSetError = false;
SwCalcOper eTmp2 = ('<' == ch) ? CALC_LEQ : CALC_GEQ; SwCalcOper eTmp2 = ('<' == ch) ? CALC_LEQ : CALC_GEQ;
eCurrOper = ('<' == ch) ? CALC_LES : CALC_GRE; eCurrOper = ('<' == ch) ? CALC_LES : CALC_GRE;
...@@ -848,14 +848,14 @@ SwCalcOper SwCalc::GetToken() ...@@ -848,14 +848,14 @@ SwCalcOper SwCalc::GetToken()
if( 2 == aName.Len() && '=' == aName.GetChar(1) ) if( 2 == aName.Len() && '=' == aName.GetChar(1) )
eCurrOper = eTmp2; eCurrOper = eTmp2;
else if( 1 != aName.Len() ) else if( 1 != aName.Len() )
bSetError = sal_True; bSetError = true;
} }
} }
} }
else if( nRealStt == sCommand.Len() ) else if( nRealStt == sCommand.Len() )
{ {
eCurrOper = CALC_ENDCALC; eCurrOper = CALC_ENDCALC;
bSetError = sal_False; bSetError = false;
} }
if( bSetError ) if( bSetError )
...@@ -983,15 +983,15 @@ SwCalcOper SwCalc::GetToken() ...@@ -983,15 +983,15 @@ SwCalcOper SwCalc::GetToken()
case '[': case '[':
{ {
String aStr; String aStr;
sal_Bool bIgnore = sal_False; bool bIgnore = false;
do { do {
while( 0 != ( ch = NextCh( sCommand, nCommandPos )) && while( 0 != ( ch = NextCh( sCommand, nCommandPos )) &&
ch != ']' ) ch != ']' )
{ {
if( !bIgnore && '\\' == ch ) if( !bIgnore && '\\' == ch )
bIgnore = sal_True; bIgnore = true;
else if( bIgnore ) else if( bIgnore )
bIgnore = sal_False; bIgnore = false;
aStr += ch; aStr += ch;
} }
...@@ -1192,15 +1192,15 @@ SwSbxValue SwCalc::Term() ...@@ -1192,15 +1192,15 @@ SwSbxValue SwCalc::Term()
} }
fVal *= fFac; fVal *= fFac;
sal_Bool bSign; bool bSign;
if (fVal < 0.0) if (fVal < 0.0)
{ {
fVal *= -1.0; fVal *= -1.0;
bSign = sal_True; bSign = true;
} }
else else
{ {
bSign = sal_False; bSign = false;
} }
// rounding // rounding
...@@ -1268,7 +1268,7 @@ SwSbxValue SwCalc::Prim() ...@@ -1268,7 +1268,7 @@ SwSbxValue SwCalc::Prim()
pfCalc pFnc = 0; pfCalc pFnc = 0;
sal_Bool bChkTrig = sal_False, bChkPow = sal_False; bool bChkTrig = false, bChkPow = false;
switch( eCurrOper ) switch( eCurrOper )
{ {
...@@ -1276,8 +1276,8 @@ SwSbxValue SwCalc::Prim() ...@@ -1276,8 +1276,8 @@ SwSbxValue SwCalc::Prim()
case CALC_COS: pFnc = &cos; break; case CALC_COS: pFnc = &cos; break;
case CALC_TAN: pFnc = &tan; break; case CALC_TAN: pFnc = &tan; break;
case CALC_ATAN: pFnc = &atan; break; case CALC_ATAN: pFnc = &atan; break;
case CALC_ASIN: pFnc = &asin; bChkTrig = sal_True; break; case CALC_ASIN: pFnc = &asin; bChkTrig = true; break;
case CALC_ACOS: pFnc = &acos; bChkTrig = sal_True; break; case CALC_ACOS: pFnc = &acos; bChkTrig = true; break;
case CALC_NOT: case CALC_NOT:
{ {
...@@ -1321,7 +1321,7 @@ SwSbxValue SwCalc::Prim() ...@@ -1321,7 +1321,7 @@ SwSbxValue SwCalc::Prim()
else else
{ {
nErg = nNumberValue; nErg = nNumberValue;
bChkPow = sal_True; bChkPow = true;
} }
break; break;
...@@ -1335,7 +1335,7 @@ SwSbxValue SwCalc::Prim() ...@@ -1335,7 +1335,7 @@ SwSbxValue SwCalc::Prim()
else else
{ {
nErg = VarLook( aVarName )->nValue; nErg = VarLook( aVarName )->nValue;
bChkPow = sal_True; bChkPow = true;
} }
break; break;
...@@ -1355,7 +1355,7 @@ SwSbxValue SwCalc::Prim() ...@@ -1355,7 +1355,7 @@ SwSbxValue SwCalc::Prim()
else else
{ {
GetToken(); GetToken();
bChkPow = sal_True; // in order for =(7)^2 to work bChkPow = true; // in order for =(7)^2 to work
} }
} }
break; break;
......
...@@ -40,7 +40,7 @@ void SwCache::Check() ...@@ -40,7 +40,7 @@ void SwCache::Check()
SAL_WARN_IF( pLast->GetNext(), "sw", "Last but not last." ); SAL_WARN_IF( pLast->GetNext(), "sw", "Last but not last." );
SAL_WARN_IF( pRealFirst->GetPrev(), "sw", "First but not first." ); SAL_WARN_IF( pRealFirst->GetPrev(), "sw", "First but not first." );
sal_uInt16 nCnt = 0; sal_uInt16 nCnt = 0;
sal_Bool bFirstFound = sal_False; bool bFirstFound = false;
SwCacheObj *pObj = pRealFirst; SwCacheObj *pObj = pRealFirst;
SwCacheObj *pRekursive = pObj; SwCacheObj *pRekursive = pObj;
while ( pObj ) while ( pObj )
...@@ -53,7 +53,7 @@ void SwCache::Check() ...@@ -53,7 +53,7 @@ void SwCache::Check()
++nCnt; ++nCnt;
if ( pObj == pFirst ) if ( pObj == pFirst )
bFirstFound = sal_True; bFirstFound = true;
if ( !pObj->GetNext() ) if ( !pObj->GetNext() )
SAL_WARN_IF( pObj != pLast, "sw", "Last not Found." ); SAL_WARN_IF( pObj != pLast, "sw", "Last not Found." );
pObj = pObj->GetNext(); pObj = pObj->GetNext();
......
...@@ -80,7 +80,7 @@ SwTabCols &SwTabCols::operator=( const SwTabCols& rCpy ) ...@@ -80,7 +80,7 @@ SwTabCols &SwTabCols::operator=( const SwTabCols& rCpy )
return *this; return *this;
} }
sal_Bool SwTabCols::operator==( const SwTabCols& rCmp ) const bool SwTabCols::operator==( const SwTabCols& rCmp ) const
{ {
sal_uInt16 i; sal_uInt16 i;
...@@ -90,7 +90,7 @@ sal_Bool SwTabCols::operator==( const SwTabCols& rCmp ) const ...@@ -90,7 +90,7 @@ sal_Bool SwTabCols::operator==( const SwTabCols& rCmp ) const
nRightMax== rCmp.GetRightMax()&& nRightMax== rCmp.GetRightMax()&&
bLastRowAllowedToChange== rCmp.IsLastRowAllowedToChange() && bLastRowAllowedToChange== rCmp.IsLastRowAllowedToChange() &&
Count()== rCmp.Count()) ) Count()== rCmp.Count()) )
return sal_False; return false;
for ( i = 0; i < Count(); ++i ) for ( i = 0; i < Count(); ++i )
{ {
...@@ -100,7 +100,7 @@ sal_Bool SwTabCols::operator==( const SwTabCols& rCmp ) const ...@@ -100,7 +100,7 @@ sal_Bool SwTabCols::operator==( const SwTabCols& rCmp ) const
return sal_False; return sal_False;
} }
return sal_True; return true;
} }
void SwTabCols::Insert( long nValue, long nMin, long nMax, void SwTabCols::Insert( long nValue, long nMin, long nMax,
......
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