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[];
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
......
......@@ -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()); }
......
......@@ -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 );
......
......@@ -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: */
......@@ -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;
......
......@@ -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();
......
......@@ -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,
......
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