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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Dec 12 05:46:32 PST 2012


 sw/source/core/txtnode/fmtatr2.cxx  |    2 -
 sw/source/core/txtnode/fntcache.cxx |   62 ++++++++++++++++++------------------
 sw/source/core/txtnode/ndhints.cxx  |    4 +-
 sw/source/core/txtnode/ndtxt.cxx    |   14 ++++----
 sw/source/core/txtnode/swfont.cxx   |    8 ++--
 sw/source/core/txtnode/thints.cxx   |   30 ++++++++---------
 sw/source/core/txtnode/txtatr2.cxx  |    4 +-
 sw/source/core/txtnode/txtedt.cxx   |   44 +++++++++++--------------
 8 files changed, 82 insertions(+), 86 deletions(-)

New commits:
commit 81e3673b5316527b9ddc5fae04d3e3d7d2f8353e
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Wed Dec 12 22:44:57 2012 +0900

    Remove unused inline function
    
    Change-Id: Ib229ff454769113d1e3798f8c8b2d6a2c8019efa

diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index be10633..d5bc382 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -346,10 +346,6 @@ static bool lcl_HaveCommonAttributes( IStyleAccess& rStyleAccess,
     return bRet;
 }
 
-inline sal_Bool InRange(xub_StrLen nIdx, xub_StrLen nStart, xub_StrLen nEnd) {
-    return ((nIdx >=nStart) && (nIdx <= nEnd));
-}
-
 /*
  * void SwTxtNode::RstAttr(const SwIndex &rIdx, sal_uInt16 nLen)
  *
commit 0c202871460959132176d9ea42a5ad7daad2ddf2
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Wed Dec 12 22:38:09 2012 +0900

    sal_Bool to bool
    
    Change-Id: Id8c5f0a67b5906f78a1fd82f06c491f3276b827d

diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx
index 23fa6c0..3035a93 100644
--- a/sw/source/core/txtnode/fmtatr2.cxx
+++ b/sw/source/core/txtnode/fmtatr2.cxx
@@ -223,7 +223,7 @@ SwFmtINetFmt::~SwFmtINetFmt()
 int SwFmtINetFmt::operator==( const SfxPoolItem& rAttr ) const
 {
     OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
-    sal_Bool bRet = SfxPoolItem::operator==( (SfxPoolItem&) rAttr )
+    bool bRet = SfxPoolItem::operator==( (SfxPoolItem&) rAttr )
                 && aURL == ((SwFmtINetFmt&)rAttr).aURL
                 && aName == ((SwFmtINetFmt&)rAttr).aName
                 && aTargetFrame == ((SwFmtINetFmt&)rAttr).aTargetFrame
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index 10bb745..3eba96d 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -644,7 +644,7 @@ static sal_uInt8 lcl_WhichPunctuation( sal_Unicode cChar )
     return SwScriptInfo::SPECIAL_LEFT;
 }
 
-static sal_Bool lcl_IsMonoSpaceFont( const OutputDevice& rOut )
+static bool lcl_IsMonoSpaceFont( const OutputDevice& rOut )
 {
     const rtl::OUString aStr1( sal_Unicode( 0x3008 ) );
     const rtl::OUString aStr2( sal_Unicode( 0x307C ) );
@@ -703,7 +703,7 @@ static void lcl_DrawLineForWrongListData(
                 rInf.GetOut().Push();
 
             const Color aCol( rInf.GetOut().GetLineColor() );
-            const sal_Bool bColSave = aCol != aLineColor;
+            const bool bColSave = aCol != aLineColor;
             if (bColSave)
                 rInf.GetOut().SetLineColor( aLineColor );
 
@@ -793,9 +793,9 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
     OutputDevice* pWin = rInf.GetShell()->GetWin();
 
     // true if pOut is the printer and the printer has been used for formatting
-    const sal_Bool bPrt = OUTDEV_PRINTER == rInf.GetOut().GetOutDevType() &&
+    const bool bPrt = OUTDEV_PRINTER == rInf.GetOut().GetOutDevType() &&
                       OUTDEV_PRINTER == rRefDev.GetOutDevType();
-    const sal_Bool bBrowse = ( pWin &&
+    const bool bBrowse = ( pWin &&
                            rInf.GetShell()->GetViewOptions()->getBrowseMode() &&
                           !rInf.GetShell()->GetViewOptions()->IsPrtFormat() &&
                           !rInf.GetBullet() &&
@@ -807,10 +807,10 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
 
     // bDirectPrint indicates that we can enter the branch which calls
     // the DrawText functions instead of calling the DrawTextArray functions
-    const sal_Bool bDirectPrint = bPrt || bBrowse;
+    const bool bDirectPrint = bPrt || bBrowse;
 
     // Condition for output font / refdev font adjustment
-    const sal_Bool bUseScrFont =
+    const bool bUseScrFont =
         lcl_IsFontAdjustNecessary( rInf.GetOut(), rRefDev );
 
     Font* pTmpFont = bUseScrFont ? pScrFont : pPrtFont;
@@ -832,7 +832,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
 
 #if OSL_DEBUG_LEVEL > 0
 
-    const sal_Bool bNoAdjust = bPrt ||
+    const bool bNoAdjust = bPrt ||
             (  pWin &&
                rInf.GetShell()->GetViewOptions()->getBrowseMode() &&
               !rInf.GetShell()->GetViewOptions()->IsPrtFormat() );
@@ -842,11 +842,11 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
         // Printer output
         if ( OUTDEV_PRINTER == rRefDev.GetOutDevType() )
         {
-            OSL_ENSURE( bNoAdjust == 1 && bUseScrFont == 0, "Outdev Check failed" );
+            OSL_ENSURE( bNoAdjust && !bUseScrFont, "Outdev Check failed" );
         }
         else if ( OUTDEV_VIRDEV == rRefDev.GetOutDevType() )
         {
-            OSL_ENSURE( bNoAdjust == 0 && bUseScrFont == 1, "Outdev Check failed" );
+            OSL_ENSURE( !bNoAdjust && bUseScrFont, "Outdev Check failed" );
         }
         else
         {
@@ -858,11 +858,11 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
         // PDF export
         if ( OUTDEV_PRINTER == rRefDev.GetOutDevType() )
         {
-            OSL_ENSURE( bNoAdjust == 0 && bUseScrFont == 1, "Outdev Check failed" );
+            OSL_ENSURE( !bNoAdjust && bUseScrFont, "Outdev Check failed" );
         }
         else if ( OUTDEV_VIRDEV == rRefDev.GetOutDevType() )
         {
-            OSL_ENSURE( bNoAdjust == 0 && bUseScrFont == 1, "Outdev Check failed" );
+            OSL_ENSURE( !bNoAdjust && bUseScrFont, "Outdev Check failed" );
         }
         else
         {
@@ -875,15 +875,15 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
         // Window or virtual window
         if ( OUTDEV_PRINTER == rRefDev.GetOutDevType() )
         {
-            OSL_ENSURE( bNoAdjust == 0 && bUseScrFont == 1, "Outdev Check failed" );
+            OSL_ENSURE( !bNoAdjust && bUseScrFont, "Outdev Check failed" );
         }
         else if ( OUTDEV_VIRDEV == rRefDev.GetOutDevType() )
         {
-            OSL_ENSURE( bNoAdjust == 0 && bUseScrFont == 1, "Outdev Check failed" );
+            OSL_ENSURE( !bNoAdjust && bUseScrFont, "Outdev Check failed" );
         }
         else if ( OUTDEV_WINDOW == rRefDev.GetOutDevType() )
         {
-            OSL_ENSURE( bNoAdjust == 1 && bUseScrFont == 0, "Outdev Check failed" );
+            OSL_ENSURE( bNoAdjust && !bUseScrFont, "Outdev Check failed" );
         }
         else
         {
@@ -1067,7 +1067,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
             if ( rInf.GetSpace() || rInf.GetKanaComp())
             {
                 long nSpaceAdd = rInf.GetSpace() / SPACING_PRECISION_FACTOR;
-                sal_Bool bSpecialJust = sal_False;
+                bool bSpecialJust = false;
                 if ( rInf.GetFont() && rInf.GetLen() )
                 {
                     const SwScriptInfo* pSI = rInf.GetScriptInfo();
@@ -1079,7 +1079,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
                     {
                         pSI->Compress( pKernArray,rInf.GetIdx(), rInf.GetLen(),
                             rInf.GetKanaComp(), (sal_uInt16)aFont.GetSize().Height(),&aPos );
-                        bSpecialJust = sal_True;
+                        bSpecialJust = true;
                     }
                     ///Asian Justification
                     if ( ( SW_CJK == nActual || SW_LATIN == nActual ) && nSpaceAdd )
@@ -1093,7 +1093,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
                                 pKernArray[ nI ] += nSpaceSum;
                                 nSpaceSum += nSpaceAdd;
                             }
-                            bSpecialJust = sal_True;
+                            bSpecialJust = true;
                             nSpaceAdd = 0;
                         }
                     }
@@ -1186,7 +1186,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
     if ( bDirectPrint )
     {
         const Fraction aTmp( 1, 1 );
-        sal_Bool bStretch = rInf.GetWidth() && ( rInf.GetLen() > 1 ) && bPrt
+        bool bStretch = rInf.GetWidth() && ( rInf.GetLen() > 1 ) && bPrt
                         && ( aTmp != rInf.GetOut().GetMapMode().GetScaleX() );
 
         if ( bSwitchL2R )
@@ -1238,7 +1238,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
             // Modify Array for special justifications
             //
             long nSpaceAdd = rInf.GetSpace() / SPACING_PRECISION_FACTOR;
-            sal_Bool bSpecialJust = sal_False;
+            bool bSpecialJust = false;
 
             if ( rInf.GetFont() && rInf.GetLen() )
             {
@@ -1253,7 +1253,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
                     pSI->Compress( pKernArray, rInf.GetIdx(), rInf.GetLen(),
                                    rInf.GetKanaComp(),
                                    (sal_uInt16)aFont.GetSize().Height(), &aPos );
-                    bSpecialJust = sal_True;
+                    bSpecialJust = true;
                 }
 
                 // Asian Justification
@@ -1270,7 +1270,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
                             nSpaceSum += nSpaceAdd;
                         }
 
-                        bSpecialJust = sal_True;
+                        bSpecialJust = true;
                         nSpaceAdd = 0;
                     }
                 }
@@ -1284,7 +1284,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
                             pSI->KashidaJustify( pKernArray, 0, rInf.GetIdx(),
                                                  rInf.GetLen(), nSpaceAdd ) != STRING_LEN )
                         {
-                            bSpecialJust = sal_True;
+                            bSpecialJust = true;
                             nSpaceAdd = 0;
                         }
                     }
@@ -1305,7 +1305,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
                                                    rInf.GetSpace() );
 
                         // adding space to blanks is already done
-                        bSpecialJust = sal_True;
+                        bSpecialJust = true;
                         nSpaceAdd = 0;
                     }
                 }
@@ -1668,7 +1668,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
                             ( WRONG_SHOW_SMALL < nHght ? WAVE_SMALL :
                             WAVE_FLAT );
                         Color aCol( rInf.GetOut().GetLineColor() );
-                        sal_Bool bColSave = aCol != *pWaveCol;
+                        bool bColSave = aCol != *pWaveCol;
                         if ( bColSave )
                             rInf.GetOut().SetLineColor( *pWaveCol );
 
@@ -1880,7 +1880,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
         }
     }
 
-    const sal_Bool bCompress = rInf.GetKanaComp() && nLn &&
+    const bool bCompress = rInf.GetKanaComp() && nLn &&
                            rInf.GetFont() &&
                            SW_CJK == rInf.GetFont()->GetActual() &&
                            rInf.GetScriptInfo() &&
@@ -2334,7 +2334,7 @@ xub_StrLen SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth )
 {
     ChgFnt( rInf.GetShell(), rInf.GetOut() );
 
-    const sal_Bool bCompress = rInf.GetKanaComp() && rInf.GetLen() &&
+    const bool bCompress = rInf.GetKanaComp() && rInf.GetLen() &&
                            SW_CJK == GetActual() &&
                            rInf.GetScriptInfo() &&
                            rInf.GetScriptInfo()->CountCompChg() &&
@@ -2520,19 +2520,19 @@ extern Color aGlobalRetoucheColor;
 sal_Bool SwDrawTextInfo::ApplyAutoColor( Font* pFont )
 {
     const Font& rFnt = pFont ? *pFont : GetOut().GetFont();
-    sal_Bool bPrt = GetShell() && ! GetShell()->GetWin();
+    bool bPrt = GetShell() && ! GetShell()->GetWin();
     ColorData nNewColor = COL_BLACK;
-    sal_Bool bChgFntColor = sal_False;
-    sal_Bool bChgLineColor = sal_False;
+    bool bChgFntColor = false;
+    bool bChgLineColor = false;
 
     if( bPrt && GetShell() && GetShell()->GetViewOptions()->IsBlackFont() )
     {
         if ( COL_BLACK != rFnt.GetColor().GetColor() )
-            bChgFntColor = sal_True;
+            bChgFntColor = true;
 
         if ( (COL_BLACK != GetOut().GetLineColor().GetColor()) ||
              (COL_BLACK != GetOut().GetOverlineColor().GetColor()) )
-            bChgLineColor = sal_True;
+            bChgLineColor = true;
     }
     else
     {
diff --git a/sw/source/core/txtnode/ndhints.cxx b/sw/source/core/txtnode/ndhints.cxx
index 20f1de5..aa0a36d 100644
--- a/sw/source/core/txtnode/ndhints.cxx
+++ b/sw/source/core/txtnode/ndhints.cxx
@@ -36,7 +36,7 @@ inline void DumpHints(const SwpHtStart &, const SwpHtEnd &) { }
 // Sortierreihenfolge: Start, Ende (umgekehrt!), Which-Wert (umgekehrt!),
 //                     als letztes die Adresse selbst
 
-static sal_Bool lcl_IsLessStart( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
+static bool lcl_IsLessStart( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
 {
     if ( *rHt1.GetStart() == *rHt2.GetStart() )
     {
@@ -71,7 +71,7 @@ static sal_Bool lcl_IsLessStart( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
  *************************************************************************/
 
 // Zuerst nach Ende danach nach Ptr
