[Libreoffice-commits] .: 2 commits - sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Dec 6 04:03:16 PST 2012
sw/source/core/text/frmform.cxx | 2 -
sw/source/core/text/itrtxt.cxx | 2 -
sw/source/core/text/itrtxt.hxx | 8 +++----
sw/source/core/text/porfld.cxx | 14 ++++++------
sw/source/core/text/porfld.hxx | 6 ++---
sw/source/core/text/porglue.cxx | 2 -
sw/source/core/text/porlay.cxx | 22 +++++++++----------
sw/source/core/text/porlay.hxx | 8 +++----
sw/source/core/text/porlin.cxx | 14 ++++++------
sw/source/core/text/porlin.hxx | 4 +--
sw/source/core/text/pormulti.cxx | 43 +++++++++++++++++++--------------------
sw/source/core/text/pormulti.hxx | 12 ++++------
sw/source/core/text/txtfrm.cxx | 2 -
sw/source/core/text/widorp.cxx | 2 -
14 files changed, 69 insertions(+), 72 deletions(-)
New commits:
commit 8909b2c384154baa2174aa53b433b12b02871e75
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Thu Dec 6 21:00:22 2012 +0900
Drop unused declaration
Change-Id: I8673787aac659acfc638b3040a6178e6c21a51f7
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 7180f77..c392c78 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -49,7 +49,6 @@
#include <fmtfsize.hxx>
using namespace ::com::sun::star;
-extern sal_Bool IsUnderlineBreak( const SwLinePortion& rPor, const SwFont& rFnt );
/*--------------------------------------------------
* class SwMultiPortion
commit 6488d6941dd25f49aa3254f38a5f3185f2fd3e5e
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Thu Dec 6 20:59:29 2012 +0900
sal_Bool to bool
Change-Id: I942cad6ec0e06d4f98fdf8e2557e11603b951e7f
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 16641e7..698cf95 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -984,7 +984,7 @@ void SwTxtFrm::FormatAdjust( SwTxtFormatter &rLine,
if( rLine.IsStop() )
{
- rLine.TruncLines( sal_True );
+ rLine.TruncLines( true );
nNew = 1;
}
diff --git a/sw/source/core/text/itrtxt.cxx b/sw/source/core/text/itrtxt.cxx
index a091b2c..59e916a 100644
--- a/sw/source/core/text/itrtxt.cxx
+++ b/sw/source/core/text/itrtxt.cxx
@@ -386,7 +386,7 @@ static sal_Bool lcl_NeedsFieldRest( const SwLineLayout* pCurr )
* SwTxtIter::TruncLines()
*************************************************************************/
-void SwTxtIter::TruncLines( sal_Bool bNoteFollow )
+void SwTxtIter::TruncLines( bool bNoteFollow )
{
SwLineLayout *pDel = pCurr->GetNext();
const xub_StrLen nEnd = nStart + pCurr->GetLen();
diff --git a/sw/source/core/text/itrtxt.hxx b/sw/source/core/text/itrtxt.hxx
index 1f8cdcf..cd56e8e 100644
--- a/sw/source/core/text/itrtxt.hxx
+++ b/sw/source/core/text/itrtxt.hxx
@@ -98,18 +98,18 @@ public:
const SwLineLayout *TwipsToLine(const SwTwips);
// Truncates all after pCurr
- void TruncLines( sal_Bool bNoteFollow = sal_False );
+ void TruncLines( bool bNoteFollow = false );
inline KSHORT GetLineHeight() const { return pCurr->GetRealHeight(); }
void CalcAscentAndHeight( KSHORT &rAscent, KSHORT &rHeight ) const;
// Lots of trouble for querying pCurr == pPara
- inline sal_Bool IsFirstTxtLine() const
+ inline bool IsFirstTxtLine() const
{ return nStart == GetInfo().GetTxtStart() &&
!( pCurr->IsDummy() && GetNextLine() ); }
// Replacement for the old IsFirstLine()
- inline sal_Bool IsParaLine() const
+ inline bool IsParaLine() const
{ return pCurr == pInf->GetParaPortion(); }
const SwLineInfo &GetLineInfo() const { return aLineInf; }
@@ -169,7 +169,7 @@ public:
inline KSHORT GetLineWidth() const
{ return KSHORT( Right() - GetLeftMargin() + 1 ); }
inline SwTwips GetLeftMin() const { return nFirst < nLeft ? nFirst : nLeft; }
- inline sal_Bool HasNegFirst() const { return nFirst < nLeft; }
+ inline bool HasNegFirst() const { return nFirst < nLeft; }
// #i91133#
inline SwTwips GetTabLeft() const
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index b018ca8..94d3986 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -299,7 +299,7 @@ sal_Bool SwFldPortion::Format( SwTxtFormatInfo &rInf )
// Scope wegen aDiffTxt::DTOR!
xub_StrLen nRest;
sal_Bool bFull;
- sal_Bool bEOL = sal_False;
+ bool bEOL = false;
long nTxtRest = rInf.GetTxt().Len() - rInf.GetIdx();
{
SwFldSlot aDiffTxt( &rInf, this );
@@ -618,7 +618,7 @@ sal_Bool SwNumberPortion::Format( SwTxtFormatInfo &rInf )
// fieser Sonderfall: FlyFrm liegt in dem Bereich,
// den wir uns gerade unter den Nagel reissen wollen.
// Die NumberPortion wird als verborgen markiert.
- const sal_Bool bFly = rInf.GetFly() ||
+ const bool bFly = rInf.GetFly() ||
( rInf.GetLast() && rInf.GetLast()->IsFlyPortion() );
if( nDiff > rInf.Width() )
{
@@ -704,7 +704,7 @@ void SwNumberPortion::Paint( const SwTxtPaintInfo &rInf ) const
if( aExpand.Len() )
{
const SwFont *pTmpFnt = rInf.GetFont();
- sal_Bool bPaintSpace = ( UNDERLINE_NONE != pTmpFnt->GetUnderline() ||
+ bool bPaintSpace = ( UNDERLINE_NONE != pTmpFnt->GetUnderline() ||
UNDERLINE_NONE != pTmpFnt->GetOverline() ||
STRIKEOUT_NONE != pTmpFnt->GetStrikeout() ) &&
!pTmpFnt->IsWordLineMode();
@@ -867,7 +867,7 @@ sal_Bool SwGrfNumPortion::Format( SwTxtFormatInfo &rInf )
}
Width( nFixWidth + nFollowedByWidth );
const sal_Bool bFull = rInf.Width() < rInf.X() + Width();
- const sal_Bool bFly = rInf.GetFly() ||
+ const bool bFly = rInf.GetFly() ||
( rInf.GetLast() && rInf.GetLast()->IsFlyPortion() );
SetAscent( static_cast<sal_uInt16>(GetRelPos() > 0 ? GetRelPos() : 0) );
if( GetAscent() > Height() )
@@ -933,7 +933,7 @@ void SwGrfNumPortion::Paint( const SwTxtPaintInfo &rInf ) const
long nTmpWidth = Max( (long)0, (long)(nFixWidth - 2 * GRFNUM_SECURE) );
Size aSize( nTmpWidth, GetGrfHeight() - 2 * GRFNUM_SECURE );
- const sal_Bool bTmpLeft = mbLabelAlignmentPosAndSpaceModeActive ||
+ const bool bTmpLeft = mbLabelAlignmentPosAndSpaceModeActive ||
( IsLeft() && ! rInf.GetTxtFrm()->IsRightToLeft() ) ||
( ! IsLeft() && ! IsCenter() && rInf.GetTxtFrm()->IsRightToLeft() );
@@ -964,7 +964,7 @@ void SwGrfNumPortion::Paint( const SwTxtPaintInfo &rInf ) const
}
SwRect aTmp( aPos, aSize );
- sal_Bool bDraw = sal_True;
+ bool bDraw = true;
if ( IsAnimated() )
{
@@ -1000,7 +1000,7 @@ void SwGrfNumPortion::Paint( const SwTxtPaintInfo &rInf ) const
// pdf export, printing, preview, stop animations...
else
- bDraw = sal_True;
+ bDraw = true;
}
if( bDraw )
( (Graphic*) pBrush->GetGraphic() )->StopAnimation( 0, nId );
diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx
index 646901b..971d86a 100644
--- a/sw/source/core/text/porfld.hxx
+++ b/sw/source/core/text/porfld.hxx
@@ -50,11 +50,11 @@ protected:
sal_Bool bNoPaint : 1; // Used by SwGrfNumPortion
sal_Bool bReplace : 1; // Used by SwGrfNumPortion
const bool bPlaceHolder : 1;
- sal_Bool m_bNoLength : 1; // HACK for meta suffix (no CH_TXTATR)
+ bool m_bNoLength : 1; // HACK for meta suffix (no CH_TXTATR)
inline void SetFont( SwFont *pNew ) { pFnt = pNew; }
inline bool IsNoLength() const { return m_bNoLength; }
- inline void SetNoLength() { m_bNoLength = sal_True; }
+ inline void SetNoLength() { m_bNoLength = true; }
public:
SwFldPortion( const SwFldPortion& rFld );
@@ -63,7 +63,7 @@ public:
void TakeNextOffset( const SwFldPortion* pFld );
void CheckScript( const SwTxtSizeInfo &rInf );
- inline sal_Bool HasFont() const { return 0 != pFnt; }
+ inline bool HasFont() const { return 0 != pFnt; }
// #i89179# - made public
inline const SwFont *GetFont() const { return pFnt; }
diff --git a/sw/source/core/text/porglue.cxx b/sw/source/core/text/porglue.cxx
index b434d70..1b55b92 100644
--- a/sw/source/core/text/porglue.cxx
+++ b/sw/source/core/text/porglue.cxx
@@ -201,7 +201,7 @@ SwMarginPortion::SwMarginPortion( const KSHORT nFixedWidth )
void SwMarginPortion::AdjustRight( const SwLineLayout *pCurr )
{
SwGluePortion *pRight = 0;
- sal_Bool bNoMove = 0 != pCurr->GetpKanaComp();
+ bool bNoMove = 0 != pCurr->GetpKanaComp();
while( pRight != this )
{
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index ca905b8..f4f367f 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -79,7 +79,7 @@ using namespace i18n::ScriptType;
#endif
#define isSeenOrSadChar(c) (IS_JOINING_GROUP((c), SAD) || IS_JOINING_GROUP((c), SEEN))
-sal_Bool isTransparentChar ( sal_Unicode cCh )
+bool isTransparentChar ( sal_Unicode cCh )
{
return u_getIntPropertyValue( cCh, UCHAR_JOINING_TYPE ) == U_JT_TRANSPARENT;
}
@@ -90,7 +90,7 @@ sal_Bool isTransparentChar ( sal_Unicode cCh )
* Checks if cCh + cNectCh builds a ligature (used for Kashidas)
*************************************************************************/
-static sal_Bool lcl_IsLigature( sal_Unicode cCh, sal_Unicode cNextCh )
+static bool lcl_IsLigature( sal_Unicode cCh, sal_Unicode cNextCh )
{
// Lam + Alef
return ( isLamChar ( cCh ) && isAlefChar ( cNextCh ));
@@ -102,10 +102,10 @@ static sal_Bool lcl_IsLigature( sal_Unicode cCh, sal_Unicode cNextCh )
* Checks if cCh is connectable to cPrevCh (used for Kashidas)
*************************************************************************/
-static sal_Bool lcl_ConnectToPrev( sal_Unicode cCh, sal_Unicode cPrevCh )
+static bool lcl_ConnectToPrev( sal_Unicode cCh, sal_Unicode cPrevCh )
{
const int32_t nJoiningType = u_getIntPropertyValue( cPrevCh, UCHAR_JOINING_TYPE );
- sal_Bool bRet = nJoiningType != U_JT_RIGHT_JOINING && nJoiningType != U_JT_NON_JOINING;
+ bool bRet = nJoiningType != U_JT_RIGHT_JOINING && nJoiningType != U_JT_NON_JOINING;
// check for ligatures cPrevChar + cChar
if( bRet )
@@ -291,7 +291,7 @@ void SwLineLayout::CalcLine( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
KSHORT nFlyAscent = 0;
KSHORT nFlyHeight = 0;
KSHORT nFlyDescent = 0;
- sal_Bool bOnlyPostIts = sal_True;
+ bool bOnlyPostIts = true;
SetHanging( sal_False );
sal_Bool bTmpDummy = ( 0 == GetLen() );
@@ -391,7 +391,7 @@ void SwLineLayout::CalcLine( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
// to reformat.
if ( !pPos->IsBreakPortion() || !Height() )
{
- bOnlyPostIts &= pPos->IsPostItsPortion();
+ if (!pPos->IsPostItsPortion()) bOnlyPostIts = false;
if( bTmpDummy && !nLineLength )
{
@@ -716,7 +716,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
const SwCharCompressType aCompEnum = rNode.getIDocumentSettingAccess()->getCharacterCompressionType();
// justification type
- const sal_Bool bAdjustBlock = SVX_ADJUST_BLOCK ==
+ const bool bAdjustBlock = SVX_ADJUST_BLOCK ==
rNode.GetSwAttrSet().GetAdjust().GetAdjust();
//
@@ -1155,13 +1155,13 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
#if OSL_DEBUG_LEVEL > 0
// check kashida data
long nTmpKashidaPos = -1;
- sal_Bool bWrongKash = sal_False;
+ bool bWrongKash = false;
for (i = 0; i < aKashida.size(); ++i )
{
long nCurrKashidaPos = GetKashida( i );
if ( nCurrKashidaPos <= nTmpKashidaPos )
{
- bWrongKash = sal_True;
+ bWrongKash = true;
break;
}
nTmpKashidaPos = nCurrKashidaPos;
@@ -2143,7 +2143,7 @@ void SwLineLayout::Init( SwLinePortion* pNextPortion )
SwTwips SwLineLayout::_GetHangingMargin() const
{
SwLinePortion* pPor = GetPortion();
- sal_Bool bFound = sal_False;
+ bool bFound = false;
SwTwips nDiff = 0;
while( pPor)
{
@@ -2151,7 +2151,7 @@ SwTwips SwLineLayout::_GetHangingMargin() const
{
nDiff = ((SwHangingPortion*)pPor)->GetInnerWidth() - pPor->Width();
if( nDiff )
- bFound = sal_True;
+ bFound = true;
}
// the last post its portion
else if ( pPor->IsPostItsPortion() && ! pPor->GetPortion() )
diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx
index b71a621..e4bb214 100644
--- a/sw/source/core/text/porlay.hxx
+++ b/sw/source/core/text/porlay.hxx
@@ -53,11 +53,11 @@ public:
{ return nStart + nLen; }
inline xub_StrLen &Len() { return nLen; }
inline const xub_StrLen &Len() const { return nLen; }
- inline sal_Bool operator<(const SwCharRange &rRange) const
+ inline bool operator<(const SwCharRange &rRange) const
{ return nStart < rRange.nStart; }
- inline sal_Bool operator>(const SwCharRange &rRange) const
+ inline bool operator>(const SwCharRange &rRange) const
{ return nStart + nLen > rRange.nStart + rRange.nLen; }
- inline sal_Bool operator!=(const SwCharRange &rRange) const
+ inline bool operator!=(const SwCharRange &rRange) const
{ return *this < rRange || *this > rRange; }
SwCharRange &operator+=(const SwCharRange &rRange);
};
@@ -180,7 +180,7 @@ public:
//
// STUFF FOR JUSTIFIED ALIGNMENT
//
- inline sal_Bool IsSpaceAdd() { return pLLSpaceAdd != NULL; }
+ inline bool IsSpaceAdd() { return pLLSpaceAdd != NULL; }
void InitSpaceAdd(); // Creates pLLSpaceAdd if necessary
void CreateSpaceAdd( const long nInit = 0 );
inline void FinishSpaceAdd() { delete pLLSpaceAdd; pLLSpaceAdd = NULL; }
diff --git a/sw/source/core/text/porlin.cxx b/sw/source/core/text/porlin.cxx
index d70e59e..69017ec 100644
--- a/sw/source/core/text/porlin.cxx
+++ b/sw/source/core/text/porlin.cxx
@@ -28,7 +28,7 @@
#include "blink.hxx"
#if OSL_DEBUG_LEVEL > 0
-sal_Bool ChkChain( SwLinePortion *pStart )
+bool ChkChain( SwLinePortion *pStart )
{
SwLinePortion *pPor = pStart->GetPortion();
MSHORT nCount = 0;
@@ -44,11 +44,11 @@ sal_Bool ChkChain( SwLinePortion *pStart )
pStart->SetPortion(0);
pPor->Truncate();
pStart->SetPortion( pPor );
- return sal_False;
+ return false;
}
pPor = pPor->GetPortion();
}
- return sal_True;
+ return true;
}
#endif
@@ -104,7 +104,7 @@ void SwLinePortion::PrePaint( const SwTxtPaintInfo& rInf,
KSHORT nPos;
SwTxtPaintInfo aInf( rInf );
- const sal_Bool bBidiPor = ( rInf.GetTxtFrm()->IsRightToLeft() ) !=
+ const bool bBidiPor = ( rInf.GetTxtFrm()->IsRightToLeft() ) !=
( 0 != ( TEXT_LAYOUT_BIDI_RTL & rInf.GetOut()->GetLayoutMode() ) );
sal_uInt16 nDir = bBidiPor ?
@@ -326,9 +326,9 @@ void SwLinePortion::FormatEOL( SwTxtFormatInfo & )
void SwLinePortion::Move( SwTxtPaintInfo &rInf )
{
- sal_Bool bB2T = rInf.GetDirection() == DIR_BOTTOM2TOP;
- const sal_Bool bFrmDir = rInf.GetTxtFrm()->IsRightToLeft();
- sal_Bool bCounterDir = ( ! bFrmDir && DIR_RIGHT2LEFT == rInf.GetDirection() ) ||
+ bool bB2T = rInf.GetDirection() == DIR_BOTTOM2TOP;
+ const bool bFrmDir = rInf.GetTxtFrm()->IsRightToLeft();
+ bool bCounterDir = ( ! bFrmDir && DIR_RIGHT2LEFT == rInf.GetDirection() ) ||
( bFrmDir && DIR_LEFT2RIGHT == rInf.GetDirection() );
if ( InSpaceGrp() && rInf.GetSpaceAdd() )
diff --git a/sw/source/core/text/porlin.hxx b/sw/source/core/text/porlin.hxx
index 67713c6..fb7ac39 100644
--- a/sw/source/core/text/porlin.hxx
+++ b/sw/source/core/text/porlin.hxx
@@ -83,7 +83,7 @@ public:
// Access methods
inline SwLinePortion *GetPortion() const { return( pPortion ); }
inline SwLinePortion &operator=(const SwLinePortion &rPortion);
- inline sal_Bool operator==( const SwLinePortion &rPortion ) const;
+ inline bool operator==( const SwLinePortion &rPortion ) const;
inline xub_StrLen GetLen() const { return nLineLength; }
inline void SetLen( const xub_StrLen nLen ) { nLineLength = nLen; }
inline void SetPortion( SwLinePortion *pNew ){ pPortion = pNew; }
@@ -204,7 +204,7 @@ inline SwLinePortion &SwLinePortion::operator=(const SwLinePortion &rPortion)
return *this;
}
-inline sal_Bool SwLinePortion::operator==(const SwLinePortion &rPortion ) const
+inline bool SwLinePortion::operator==(const SwLinePortion &rPortion ) const
{
return( Height() == rPortion.Height() &&
Width() == rPortion.Width() &&
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 1cc5fea..7180f77 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -816,7 +816,7 @@ void SwRubyPortion::CalcRubyOffset()
* the 2-line-formats has the same brackets.
* --------------------------------------------------*/
-static sal_Bool lcl_Has2Lines( const SwTxtAttr& rAttr, const SvxTwoLinesItem* &rpRef,
+static bool lcl_Has2Lines( const SwTxtAttr& rAttr, const SvxTwoLinesItem* &rpRef,
sal_Bool &rValue )
{
const SfxPoolItem* pItem = CharFmt::GetItem( rAttr, RES_CHRATR_TWO_LINES );
@@ -830,9 +830,9 @@ static sal_Bool lcl_Has2Lines( const SwTxtAttr& rAttr, const SvxTwoLinesItem* &r
((SvxTwoLinesItem*)pItem)->GetStartBracket() !=
rpRef->GetStartBracket() )
rValue = sal_False;
- return sal_True;
+ return true;
}
- return sal_False;
+ return false;
}
/*--------------------------------------------------
@@ -846,7 +846,7 @@ static sal_Bool lcl_Has2Lines( const SwTxtAttr& rAttr, const SvxTwoLinesItem* &r
* to the charrotate-format's value.
* --------------------------------------------------*/
-static sal_Bool lcl_HasRotation( const SwTxtAttr& rAttr,
+static bool lcl_HasRotation( const SwTxtAttr& rAttr,
const SvxCharRotateItem* &rpRef, sal_Bool &rValue )
{
const SfxPoolItem* pItem = CharFmt::GetItem( rAttr, RES_CHRATR_ROTATE );
@@ -858,10 +858,10 @@ static sal_Bool lcl_HasRotation( const SwTxtAttr& rAttr,
else if( ((SvxCharRotateItem*)pItem)->GetValue() !=
rpRef->GetValue() )
rValue = sal_False;
- return sal_True;
+ return true;
}
- return sal_False;
+ return false;
}
SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
@@ -883,11 +883,11 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
// check if there is a field at rPos:
sal_uInt8 nNextLevel = nCurrLevel;
- sal_Bool bFldBidi = sal_False;
+ bool bFldBidi = false;
if ( CH_TXTATR_BREAKWORD == GetChar( rPos ) )
{
- bFldBidi = sal_True;
+ bFldBidi = true;
/*
// examining the script of the field text should be sufficient
// for 99% of all cases
@@ -895,13 +895,13 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
if ( pBreakIt->GetBreakIter().is() && aTxt.Len() )
{
- sal_Bool bFldDir = ( i18n::ScriptType::COMPLEX ==
+ bool bFldDir = ( i18n::ScriptType::COMPLEX ==
pBreakIt->GetRealScriptOfText( aTxt, 0 ) );
- sal_Bool bCurrDir = ( 0 != ( nCurrLevel % 2 ) );
+ bool bCurrDir = ( 0 != ( nCurrLevel % 2 ) );
if ( bFldDir != bCurrDir )
{
nNextLevel = nCurrLevel + 1;
- bFldBidi = sal_True;
+ bFldBidi = true;
}
}*/
}
@@ -1354,9 +1354,9 @@ void SwTxtPainter::PaintMultiPortion( const SwRect &rPaint,
SwMultiPortion& rMulti, const SwMultiPortion* pEnvPor )
{
GETGRID( pFrm->FindPageFrm() )
- const sal_Bool bHasGrid = pGrid && GetInfo().SnapToGrid();
+ const bool bHasGrid = pGrid && GetInfo().SnapToGrid();
sal_uInt16 nRubyHeight = 0;
- sal_Bool bRubyTop = sal_False;
+ bool bRubyTop = false;
if ( bHasGrid )
{
@@ -1533,13 +1533,13 @@ void SwTxtPainter::PaintMultiPortion( const SwRect &rPaint,
else
GetInfo().Y( nOfst + AdjustBaseLine( *pLay, pPor ) );
- sal_Bool bSeeked = sal_True;
+ bool bSeeked = true;
GetInfo().SetLen( pPor->GetLen() );
if( bRest && pPor->InFldGrp() && !pPor->GetLen() )
{
if( ((SwFldPortion*)pPor)->HasFont() )
- bSeeked = sal_False;
+ bSeeked = false;
else
SeekAndChgBefore( GetInfo() );
}
@@ -1553,7 +1553,7 @@ void SwTxtPainter::PaintMultiPortion( const SwRect &rPaint,
SeekAndChgBefore( GetInfo() );
}
else
- bSeeked = sal_False;
+ bSeeked = false;
SwLinePortion *pNext = pPor->GetPortion();
if(GetInfo().OnWin() && pNext && !pNext->Width() )
@@ -1675,7 +1675,7 @@ void SwTxtPainter::PaintMultiPortion( const SwRect &rPaint,
SetPropFont( 0 );
}
-static sal_Bool lcl_ExtractFieldFollow( SwLineLayout* pLine, SwLinePortion* &rpFld )
+static bool lcl_ExtractFieldFollow( SwLineLayout* pLine, SwLinePortion* &rpFld )
{
SwLinePortion* pLast = pLine;
rpFld = pLine->GetPortion();
@@ -1684,7 +1684,7 @@ static sal_Bool lcl_ExtractFieldFollow( SwLineLayout* pLine, SwLinePortion* &rpF
pLast = rpFld;
rpFld = rpFld->GetPortion();
}
- sal_Bool bRet = rpFld != 0;
+ bool bRet = rpFld != 0;
if( bRet )
{
if( ((SwFldPortion*)rpFld)->IsFollow() )
@@ -1858,9 +1858,9 @@ sal_Bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
sal_Bool bRet = sal_False;
GETGRID( pFrm->FindPageFrm() )
- const sal_Bool bHasGrid = pGrid && GRID_LINES_CHARS == pGrid->GetGridType();
+ const bool bHasGrid = pGrid && GRID_LINES_CHARS == pGrid->GetGridType();
- sal_Bool bRubyTop = sal_False;
+ bool bRubyTop = false;
if ( bHasGrid )
bRubyTop = ! pGrid->GetRubyTextBelow();
@@ -1997,7 +1997,7 @@ sal_Bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
}
delete pNextFirst;
pNextFirst = NULL;
- } while ( sal_True );
+ } while ( true );
pMulti = pOldMulti;
diff --git a/sw/source/core/text/pormulti.hxx b/sw/source/core/text/pormulti.hxx
index 767f3fa..104be15 100644
--- a/sw/source/core/text/pormulti.hxx
+++ b/sw/source/core/text/pormulti.hxx
@@ -135,9 +135,9 @@ public:
// Summarize the internal lines to calculate the (external) size
void CalcSize( SwTxtFormatter& rLine, SwTxtFormatInfo &rInf );
- inline sal_Bool HasBrackets() const;
- inline sal_Bool HasRotation() const { return 0 != (1 & nDirection); }
- inline sal_Bool IsRevers() const { return 0 != (2 & nDirection); }
+ inline bool HasBrackets() const;
+ inline bool HasRotation() const { return 0 != (1 & nDirection); }
+ inline bool IsRevers() const { return 0 != (2 & nDirection); }
inline sal_uInt8 GetDirection() const { return nDirection; }
inline sal_uInt16 GetFontRotation() const
{ return ( HasRotation() ? ( IsRevers() ? 2700 : 900 ) : 0 ); }
@@ -248,11 +248,9 @@ public:
* inline - Implementations
*************************************************************************/
-inline sal_Bool SwMultiPortion::HasBrackets() const
+inline bool SwMultiPortion::HasBrackets() const
{
- return sal::static_int_cast< sal_Bool >( IsDouble() ?
- 0 != ((SwDoubleLinePortion*)this)->GetBrackets() :
- sal_False );
+ return IsDouble() ? 0 != ((SwDoubleLinePortion*)this)->GetBrackets() : false;
}
CLASSIO( SwMultiPortion )
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index cebe0b5..7b90327 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -1421,7 +1421,7 @@ void SwTxtFrm::PrepWidows( const MSHORT nNeed, sal_Bool bNotify )
if( bSplit )
{
GetFollow()->SetOfst( aLine.GetEnd() );
- aLine.TruncLines( sal_True );
+ aLine.TruncLines( true );
if( pPara->IsFollowField() )
GetFollow()->SetFieldFollow( sal_True );
}
diff --git a/sw/source/core/text/widorp.cxx b/sw/source/core/text/widorp.cxx
index af377dc..7749c4e 100644
--- a/sw/source/core/text/widorp.cxx
+++ b/sw/source/core/text/widorp.cxx
@@ -360,7 +360,7 @@ sal_Bool WidowsAndOrphans::FindBreak( SwTxtFrm *pFrame, SwTxtMargin &rLine,
( ( bHasToFit && bRet ) || IsBreakNow( rLine ) ) )
rLine.Top();
- rLine.TruncLines( sal_True );
+ rLine.TruncLines( true );
bRet = bBack;
}
nOrphLines = nOldOrphans;
More information about the Libreoffice-commits
mailing list