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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Dec 11 05:29:58 PST 2012


 sw/source/core/text/frmpaint.cxx  |    2 +-
 sw/source/core/text/itrpaint.cxx  |   12 ++++++------
 sw/source/core/text/txtpaint.hxx  |   11 +++++------
 sw/source/core/text/txttab.cxx    |    4 ++--
 sw/source/core/text/widorp.cxx    |    2 +-
 sw/source/core/text/wrong.cxx     |    4 ++--
 sw/source/core/tox/tox.cxx        |   14 +++++++-------
 sw/source/core/txtnode/atrftn.cxx |    8 ++++----
 8 files changed, 28 insertions(+), 29 deletions(-)

New commits:
commit 7ba2c823cac8998dfc0c2e19470f5edee70e63f0
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Tue Dec 11 22:28:14 2012 +0900

    sal_Bool to bool
    
    Change-Id: Idf6003acc7ee07997150f77c886947dc1476218f

diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index 78a59c4..4456035 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -84,7 +84,7 @@ class SwExtraPainter
     MSHORT nDivider;
     bool bGoLeft;
     bool bLineNum;
-    inline sal_Bool IsClipChg() { return aClip.IsChg(); }
+    inline bool IsClipChg() { return aClip.IsChg(); }
 public:
     SwExtraPainter( const SwTxtFrm *pFrm, ViewShell *pVwSh,
         const SwLineNumberInfo &rLnInf, const SwRect &rRct,
diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index eb880be..9a4c367 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -201,7 +201,7 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
     // bClip entscheidet darueber, ob geclippt werden muss.
     // Das Ganze muss vor der Retusche stehen
 
-    sal_Bool bClip = ( bDrawInWindow || bUnderSz ) && !rClip.IsChg();
+    bool bClip = ( bDrawInWindow || bUnderSz ) && !rClip.IsChg();
     if( bClip && pPor )
     {
         // Wenn TopLeft oder BottomLeft der Line ausserhalb liegen,
@@ -212,13 +212,13 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
             GetInfo().GetPos().Y() < rPaint.Top() ||
             GetInfo().GetPos().Y() + nTmpHeight > rPaint.Top() + rPaint.Height() )
         {
-            bClip = sal_False;
+            bClip = false;
             rClip.ChgClip( rPaint, pFrm, pCurr->HasUnderscore() );
         }
 #if OSL_DEBUG_LEVEL > 1
-        static sal_Bool bClipAlways = sal_False;
+        static bool bClipAlways = false;
         if( bClip && bClipAlways )
-        {   bClip = sal_False;
+        {   bClip = false;
             rClip.ChgClip( rPaint );
         }
 #endif
@@ -243,7 +243,7 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
     if( pCurr->IsClipping() )
     {
         rClip.ChgClip( aLineRect, pFrm );
-        bClip = sal_False;
+        bClip = false;
     }
 
     if( !pPor && !bEndPor )
@@ -346,7 +346,7 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
         if( bClip &&
             GetInfo().X() + pPor->Width() + ( pPor->Height() / 2 ) > nMaxRight )
         {
-            bClip = sal_False;
+            bClip = false;
             rClip.ChgClip( rPaint, pFrm, pCurr->HasUnderscore() );
         }
 
diff --git a/sw/source/core/text/txtpaint.hxx b/sw/source/core/text/txtpaint.hxx
index ac0eec7..86d34c8 100644
--- a/sw/source/core/text/txtpaint.hxx
+++ b/sw/source/core/text/txtpaint.hxx
@@ -30,8 +30,8 @@ class SwRect;               // SwSaveClip
 class SwSaveClip
 {
     Region   aClip;
-    const sal_Bool     bOn;
-          sal_Bool     bChg;
+    const bool     bOn;
+          bool     bChg;
 protected:
     OutputDevice* pOut;
     void _ChgClip( const SwRect &rRect, const SwTxtFrm* pFrm,
@@ -43,14 +43,14 @@ public:
                          sal_Bool bEnlargeRect = sal_False)
              { if( pOut ) _ChgClip( rRect, pFrm, bEnlargeRect ); }
            void Reset();
-    inline sal_Bool IsOn()  const { return bOn; }
-    inline sal_Bool IsChg() const { return bChg; }
+    inline bool IsOn()  const { return bOn; }
+    inline bool IsChg() const { return bChg; }
     inline OutputDevice *GetOut() { return pOut; }
 };
 
 inline SwSaveClip::SwSaveClip( OutputDevice* pOutDev ) :
     bOn( pOutDev && pOutDev->IsClipRegion() ),
-    bChg( sal_False ),
+    bChg( false ),
     pOut(pOutDev)
 {}
 
diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index a83ea96..1286f07 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -403,7 +403,7 @@ sal_Bool SwTabPortion::PreFormat( SwTxtFormatInfo &rInf )
     // Break tab stop to next line if:
     // 1. Minmal width does not fit to line anymore.
     // 2. An underflow event was called for the tab portion.
-    sal_Bool bFull = ( bTabCompat && rInf.IsUnderFlow() ) ||
+    bool bFull = ( bTabCompat && rInf.IsUnderFlow() ) ||
                      ( rInf.Width() <= rInf.X() + PrtWidth() && rInf.X() <= rInf.Width() ) ;
 
     // #95477# Rotated tab stops get the width of one blank
@@ -437,7 +437,7 @@ sal_Bool SwTabPortion::PreFormat( SwTxtFormatInfo &rInf )
                      ( ( bTabOverflow && ( rInf.IsTabOverflow() || !IsAutoTabStop() ) ) || bAtParaEnd ) &&
                      GetTabPos() >= rInf.GetTxtFrm()->Frm().Width() )
                 {
-                    bFull = sal_False;
+                    bFull = false;
                     if ( bTabOverflow && !IsAutoTabStop() )
                         rInf.SetTabOverflow( sal_True );
                 }
diff --git a/sw/source/core/text/widorp.cxx b/sw/source/core/text/widorp.cxx
index 7749c4e..c5ed121 100644
--- a/sw/source/core/text/widorp.cxx
+++ b/sw/source/core/text/widorp.cxx
@@ -193,7 +193,7 @@ sal_Bool SwTxtFrmBreak::IsBreakNow( SwTxtMargin &rLine )
          */
         // 6010: include DropLines
 
-        sal_Bool bFirstLine = 1 == rLine.GetLineNr() && !rLine.GetPrev();
+        bool bFirstLine = 1 == rLine.GetLineNr() && !rLine.GetPrev();
         bBreak = sal_True;
         if( ( bFirstLine && pFrm->GetIndPrev() )
             || ( rLine.GetLineNr() <= rLine.GetDropLines() ) )
diff --git a/sw/source/core/text/wrong.cxx b/sw/source/core/text/wrong.cxx
index cf11ca5..0e4cfe9 100644
--- a/sw/source/core/text/wrong.cxx
+++ b/sw/source/core/text/wrong.cxx
@@ -265,7 +265,7 @@ void SwWrongList::Move( xub_StrLen nPos, long nDiff )
         MSHORT nLst = i;
         xub_StrLen nWrPos;
         xub_StrLen nWrLen;
-        sal_Bool bJump = sal_False;
+        bool bJump = false;
         while( nLst < Count() && Pos( nLst ) < nEnd )
             ++nLst;
         if( nLst > i && ( nWrPos = Pos( nLst - 1 ) ) <= nPos )
@@ -278,7 +278,7 @@ void SwWrongList::Move( xub_StrLen nPos, long nDiff )
             if( nWrLen )
             {
                 maList[--nLst].mnLen = nWrLen;
-                bJump = sal_True;
+                bJump = true;
             }
         }
         Remove( i, nLst - i );
diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx
index ea77c51..d499665 100644
--- a/sw/source/core/tox/tox.cxx
+++ b/sw/source/core/tox/tox.cxx
@@ -450,7 +450,7 @@ void SwForm::AdjustTabStops(SwDoc& rDoc, sal_Bool bInsertNewTapStops) // #i21237
             SwFormTokens aCurrentPattern = GetPattern(nLevel);
             SwFormTokens::iterator aIt = aCurrentPattern.begin();
 
-            sal_Bool bChanged = sal_False;
+            bool bChanged = false;
 
             for(sal_uInt16 nTab = 0; nTab < nTabCount; ++nTab)
             {
@@ -463,7 +463,7 @@ void SwForm::AdjustTabStops(SwDoc& rDoc, sal_Bool bInsertNewTapStops) // #i21237
                 {
                     if ( SVX_TAB_ADJUST_DEFAULT != rTab.GetAdjustment() )
                     {
-                        bChanged = sal_True;
+                        bChanged = true;
                         SwFormToken aToken(TOKEN_TAB_STOP);
                         aToken.bWithTab = sal_False;
                         aToken.nTabStopPosition = rTab.GetTabPos();
@@ -479,7 +479,7 @@ void SwForm::AdjustTabStops(SwDoc& rDoc, sal_Bool bInsertNewTapStops) // #i21237
                                   (TOKEN_TAB_STOP));
                     if ( aIt != aCurrentPattern.end() )
                     {
-                        bChanged = sal_True;
+                        bChanged = true;
                         aIt->nTabStopPosition = rTab.GetTabPos();
                         aIt->eTabAlign = nTab == nTabCount - 1 &&
                                          SVX_TAB_ADJUST_RIGHT == rTab.GetAdjustment() ?
@@ -539,7 +539,7 @@ SwTOXBase& SwTOXBase::CopyTOXBase( SwDoc* pDoc, const SwTOXBase& rSource )
     {
         // type not in pDoc, so create it now
         const SwTOXTypes& rTypes = pDoc->GetTOXTypes();
-        sal_Bool bFound = sal_False;
+        bool bFound = false;
         for( sal_uInt16 n = rTypes.size(); n; )
         {
             const SwTOXType* pCmp = rTypes[ --n ];
@@ -547,7 +547,7 @@ SwTOXBase& SwTOXBase::CopyTOXBase( SwDoc* pDoc, const SwTOXBase& rSource )
                 pCmp->GetTypeName() == pType->GetTypeName() )
             {
                 pType = (SwTOXType*)pCmp;
-                bFound = sal_True;
+                bFound = true;
                 break;
             }
         }
@@ -629,7 +629,7 @@ String SwFormToken::GetString() const
 {
     String sRet;
 
-    sal_Bool bAppend = sal_True;
+    bool bAppend = true;
     switch( eTokenType )
     {
         case TOKEN_ENTRY_NO:
@@ -707,7 +707,7 @@ String SwFormToken::GetString() const
             sRet += TOX_STYLE_DELIMITER;
         }
         else
-            bAppend = sal_False;
+            bAppend = false;
     }
     else if(TOKEN_ENTRY_NO == eTokenType)
     {
diff --git a/sw/source/core/txtnode/atrftn.cxx b/sw/source/core/txtnode/atrftn.cxx
index 6814ec4..93707eb 100644
--- a/sw/source/core/txtnode/atrftn.cxx
+++ b/sw/source/core/txtnode/atrftn.cxx
@@ -185,7 +185,7 @@ XubString SwFmtFtn::GetViewNumStr( const SwDoc& rDoc, sal_Bool bInclStrings ) co
     {
         // dann ist die Nummer von Interesse, also ueber die Info diese
         // besorgen.
-        sal_Bool bMakeNum = sal_True;
+        bool bMakeNum = true;
         const SwSectionNode* pSectNd = pTxtAttr
                     ? SwUpdFtnEndNtAtEnd::FindSectNdWithEndAttr( *pTxtAttr )
                     : 0;
@@ -200,7 +200,7 @@ XubString SwFmtFtn::GetViewNumStr( const SwDoc& rDoc, sal_Bool bInclStrings ) co
 
             if( FTNEND_ATTXTEND_OWNNUMANDFMT == rFtnEnd.GetValue() )
             {
-                bMakeNum = sal_False;
+                bMakeNum = false;
                 sRet = rFtnEnd.GetSwNumType().GetNumStr( GetNumber() );
                 if( bInclStrings )
                 {
@@ -430,7 +430,7 @@ void SwTxtFtn::DelFrms( const SwFrm* pSib )
         return;
 
     const SwRootFrm* pRoot = pSib ? pSib->getRootFrm() : 0;
-    sal_Bool bFrmFnd = sal_False;
+    bool bFrmFnd = false;
     {
         SwIterator<SwCntntFrm,SwTxtNode> aIter( *m_pTxtNode );
         for( SwCntntFrm* pFnd = aIter.First(); pFnd; pFnd = aIter.Next() )
@@ -441,7 +441,7 @@ void SwTxtFtn::DelFrms( const SwFrm* pSib )
             if( pPage )
             {
                 pPage->RemoveFtn( pFnd, this );
-                bFrmFnd = sal_True;
+                bFrmFnd = true;
             }
         }
     }
commit 0083b0d55cbd86f44f6713789eab7501524b2960
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Sun Dec 9 20:59:08 2012 +0900

    Drop unused function
    
    Change-Id: I4d33262fbff0c802379eea2c048048c85f4c373c

diff --git a/sw/source/core/text/txtpaint.hxx b/sw/source/core/text/txtpaint.hxx
index aa46696..ac0eec7 100644
--- a/sw/source/core/text/txtpaint.hxx
+++ b/sw/source/core/text/txtpaint.hxx
@@ -45,7 +45,6 @@ public:
            void Reset();
     inline sal_Bool IsOn()  const { return bOn; }
     inline sal_Bool IsChg() const { return bChg; }
-    inline sal_Bool IsOut() const { return 0 != pOut; }
     inline OutputDevice *GetOut() { return pOut; }
 };
 


More information about the Libreoffice-commits mailing list