[Libreoffice-commits] .: sw/inc sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Sep 24 19:54:45 PDT 2012


 sw/inc/hintids.hxx                |    2 -
 sw/inc/tabcol.hxx                 |    2 -
 sw/source/core/attr/format.cxx    |   12 ++++-----
 sw/source/core/attr/swatrset.cxx  |    6 ++--
 sw/source/core/bastyp/calc.cxx    |   48 +++++++++++++++++++-------------------
 sw/source/core/bastyp/swcache.cxx |    4 +--
 sw/source/core/bastyp/tabcol.cxx  |    6 ++--
 7 files changed, 40 insertions(+), 40 deletions(-)

New commits:
commit 38b29bbc39efc74f4c6086378df7b9cc31440390
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Tue Sep 25 11:39:07 2012 +0900

    sal_Bool to bool
    
    Change-Id: Ib9a6f3ecbe38cdad6e28b4d8a9ae13d1f5bc4265

diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx
index 9ea4bc4..46204f1 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 6b896a6..9457d8f 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 083b923..c2e4fbe 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 8eb1daf..363abe2 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 47a6f78..8de93ef 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 d900267..d900998 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 2c93453..dc54b62 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,


More information about the Libreoffice-commits mailing list