diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2012-09-25 11:39:07 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2012-09-25 11:53:57 +0900 |
commit | 38b29bbc39efc74f4c6086378df7b9cc31440390 (patch) | |
tree | d0e9e27103cb9f3c6e1a0ad3f2493b1ff23b7d14 /sw | |
parent | 5ae27819974e3492b6f4d33fa51ef2a9d77b5ce5 (diff) |
sal_Bool to bool
Change-Id: Ib9a6f3ecbe38cdad6e28b4d8a9ae13d1f5bc4265
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/hintids.hxx | 2 | ||||
-rw-r--r-- | sw/inc/tabcol.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/attr/format.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/attr/swatrset.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/bastyp/calc.cxx | 48 | ||||
-rw-r--r-- | sw/source/core/bastyp/swcache.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/bastyp/tabcol.cxx | 6 |
7 files changed, 40 insertions, 40 deletions
diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx index 9ea4bc4ca16f..46204f116078 100644 --- a/sw/inc/hintids.hxx +++ b/sw/inc/hintids.hxx @@ -469,7 +469,7 @@ extern sal_uInt16 aCharAutoFmtSetRange[]; extern sal_uInt16 aPgFrmFmtSetRange[]; // 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 diff --git a/sw/inc/tabcol.hxx b/sw/inc/tabcol.hxx index 6b896a6f2e3f..9457d8f35645 100644 --- a/sw/inc/tabcol.hxx +++ b/sw/inc/tabcol.hxx @@ -68,7 +68,7 @@ public: SwTabCols( sal_uInt16 nSize = 0 ); SwTabCols( 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 ) const { return aData[nPos].nPos; } sal_uInt16 Count() const { return sal::static_int_cast< sal_uInt16 >(aData.size()); } diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx index 083b92383ecb..c2e4fbece23e 100644 --- a/sw/source/core/attr/format.cxx +++ b/sw/source/core/attr/format.cxx @@ -249,7 +249,7 @@ SwFmt::~SwFmt() 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() : pNewValue ? pNewValue->Which() : 0 ; @@ -293,7 +293,7 @@ void SwFmt::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue ) if( aNew.Count() ) NotifyClients( &aOld, &aNew ); - bContinue = sal_False; + bContinue = false; } break; case RES_FMT_CHG: @@ -318,7 +318,7 @@ void SwFmt::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue ) // pass Hint only to dependent formats (no Frames) ModifyBroadcast( pOldValue, pNewValue, TYPE(SwFmt) ); - bContinue = sal_False; + bContinue = false; } break; default: @@ -328,7 +328,7 @@ void SwFmt::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue ) { // DropCaps might come into this block OSL_ENSURE( RES_PARATR_DROP == nWhich, "Modify was sent without sender" ); - bContinue = sal_False; + bContinue = false; } } } @@ -529,7 +529,7 @@ sal_uInt16 SwFmt::ResetAllFmtAttr() SwAttrSet aOld( *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 ) { SwAttrSetChg aChgOld( aSet, aOld ); @@ -566,7 +566,7 @@ void SwFmt::DelDiffs( const SfxItemSet& rSet ) SwAttrSet aOld( *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 ) { SwAttrSetChg aChgOld( aSet, aOld ); diff --git a/sw/source/core/attr/swatrset.cxx b/sw/source/core/attr/swatrset.cxx index 8eb1dafd57f1..363abe24f7f4 100644 --- a/sw/source/core/attr/swatrset.cxx +++ b/sw/source/core/attr/swatrset.cxx @@ -373,15 +373,15 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const } /// 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 ) { if( *pRange <= nId && nId <= *(pRange+1) ) - return sal_True; + return true; pRange += 2; } - return sal_False; + return false; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx index 47a6f7890438..8de93ef8b364 100644 --- a/sw/source/core/bastyp/calc.cxx +++ b/sw/source/core/bastyp/calc.cxx @@ -671,13 +671,13 @@ SwCalcOper SwCalc::GetToken() coStartFlags, aEmptyStr, coContFlags, aEmptyStr ); - sal_Bool bSetError = sal_True; + bool bSetError = true; xub_StrLen nRealStt = nCommandPos + (xub_StrLen)aRes.LeadingWhiteSpace; if( aRes.TokenType & (KParseType::ASC_NUMBER | KParseType::UNI_NUMBER) ) { nNumberValue.PutDouble( aRes.Value ); eCurrOper = CALC_NUMBER; - bSetError = sal_False; + bSetError = false; } else if( aRes.TokenType & KParseType::IDENTNAME ) { @@ -721,13 +721,13 @@ SwCalcOper SwCalc::GetToken() } aVarName = aName; eCurrOper = CALC_NAME; - bSetError = sal_False; + bSetError = false; } else if ( aRes.TokenType & KParseType::DOUBLE_QUOTE_STRING ) { nNumberValue.PutString( String( aRes.DequotedNameOrString )); eCurrOper = CALC_NUMBER; - bSetError = sal_False; + bSetError = false; } else if( aRes.TokenType & KParseType::ONE_SINGLE_CHAR ) { @@ -735,7 +735,7 @@ SwCalcOper SwCalc::GetToken() static_cast<xub_StrLen>(aRes.EndPos) - nRealStt )); if( 1 == aName.Len() ) { - bSetError = sal_False; + bSetError = false; sal_Unicode ch = aName.GetChar( 0 ); switch( ch ) { @@ -815,16 +815,16 @@ SwCalcOper SwCalc::GetToken() eCurrOper = CALC_NAME; } else - bSetError = sal_True; + bSetError = true; } else { - bSetError = sal_True; + bSetError = true; } break; default: - bSetError = sal_True; + bSetError = true; break; } } @@ -837,10 +837,10 @@ SwCalcOper SwCalc::GetToken() { sal_Unicode ch = aName.GetChar(0); - bSetError = sal_True; + bSetError = true; if ('<' == ch || '>' == ch) { - bSetError = sal_False; + bSetError = false; SwCalcOper eTmp2 = ('<' == ch) ? CALC_LEQ : CALC_GEQ; eCurrOper = ('<' == ch) ? CALC_LES : CALC_GRE; @@ -848,14 +848,14 @@ SwCalcOper SwCalc::GetToken() if( 2 == aName.Len() && '=' == aName.GetChar(1) ) eCurrOper = eTmp2; else if( 1 != aName.Len() ) - bSetError = sal_True; + bSetError = true; } } } else if( nRealStt == sCommand.Len() ) { eCurrOper = CALC_ENDCALC; - bSetError = sal_False; + bSetError = false; } if( bSetError ) @@ -983,15 +983,15 @@ SwCalcOper SwCalc::GetToken() case '[': { String aStr; - sal_Bool bIgnore = sal_False; + bool bIgnore = false; do { while( 0 != ( ch = NextCh( sCommand, nCommandPos )) && ch != ']' ) { if( !bIgnore && '\\' == ch ) - bIgnore = sal_True; + bIgnore = true; else if( bIgnore ) - bIgnore = sal_False; + bIgnore = false; aStr += ch; } @@ -1192,15 +1192,15 @@ SwSbxValue SwCalc::Term() } fVal *= fFac; - sal_Bool bSign; + bool bSign; if (fVal < 0.0) { fVal *= -1.0; - bSign = sal_True; + bSign = true; } else { - bSign = sal_False; + bSign = false; } // rounding @@ -1268,7 +1268,7 @@ SwSbxValue SwCalc::Prim() pfCalc pFnc = 0; - sal_Bool bChkTrig = sal_False, bChkPow = sal_False; + bool bChkTrig = false, bChkPow = false; switch( eCurrOper ) { @@ -1276,8 +1276,8 @@ SwSbxValue SwCalc::Prim() case CALC_COS: pFnc = &cos; break; case CALC_TAN: pFnc = &tan; break; case CALC_ATAN: pFnc = &atan; break; - case CALC_ASIN: pFnc = &asin; bChkTrig = sal_True; break; - case CALC_ACOS: pFnc = &acos; bChkTrig = sal_True; break; + case CALC_ASIN: pFnc = &asin; bChkTrig = true; break; + case CALC_ACOS: pFnc = &acos; bChkTrig = true; break; case CALC_NOT: { @@ -1321,7 +1321,7 @@ SwSbxValue SwCalc::Prim() else { nErg = nNumberValue; - bChkPow = sal_True; + bChkPow = true; } break; @@ -1335,7 +1335,7 @@ SwSbxValue SwCalc::Prim() else { nErg = VarLook( aVarName )->nValue; - bChkPow = sal_True; + bChkPow = true; } break; @@ -1355,7 +1355,7 @@ SwSbxValue SwCalc::Prim() else { GetToken(); - bChkPow = sal_True; // in order for =(7)^2 to work + bChkPow = true; // in order for =(7)^2 to work } } break; diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx index d900267899a8..d900998f661f 100644 --- a/sw/source/core/bastyp/swcache.cxx +++ b/sw/source/core/bastyp/swcache.cxx @@ -40,7 +40,7 @@ void SwCache::Check() SAL_WARN_IF( pLast->GetNext(), "sw", "Last but not last." ); SAL_WARN_IF( pRealFirst->GetPrev(), "sw", "First but not first." ); sal_uInt16 nCnt = 0; - sal_Bool bFirstFound = sal_False; + bool bFirstFound = false; SwCacheObj *pObj = pRealFirst; SwCacheObj *pRekursive = pObj; while ( pObj ) @@ -53,7 +53,7 @@ void SwCache::Check() ++nCnt; if ( pObj == pFirst ) - bFirstFound = sal_True; + bFirstFound = true; if ( !pObj->GetNext() ) SAL_WARN_IF( pObj != pLast, "sw", "Last not Found." ); pObj = pObj->GetNext(); diff --git a/sw/source/core/bastyp/tabcol.cxx b/sw/source/core/bastyp/tabcol.cxx index 2c93453eeca3..dc54b62546b9 100644 --- a/sw/source/core/bastyp/tabcol.cxx +++ b/sw/source/core/bastyp/tabcol.cxx @@ -80,7 +80,7 @@ SwTabCols &SwTabCols::operator=( const SwTabCols& rCpy ) return *this; } -sal_Bool SwTabCols::operator==( const SwTabCols& rCmp ) const +bool SwTabCols::operator==( const SwTabCols& rCmp ) const { sal_uInt16 i; @@ -90,7 +90,7 @@ sal_Bool SwTabCols::operator==( const SwTabCols& rCmp ) const nRightMax== rCmp.GetRightMax()&& bLastRowAllowedToChange== rCmp.IsLastRowAllowedToChange() && Count()== rCmp.Count()) ) - return sal_False; + return false; for ( i = 0; i < Count(); ++i ) { @@ -100,7 +100,7 @@ sal_Bool SwTabCols::operator==( const SwTabCols& rCmp ) const return sal_False; } - return sal_True; + return true; } void SwTabCols::Insert( long nValue, long nMin, long nMax, |