-static sal_Bool lcl_IsLessEnd( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
+static bool lcl_IsLessEnd( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
 {
     const xub_StrLen nHt1 = *rHt1.GetAnyEnd();
     const xub_StrLen nHt2 = *rHt2.GetAnyEnd();
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 53863b0..ab4cd3c 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -186,7 +186,7 @@ SwTxtNode *SwNodes::MakeTxtNode( const SwNodeIndex & rWhere,
                 return pNode;
             break;
         }
-    } while( sal_True );
+    } while( true );
 }
 
 // --------------------
@@ -2272,7 +2272,7 @@ void SwTxtNode::GCAttr()
     bool   bChanged = false;
     sal_uInt16 nMin = m_Text.Len(),
            nMax = 0;
-    sal_Bool bAll = nMin != 0; // Bei leeren Absaetzen werden nur die
+    bool bAll = nMin != 0; // Bei leeren Absaetzen werden nur die
                            // INet-Formate entfernt.
 
     for ( sal_uInt16 i = 0; m_pSwpHints && i < m_pSwpHints->Count(); ++i )
@@ -2426,7 +2426,7 @@ SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, sal_Bool bNext,
             pTmpSet = pNewAttrSet;
 
         // PageBreaks/PageDesc/ColBreak rausschmeissen.
-        sal_Bool bRemoveFromCache = sal_False;
+        bool bRemoveFromCache = false;
         std::vector<sal_uInt16> aClearWhichIds;
         if ( bNext )
             bRemoveFromCache = ( 0 != pNewAttrSet->ClearItem( RES_PAGEDESC ) );
@@ -2439,7 +2439,7 @@ SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, sal_Bool bNext,
                 pNewAttrSet->ClearItem( RES_BREAK );
             else
                 aClearWhichIds.push_back( RES_BREAK );
-            bRemoveFromCache = sal_True;
+            bRemoveFromCache = true;
         }
         if( SFX_ITEM_SET == pTmpSet->GetItemState( RES_KEEP, sal_False ) )
         {
@@ -2447,7 +2447,7 @@ SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, sal_Bool bNext,
                 pNewAttrSet->ClearItem( RES_KEEP );
             else
                 aClearWhichIds.push_back( RES_KEEP );
-            bRemoveFromCache = sal_True;
+            bRemoveFromCache = true;
         }
         if( SFX_ITEM_SET == pTmpSet->GetItemState( RES_PARATR_SPLIT, sal_False ) )
         {
@@ -2455,7 +2455,7 @@ SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, sal_Bool bNext,
                 pNewAttrSet->ClearItem( RES_PARATR_SPLIT );
             else
                 aClearWhichIds.push_back( RES_PARATR_SPLIT );
-            bRemoveFromCache = sal_True;
+            bRemoveFromCache = true;
         }
         if(SFX_ITEM_SET == pTmpSet->GetItemState(RES_PARATR_NUMRULE, sal_False))
         {
@@ -2472,7 +2472,7 @@ SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, sal_Bool bNext,
                     // Only if the paragraph style changes - see below.
                     bClearHardSetNumRuleWhenFmtCollChanges = true;
                 }
-                bRemoveFromCache = sal_True;
+                bRemoveFromCache = true;
             }
         }
 
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index 2c4101e..9d25a8f 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -750,7 +750,7 @@ Size SwSubFont::_GetTxtSize( SwDrawTextInfo& rInf )
         {
             String aTmp = CalcCaseMap( rInf.GetText() );
             const XubString &rOldStr = rInf.GetText();
-            sal_Bool bCaseMapLengthDiffers(aTmp.Len() != rOldStr.Len());
+            bool bCaseMapLengthDiffers(aTmp.Len() != rOldStr.Len());
 
             if(bCaseMapLengthDiffers && rInf.GetLen())
             {
@@ -869,7 +869,7 @@ void SwSubFont::_DrawText( SwDrawTextInfo &rInf, const sal_Bool bGrey )
         {
             const XubString &rOldStr = rInf.GetText();
             XubString aString( CalcCaseMap( rOldStr ) );
-            sal_Bool bCaseMapLengthDiffers(aString.Len() != rOldStr.Len());
+            bool bCaseMapLengthDiffers(aString.Len() != rOldStr.Len());
 
             if(bCaseMapLengthDiffers && rInf.GetLen())
             {
@@ -919,7 +919,7 @@ static sal_Char const sDoubleSpace[] = "  ";
 
             const SwScriptInfo* pSI = rInf.GetScriptInfo();
 
-            const sal_Bool bAsianFont =
+            const bool bAsianFont =
                 ( rInf.GetFont() && SW_CJK == rInf.GetFont()->GetActual() );
             for( xub_StrLen nTmp = nOldIdx; nTmp < nTmpEnd; ++nTmp )
             {
@@ -1153,7 +1153,7 @@ void SwDrawTextInfo::Shift( sal_uInt16 nDir )
     OSL_ENSURE( m_bSize, "DrawTextInfo: Undefined Width" );
 #endif
 
-    const sal_Bool bBidiPor = ( GetFrm() && GetFrm()->IsRightToLeft() ) !=
+    const bool bBidiPor = ( GetFrm() && GetFrm()->IsRightToLeft() ) !=
                           ( 0 != ( TEXT_LAYOUT_BIDI_RTL & GetpOut()->GetLayoutMode() ) );
 
     nDir = bBidiPor ?
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 1e65ae6..caf76ec 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -759,7 +759,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
                         aCharAutoFmtSetRange);
                     SfxItemIter aItemIter( *pOldStyle );
                     const SfxPoolItem* pItem = aItemIter.GetCurItem();
-                    while( sal_True )
+                    while( true )
                     {
                         if ( !CharFmt::IsItemIncluded( pItem->Which(), &rNewHint ) )
                         {
@@ -1214,7 +1214,7 @@ SwTxtNode::InsertItem( SfxPoolItem& rAttr,
 // take ownership of pAttr; if insertion fails, delete pAttr
 bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
 {
-    sal_Bool bHiddenPara = sal_False;
+    bool bHiddenPara = false;
 
     OSL_ENSURE( pAttr && *pAttr->GetStart() <= Len(), "StartIdx out of bounds!" );
     OSL_ENSURE( !pAttr->GetEnd() || (*pAttr->GetEnd() <= Len()),
@@ -1343,7 +1343,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
                 }
 
                 // wird eine neue Fussnote eingefuegt ??
-                sal_Bool bNewFtn = 0 == ((SwTxtFtn*)pAttr)->GetStartNode();
+                bool bNewFtn = 0 == ((SwTxtFtn*)pAttr)->GetStartNode();
                 if( bNewFtn )
                 {
                     ((SwTxtFtn*)pAttr)->MakeNewTextSection( GetNodes() );
@@ -1418,7 +1418,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
                     // anwerfen
                     if( RES_HIDDENPARAFLD ==
                         pAttr->GetFld().GetFld()->GetTyp()->Which() )
-                    bHiddenPara = sal_True;
+                    bHiddenPara = true;
                 }
                 break;
 
@@ -1606,14 +1606,14 @@ sal_Bool SwTxtNode::SetAttr( const SfxItemSet& rSet, xub_StrLen nStt,
     {
         // sind am Node schon Zeichenvorlagen gesetzt, muss man diese Attribute
         // (rSet) immer als TextAttribute setzen, damit sie angezeigt werden.
-        int bHasCharFmts = sal_False;
+        bool bHasCharFmts = false;
         if ( HasHints() )
         {
             for ( sal_uInt16 n = 0; n < m_pSwpHints->Count(); ++n )
             {
                 if ( (*m_pSwpHints)[ n ]->IsCharFmtAttr() )
                 {
-                    bHasCharFmts = sal_True;
+                    bHasCharFmts = true;
                     break;
                 }
             }
@@ -1882,7 +1882,7 @@ sal_Bool SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
                 if ( ! pAttrEnd ) // no attributes without end
                     continue;
 
-                sal_Bool bChkInvalid = sal_False;
+                bool bChkInvalid = false;
                 if( nAttrStart <= nStt )       // vor oder genau Start
                 {
                     if( *pAttrEnd <= nStt )    // liegt davor
@@ -1893,11 +1893,11 @@ sal_Bool SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
                     else
 //                  else if( pHt->GetAttr() != aFmtSet.Get( pHt->Which() ) )
                         // uneindeutig
-                        bChkInvalid = sal_True;
+                        bChkInvalid = true;
                 }
                 else if( nAttrStart < nEnd      // reicht in den Bereich
 )//                      && pHt->GetAttr() != aFmtSet.Get( pHt->Which() ) )
-                    bChkInvalid = sal_True;
+                    bChkInvalid = true;
 
                 if( bChkInvalid )
                 {
@@ -2599,7 +2599,7 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
         break;
     case RES_TXTATR_FIELD:
         {
-            sal_Bool bDelFirst = 0 != ((SwTxtFld*)pHint)->GetpTxtNode();
+            bool bDelFirst = 0 != ((SwTxtFld*)pHint)->GetpTxtNode();
             ((SwTxtFld*)pHint)->ChgTxtNode( &rNode );
             SwDoc* pDoc = rNode.GetDoc();
             const SwField* pFld = ((SwTxtFld*)pHint)->GetFld().GetFld();
@@ -2694,18 +2694,18 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
                     SwComparePosition eCmp = ::ComparePosition(
                             *pTmpHt->GetStart(), *pTmpHtEnd,
                             *pHint->GetStart(), *pTmpHintEnd );
-                    sal_Bool bDelOld = sal_True, bChgStart = sal_False, bChgEnd = sal_False;
+                    bool bDelOld = true, bChgStart = false, bChgEnd = false;
                     switch( eCmp )
                     {
                     case POS_BEFORE:
-                    case POS_BEHIND:    bDelOld = sal_False; break;
+                    case POS_BEHIND:    bDelOld = false; break;
 
-                    case POS_OUTSIDE:   bChgStart = bChgEnd = sal_True; break;
+                    case POS_OUTSIDE:   bChgStart = bChgEnd = true; break;
 
                     case POS_COLLIDE_END:
-                    case POS_OVERLAP_BEFORE:    bChgStart = sal_True; break;
+                    case POS_OVERLAP_BEFORE:    bChgStart = true; break;
                     case POS_COLLIDE_START:
-                    case POS_OVERLAP_BEHIND:    bChgEnd = sal_True; break;
+                    case POS_OVERLAP_BEHIND:    bChgEnd = true; break;
                     default: break;
                     }
 
diff --git a/sw/source/core/txtnode/txtatr2.cxx b/sw/source/core/txtnode/txtatr2.cxx
index 6aca1f4..cc33b7c 100644
--- a/sw/source/core/txtnode/txtatr2.cxx
+++ b/sw/source/core/txtnode/txtatr2.cxx
@@ -148,7 +148,7 @@ SwCharFmt* SwTxtINetFmt::GetCharFmt()
 
         // JP 10.02.2000, Bug 72806: dont modify the doc for getting the
         //      correct charstyle.
-        sal_Bool bResetMod = !pDoc->IsModified();
+        bool bResetMod = !pDoc->IsModified();
         Link aOle2Lnk;
         if( bResetMod )
         {
@@ -265,7 +265,7 @@ SwCharFmt* SwTxtRuby::GetCharFmt()
 
         // JP 10.02.2000, Bug 72806: dont modify the doc for getting the
         //              correct charstyle.
-        sal_Bool bResetMod = !pDoc->IsModified();
+        bool bResetMod = !pDoc->IsModified();
         Link aOle2Lnk;
         if( bResetMod )
         {
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index e0cc703..be10633 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -241,13 +241,13 @@ static SwRect lcl_CalculateRepaintRect( SwTxtFrm& rTxtFrm, xub_StrLen nChgStart,
         delete pSt2Pos;
     }
 
-    sal_Bool bSameFrame = sal_True;
+    bool bSameFrame = true;
 
     if( rTxtFrm.HasFollow() )
     {
         if( pEndFrm != pStartFrm )
         {
-            bSameFrame = sal_False;
+            bSameFrame = false;
             SwRect aStFrm( pStartFrm->PaintArea() );
             {
                 SWRECTFN( pStartFrm )
@@ -263,7 +263,7 @@ static SwRect lcl_CalculateRepaintRect( SwTxtFrm& rTxtFrm, xub_StrLen nChgStart,
                 (aRect.*fnRect->fnSetRight)( (aStFrm.*fnRect->fnGetRight)() );
             }
             aRect.Union( aTmp );
-            while( sal_True )
+            while( true )
             {
                 pStartFrm = pStartFrm->GetFollow();
                 if( pStartFrm == pEndFrm )
@@ -319,7 +319,7 @@ static bool lcl_HaveCommonAttributes( IStyleAccess& rStyleAccess,
     {
         SfxItemIter aIter( *pSet1 );
         const SfxPoolItem* pItem = aIter.GetCurItem();
-        while( sal_True )
+        while( true )
         {
             if ( SFX_ITEM_SET == rSet2.GetItemState( pItem->Which(), sal_False ) )
             {
@@ -384,13 +384,13 @@ void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, sal_uInt16 nWhich,
     xub_StrLen nAttrStart;
     SwTxtAttr *pHt;
 
-    sal_Bool    bChanged = sal_False;
+    bool bChanged = false;
 
     // nMin and nMax initialized to maximum / minimum (inverse)
     xub_StrLen nMin = m_Text.Len();
     xub_StrLen nMax = nStt;
 
-    const sal_Bool bNoLen = !nMin;
+    const bool bNoLen = !nMin;
 
     // We have to remember the "new" attributes, which have
     // been introduced by splitting surrounding attributes (case 4).
@@ -509,7 +509,7 @@ void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, sal_uInt16 nWhich,
                         InsertHint( pNew, nsSetAttrMode::SETATTR_NOHINTADJUST );
                     }
 
-                    bChanged = sal_True;
+                    bChanged = true;
                 }
             }
         }
@@ -522,7 +522,7 @@ void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, sal_uInt16 nWhich,
                         nMin = nAttrStart;
                     if ( nMax < *pAttrEnd )
                         nMax = *pAttrEnd;
-                    bChanged = sal_True;
+                    bChanged = true;
 
                     const xub_StrLen nAttrEnd = *pAttrEnd;
 
@@ -544,7 +544,7 @@ void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, sal_uInt16 nWhich,
                         nMin = nAttrStart;
                     if ( nMax < *pAttrEnd )
                         nMax = *pAttrEnd;
-                    bChanged = sal_True;
+                    bChanged = true;
                     xub_StrLen nTmpEnd = *pAttrEnd;
                     m_pSwpHints->NoteInHistory( pHt );
                     *pAttrEnd = nStt;
@@ -1056,7 +1056,7 @@ sal_uInt16 SwTxtNode::Convert( SwConversionArgs &rArgs )
     const bool bRestoreString =
         lcl_MaskRedlinesAndHiddenText( *this, m_Text, 0, m_Text.Len() ) > 0;
 
-    sal_Bool    bFound  = sal_False;
+    bool    bFound  = false;
     xub_StrLen  nBegin  = nTextBegin;
     xub_StrLen  nLen = 0;
     LanguageType nLangFound = LANGUAGE_NONE;
@@ -1080,7 +1080,7 @@ sal_uInt16 SwTxtNode::Convert( SwConversionArgs &rArgs )
         // find non zero length text portion of appropriate language
         do {
             nLangFound = aIter.GetLanguage();
-            sal_Bool bLangOk =  (nLangFound == rArgs.nConvSrcLang) ||
+            bool bLangOk =  (nLangFound == rArgs.nConvSrcLang) ||
                                 (editeng::HangulHanjaConversion::IsChinese( nLangFound ) &&
                                  editeng::HangulHanjaConversion::IsChinese( rArgs.nConvSrcLang ));
 
@@ -1107,7 +1107,7 @@ sal_uInt16 SwTxtNode::Convert( SwConversionArgs &rArgs )
                 SwEditShell *pEditShell = GetDoc()->GetEditShell();
                 pEditShell->Push();             // save current cursor on stack
                 pEditShell->SetSelection( aCurPaM );
-                sal_Bool bIsAsianScript = (SCRIPTTYPE_ASIAN == pEditShell->GetScriptType());
+                bool bIsAsianScript = (SCRIPTTYPE_ASIAN == pEditShell->GetScriptType());
                 pEditShell->Pop( sal_False );   // restore cursor from stack
 
                 if (!bIsAsianScript && rArgs.bAllowImplicitChangesForNotConvertibleText)
@@ -1126,7 +1126,7 @@ sal_uInt16 SwTxtNode::Convert( SwConversionArgs &rArgs )
         nBegin = nTextBegin;
     if (nBegin + nLen > nTextEnd)
         nLen = nTextEnd - nBegin;
-    sal_Bool bInSelection = nBegin < nTextEnd;
+    bool bInSelection = nBegin < nTextEnd;
 
     if (bFound && bInSelection)     // convertible text found within selection/range?
     {
@@ -1157,7 +1157,7 @@ SwRect SwTxtFrm::_AutoSpell( const SwCntntNode* pActNode, const SwViewOption& rV
 {
     SwRect aRect;
 #if OSL_DEBUG_LEVEL > 1
-    static sal_Bool bStop = sal_False;
+    static bool bStop = false;
     if ( bStop )
         return aRect;
 #endif
@@ -1176,7 +1176,7 @@ SwRect SwTxtFrm::_AutoSpell( const SwCntntNode* pActNode, const SwViewOption& rV
                 0, pNode->GetTxt().Len() )     > 0;
 
     // a change of data indicates that at least one word has been modified
-    const sal_Bool bRedlineChg =
+    const bool bRedlineChg =
         ( pNode->GetTxt().GetBuffer() != aOldTxt.GetBuffer() );
 
     xub_StrLen nBegin = 0;
@@ -1187,7 +1187,7 @@ SwRect SwTxtFrm::_AutoSpell( const SwCntntNode* pActNode, const SwViewOption& rV
     xub_StrLen nInvStart = STRING_LEN;
     xub_StrLen nInvEnd = 0;
 
-    const sal_Bool bAddAutoCmpl = pNode->IsAutoCompleteWordDirty() &&
+    const bool bAddAutoCmpl = pNode->IsAutoCompleteWordDirty() &&
                                   rViewOpt.IsAutoCompleteWords();
 
     if( pNode->GetWrong() )
@@ -1226,7 +1226,7 @@ SwRect SwTxtFrm::_AutoSpell( const SwCntntNode* pActNode, const SwViewOption& rV
                 nInsertPos++;
     }
 
-    sal_Bool bFresh = nBegin < nEnd;
+    bool bFresh = nBegin < nEnd;
 
     if( nBegin < nEnd )
     {
@@ -1468,7 +1468,7 @@ void SwTxtFrm::CollectAutoCmplWrds( SwCntntNode* pActNode, xub_StrLen nActPos )
     xub_StrLen nBegin = 0;
     xub_StrLen nEnd = pNode->GetTxt().Len();
     xub_StrLen nLen;
-    sal_Bool bACWDirty = sal_False, bAnyWrd = sal_False;
+    bool bACWDirty = false, bAnyWrd = false;
 
     if( nBegin < nEnd )
     {
@@ -1487,10 +1487,10 @@ void SwTxtFrm::CollectAutoCmplWrds( SwCntntNode* pActNode, xub_StrLen nActPos )
                 {
                     if( rACW.GetMinWordLen() <= rWord.Len() )
                         rACW.InsertWord( rWord, *pDoc );
-                    bAnyWrd = sal_True;
+                    bAnyWrd = true;
                 }
                 else
-                    bACWDirty = sal_True;
+                    bACWDirty = true;
             }
             if( !--nCnt )
             {


More information about the Libreoffice-commits mailing list