[Libreoffice-commits] core.git: 20 commits - sw/inc sw/source
Matteo Casalin
matteo.casalin at yahoo.com
Sun Feb 16 22:56:12 CET 2014
sw/inc/ndtxt.hxx | 60 +++----
sw/source/core/access/accpara.cxx | 2
sw/source/core/bastyp/swcache.cxx | 2
sw/source/core/crsr/swcrsr.cxx | 2
sw/source/core/edit/edattr.cxx | 2
sw/source/core/edit/editsh.cxx | 3
sw/source/core/inc/scriptinfo.hxx | 4
sw/source/core/inc/swcache.hxx | 4
sw/source/core/inc/txtfrm.hxx | 180 ++++++++++-----------
sw/source/core/inc/wrong.hxx | 10 -
sw/source/core/layout/frmtool.cxx | 8
sw/source/core/text/EnhancedPDFExportHelper.cxx | 12 -
sw/source/core/text/blink.cxx | 2
sw/source/core/text/frmcrsr.cxx | 66 +++----
sw/source/core/text/frmform.cxx | 163 +++++++++----------
sw/source/core/text/frminf.cxx | 2
sw/source/core/text/frmpaint.cxx | 24 +-
sw/source/core/text/itradj.cxx | 4
sw/source/core/text/itratr.cxx | 2
sw/source/core/text/itrcrsr.cxx | 8
sw/source/core/text/porlay.cxx | 37 ++--
sw/source/core/text/porlay.hxx | 204 ++++++++++++------------
sw/source/core/text/porlin.hxx | 88 ++++------
sw/source/core/text/porrst.cxx | 22 +-
sw/source/core/text/portab.hxx | 6
sw/source/core/text/portxt.hxx | 2
sw/source/core/text/redlnitr.cxx | 40 ++--
sw/source/core/text/redlnitr.hxx | 24 +-
sw/source/core/text/txtcache.cxx | 22 +-
sw/source/core/text/txtcache.hxx | 2
sw/source/core/text/txtfly.cxx | 98 +++++------
sw/source/core/text/txtfly.hxx | 77 ++++-----
sw/source/core/text/txtfrm.cxx | 77 ++++-----
sw/source/core/text/txtftn.cxx | 64 +++----
sw/source/core/text/txthyph.cxx | 24 +-
sw/source/core/text/txtpaint.cxx | 6
sw/source/core/text/txtpaint.hxx | 16 -
sw/source/core/text/txttab.cxx | 8
sw/source/core/text/widorp.cxx | 86 +++++-----
sw/source/core/text/widorp.hxx | 30 +--
sw/source/core/text/wrong.cxx | 36 ++--
sw/source/core/txtnode/ndtxt.cxx | 47 ++---
sw/source/core/txtnode/thints.cxx | 20 +-
sw/source/core/txtnode/txtedt.cxx | 12 -
sw/source/ui/uiview/viewtab.cxx | 2
45 files changed, 796 insertions(+), 814 deletions(-)
New commits:
commit 3ec96dc587411c5347a77bba404c1e7a94e2d19c
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date: Sun Feb 16 22:49:51 2014 +0100
sal_Bool to bool
Change-Id: Ifc98bc3afff33670fbde724a0d8e8df842dda641
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index c25d936..ed73842 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -1561,7 +1561,7 @@ SwCursor::DoSetBidiLevelLeftRight(
if( pSttFrm )
{
sal_uInt8 nCrsrLevel = GetCrsrBidiLevel();
- sal_Bool bForward = ! io_rbLeft;
+ bool bForward = ! io_rbLeft;
((SwTxtFrm*)pSttFrm)->PrepareVisualMove( nPos, nCrsrLevel,
bForward, bInsertCrsr );
rIdx = nPos;
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index 689720f..3052fb1 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -96,65 +96,65 @@ class SwTxtFrm: public SwCntntFrm
void CalcLineSpace();
// Wird nur in Format gerufen:
- void AdjustFrm( const SwTwips nChgHeight, sal_Bool bHasToFit = sal_False );
+ void AdjustFrm( const SwTwips nChgHeight, bool bHasToFit = false );
// wertet in Format() die Preps aus.
- sal_Bool CalcPreps();
- void PrepWidows( const sal_uInt16 nNeed, sal_Bool bNotify = sal_True );
+ bool CalcPreps();
+ void PrepWidows( const sal_uInt16 nNeed, bool bNotify = true );
void _InvalidateRange( const SwCharRange &, const long = 0);
inline void InvalidateRange( const SwCharRange &, const long = 0);
// WidowsAndOrphans, AdjustFrm, AdjustFollow
void FormatAdjust( SwTxtFormatter &rLine, WidowsAndOrphans &rFrmBreak,
- const sal_Int32 nStrLen, const sal_Bool bDummy );
-
- sal_Bool bLocked : 1; // im Format?
- sal_Bool bFormatted : 1; // nach Format auf sal_True
- sal_Bool bWidow : 1; // sind wir ein Widow
- sal_Bool bJustWidow : 1; // haben wir soeben Widow angefordert
- sal_Bool bEmpty : 1; // sind wir ein leerer Absatz
- sal_Bool bInFtnConnect : 1; // Steht gerade im Connect
- sal_Bool bFtn : 1; // Hat mindestens eine Fussnote
- sal_Bool bRepaint : 1; // TxtFrm: Repaint steht zur Abholung bereit
- sal_Bool bBlinkPor : 1; // enthaelt Blink-Portions
- sal_Bool bFieldFollow : 1; // beginne mit Feldrest des Masters
- sal_Bool bHasAnimation : 1; // enthaelt animierte SwGrfNumPortion
- sal_Bool bIsSwapped : 1; // during text formatting we swap the
+ const sal_Int32 nStrLen, const bool bDummy );
+
+ bool bLocked : 1; // im Format?
+ bool bFormatted : 1; // nach Format auf true
+ bool bWidow : 1; // sind wir ein Widow
+ bool bJustWidow : 1; // haben wir soeben Widow angefordert
+ bool bEmpty : 1; // sind wir ein leerer Absatz
+ bool bInFtnConnect : 1; // Steht gerade im Connect
+ bool bFtn : 1; // Hat mindestens eine Fussnote
+ bool bRepaint : 1; // TxtFrm: Repaint steht zur Abholung bereit
+ bool bBlinkPor : 1; // enthaelt Blink-Portions
+ bool bFieldFollow : 1; // beginne mit Feldrest des Masters
+ bool bHasAnimation : 1; // enthaelt animierte SwGrfNumPortion
+ bool bIsSwapped : 1; // during text formatting we swap the
// width and height for vertical formatting
// OD 14.03.2003 #i11760# - flag to control, if follow is formatted in
// method <CalcFollow(..)>.
// E.g., avoid formatting of follow, if method <SwLayoutFrm::FormatWidthCols(..)>
// is running.
- sal_Bool mbFollowFormatAllowed : 1;
+ bool mbFollowFormatAllowed : 1;
void ResetPreps();
- inline void Lock() { bLocked = sal_True; }
- inline void Unlock() { bLocked = sal_False; }
- inline void SetFormatted( const sal_Bool bNew ) { bFormatted = bNew; }
- inline void SetWidow( const sal_Bool bNew ) { bWidow = bNew; }
- inline void SetJustWidow( const sal_Bool bNew ) { bJustWidow = bNew; }
- inline void SetEmpty( const sal_Bool bNew ) { bEmpty = bNew; }
- inline void SetFieldFollow( const sal_Bool bNew ) { bFieldFollow = bNew; }
+ inline void Lock() { bLocked = true; }
+ inline void Unlock() { bLocked = false; }
+ inline void SetFormatted( const bool bNew ) { bFormatted = bNew; }
+ inline void SetWidow( const bool bNew ) { bWidow = bNew; }
+ inline void SetJustWidow( const bool bNew ) { bJustWidow = bNew; }
+ inline void SetEmpty( const bool bNew ) { bEmpty = bNew; }
+ inline void SetFieldFollow( const bool bNew ) { bFieldFollow = bNew; }
- sal_Bool IsIdxInside( const sal_Int32 nPos, const sal_Int32 nLen ) const;
+ bool IsIdxInside( const sal_Int32 nPos, const sal_Int32 nLen ) const;
// Wechselt den Frame oder auch nicht (vgl. FlyCnt)
- sal_Bool _GetCrsrOfst(SwPosition *pPos, const Point &rPoint,
- const sal_Bool bChgFrm, SwCrsrMoveState* = 0 ) const;
+ bool _GetCrsrOfst(SwPosition *pPos, const Point &rPoint,
+ const bool bChgFrm, SwCrsrMoveState* = 0 ) const;
void FillCrsrPos( SwFillData &rFill ) const;
// formatiert genau eine Zeile ...
- sal_Bool FormatLine( SwTxtFormatter &rLine, const sal_Bool bPrev );
+ bool FormatLine( SwTxtFormatter &rLine, const bool bPrev );
// Um Stack einzusparen aufgeteilt ...
// _Format ruft _Format mit Parametern
void _Format( SwParaPortion *pPara );
void _Format( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf,
- const sal_Bool bAdjust = sal_False );
+ const bool bAdjust = false );
void FormatOnceMore( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf );
// formatiert den Follow und sorgt fuer die Entsorgung bei Orphans
- sal_Bool CalcFollow( const sal_Int32 nTxtOfst );
+ bool CalcFollow( const sal_Int32 nTxtOfst );
// korrigiert die Stelle ab der formatiert werden muss.
sal_Int32 FindBrk(const OUString &rTxt, const sal_Int32 nStart,
@@ -164,26 +164,26 @@ class SwTxtFrm: public SwCntntFrm
SwTwips _GetFtnFrmHeight() const;
// Aus CalcPreps ausgelagert.
- sal_Bool CalcPrepFtnAdjust();
+ bool CalcPrepFtnAdjust();
// Fuer Ftn und WidOrp: Zwangsvalidierung
void ValidateFrm();
void ValidateBodyFrm();
- sal_Bool _GetDropRect( SwRect &rRect ) const;
+ bool _GetDropRect( SwRect &rRect ) const;
void SetPara( SwParaPortion *pNew, bool bDelete = true );
- sal_Bool _IsFtnNumFrm() const;
+ bool _IsFtnNumFrm() const;
// 6995: Formatinformationen auffrischen
- sal_Bool FormatQuick( bool bForceQuickFormat );
+ bool FormatQuick( bool bForceQuickFormat );
// Opt: Leere Absaetze formatieren
- sal_Bool FormatEmpty();
+ bool FormatEmpty();
SwTwips EmptyHeight() const;
// Opt: Leere Absaetze painten
- sal_Bool PaintEmpty( const SwRect &, sal_Bool bCheck ) const;
+ bool PaintEmpty( const SwRect &, bool bCheck ) const;
void ChgThisLines();//Muss immer gerufen werden, wenn sich die Zeilenazahl
//veraendert haben kann.
@@ -234,7 +234,7 @@ public:
virtual sal_Bool GetCharRect( SwRect& rRect, const SwPosition& rPos,
SwCrsrMoveState* pCMS = 0 ) const;
// Eine etwas abgespeckte GetCharRect-Version fuer autopositionierte Rahmen
- sal_Bool GetAutoPos( SwRect &, const SwPosition& ) const;
+ bool GetAutoPos( SwRect &, const SwPosition& ) const;
/** determine top of line for given position in the text frame
@@ -265,14 +265,14 @@ public:
//gesetzten Textbuffers zurueck, welcher der durch aPoint
//gegebenen Position innerhalb der SSize des Layout am
//naechsten ist. Wenn der SPoint ausserhalb der SSize liegt,
- //liefert die Funktion sal_False, sal_True sonst.
+ //liefert die Funktion false, true sonst.
virtual sal_Bool GetCrsrOfst( SwPosition *, Point&,
SwCrsrMoveState* = 0, bool bTestBackground = false ) const;
// GetKeyCrsrOfst sorgt dafuer, dass der Frame nicht gewechselt wird
// (z.B. Wechsel in den zeichengebundenen Frame).
- inline sal_Bool GetKeyCrsrOfst(SwPosition *pPos, const Point &rPoint ) const
- { return _GetCrsrOfst( pPos, rPoint, sal_False ); }
+ inline bool GetKeyCrsrOfst(SwPosition *pPos, const Point &rPoint ) const
+ { return _GetCrsrOfst( pPos, rPoint, false ); }
void PaintExtraData( const SwRect & rRect ) const; //Seitennummer usw.
SwRect Paint();
@@ -289,15 +289,15 @@ public:
sal_Bool bSetInReadOnly = sal_False ) const;
virtual sal_Bool UnitDown(SwPaM *, const SwTwips nOffset = 0,
sal_Bool bSetInReadOnly = sal_False ) const;
- sal_Bool _UnitUp(SwPaM *, const SwTwips nOffset = 0,
- sal_Bool bSetInReadOnly = sal_False ) const;
- sal_Bool _UnitDown(SwPaM *, const SwTwips nOffset = 0,
- sal_Bool bSetInReadOnly = sal_False ) const;
+ bool _UnitUp(SwPaM *, const SwTwips nOffset = 0,
+ bool bSetInReadOnly = false ) const;
+ bool _UnitDown(SwPaM *, const SwTwips nOffset = 0,
+ bool bSetInReadOnly = false ) const;
// Prepares the cursor position for a visual cursor move (BiDi).
// The behaviour is different for insert and overwrite cursors
void PrepareVisualMove( sal_Int32& nPos, sal_uInt8& nCrsrLevel,
- sal_Bool& bRight, sal_Bool bInsertCrsr );
+ bool& bRight, bool bInsertCrsr );
// Methoden zur Verwaltung von FolgeFrames
SwCntntFrm *SplitFrm( const sal_Int32 nTxtPos );
@@ -311,7 +311,7 @@ public:
// OD 07.10.2003 #110978# - return <reference> instead of <pointer>
SwTxtFrm& GetFrmAtOfst( const sal_Int32 nOfst );
// Wenn es einen Follow gibt und wir selbst keinen Text enthalten:
- inline sal_Bool IsEmptyMaster() const
+ inline bool IsEmptyMaster() const
{ return GetFollow() && !GetFollow()->GetOfst(); }
// Liefert den zu bearbeitenden Textausschnitt zurueck (inline, s.u.)
@@ -362,27 +362,27 @@ public:
DECL_FIXEDMEMPOOL_NEWDEL(SwTxtFrm)
// Locking
- inline sal_Bool IsLocked() const { return bLocked; }
- inline sal_Bool IsFormatted() const { return bFormatted; }
+ inline bool IsLocked() const { return bLocked; }
+ inline bool IsFormatted() const { return bFormatted; }
- inline sal_Bool IsWidow() const { return bWidow; }
- inline sal_Bool IsJustWidow() const { return bJustWidow; }
- inline sal_Bool IsEmpty() const { return bEmpty; }
- inline sal_Bool HasFtn() const { return bFtn; }
- inline sal_Bool IsInFtnConnect()const { return bInFtnConnect;}
- inline sal_Bool IsFieldFollow() const { return bFieldFollow;}
+ inline bool IsWidow() const { return bWidow; }
+ inline bool IsJustWidow() const { return bJustWidow; }
+ inline bool IsEmpty() const { return bEmpty; }
+ inline bool HasFtn() const { return bFtn; }
+ inline bool IsInFtnConnect()const { return bInFtnConnect;}
+ inline bool IsFieldFollow() const { return bFieldFollow;}
inline void SetRepaint() const;
inline void ResetRepaint() const;
- inline sal_Bool HasRepaint() const { return bRepaint; }
+ inline bool HasRepaint() const { return bRepaint; }
inline void SetBlinkPor() const;
inline void ResetBlinkPor() const;
- inline sal_Bool HasBlinkPor() const { return bBlinkPor; }
+ inline bool HasBlinkPor() const { return bBlinkPor; }
inline void SetAnimation() const
- { ( (SwTxtFrm*)this )->bHasAnimation = sal_True; }
- inline sal_Bool HasAnimation() const { return bHasAnimation; }
+ { ( (SwTxtFrm*)this )->bHasAnimation = true; }
+ inline bool HasAnimation() const { return bHasAnimation; }
- inline sal_Bool IsSwapped() const { return bIsSwapped; }
+ inline bool IsSwapped() const { return bIsSwapped; }
// Hat der Frm eine lokale Fussnote (in diesem Frm bzw. Follow)?
#ifdef DBG_UTIL
@@ -392,7 +392,7 @@ public:
#endif
// Hidden
- sal_Bool IsHiddenNow() const; // bHidden && pOut == pPrt
+ bool IsHiddenNow() const; // bHidden && pOut == pPrt
void HideHidden(); // Anhaengsel entfernen wenn Hidden
void HideFootnotes( sal_Int32 nStart, sal_Int32 nEnd );
@@ -446,16 +446,16 @@ public:
SwTxtFrm* GetFormatted( bool bForceQuickFormat = false );
// wird demnaechst uebertragen
- inline void SetFtn( const sal_Bool bNew ) { bFtn = bNew; }
+ inline void SetFtn( const bool bNew ) { bFtn = bNew; }
// Beruecksichtigung der Follows
- inline sal_Bool IsInside( const sal_Int32 nPos ) const;
+ inline bool IsInside( const sal_Int32 nPos ) const;
const SwBodyFrm *FindBodyFrm() const;
// DropCaps und Selektionen
- inline sal_Bool GetDropRect( SwRect &rRect ) const
- { return HasPara() ? _GetDropRect( rRect ) : sal_False; }
+ inline bool GetDropRect( SwRect &rRect ) const
+ { return HasPara() && _GetDropRect( rRect ); }
static SwCache *GetTxtCache() { return pTxtCache; }
static void SetTxtCache( SwCache *pNew ) { pTxtCache = pNew; }
@@ -470,7 +470,7 @@ public:
void ClearPara();
// Bin ich ein FtnFrm, der eine Nummer am Absatzanfang hat?
- inline sal_Bool IsFtnNumFrm() const
+ inline bool IsFtnNumFrm() const
{ return IsInFtn() && !GetIndPrev() && _IsFtnNumFrm(); }
// simuliert eine Formatierung, als wenn es keinen rechten Rand und
@@ -505,7 +505,7 @@ public:
sal_Int32 CalcFlyPos( SwFrmFmt* pSearch );
// Ermittelt die Startposition und Schrittweite des Registers
- sal_Bool FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff );
+ bool FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff );
sal_uInt16 GetLineCount( sal_Int32 nPos ); //Ermittelt die Zeilenanzahl
@@ -572,7 +572,7 @@ public:
mbFollowFormatAllowed = false;
}
- SwTwips GetBaseOfstForFly( sal_Bool bIgnoreFlysAnchoredAtThisFrame ) const
+ SwTwips GetBaseOfstForFly( bool bIgnoreFlysAnchoredAtThisFrame ) const
{
return ( bIgnoreFlysAnchoredAtThisFrame ?
mnFlyAnchorOfst :
@@ -638,19 +638,19 @@ inline SwTwips SwTxtFrm::GetRightMargin() const
}
inline SwTwips SwTxtFrm::GrowTst( const SwTwips nGrow )
{
- return Grow( nGrow, sal_True );
+ return Grow( nGrow, true );
}
-inline sal_Bool SwTxtFrm::IsInside( const sal_Int32 nPos ) const
+inline bool SwTxtFrm::IsInside( const sal_Int32 nPos ) const
{
- sal_Bool bRet = sal_True;
+ bool bRet = true;
if( nPos < GetOfst() )
- bRet = sal_False;
+ bRet = false;
else
{
const SwTxtFrm *pFoll = GetFollow();
if( pFoll && nPos >= pFoll->GetOfst() )
- bRet = sal_False;
+ bRet = false;
}
return bRet;
}
@@ -692,35 +692,35 @@ inline void SwTxtFrm::SetOfst( const sal_Int32 nNewOfst )
inline void SwTxtFrm::SetRepaint() const
{
- ((SwTxtFrm*)this)->bRepaint = sal_True;
+ ((SwTxtFrm*)this)->bRepaint = true;
}
inline void SwTxtFrm::ResetRepaint() const
{
- ((SwTxtFrm*)this)->bRepaint = sal_False;
+ ((SwTxtFrm*)this)->bRepaint = false;
}
inline void SwTxtFrm::SetBlinkPor() const
{
- ((SwTxtFrm*)this)->bBlinkPor = sal_True;
+ ((SwTxtFrm*)this)->bBlinkPor = true;
}
inline void SwTxtFrm::ResetBlinkPor() const
{
- ((SwTxtFrm*)this)->bBlinkPor = sal_False;
+ ((SwTxtFrm*)this)->bBlinkPor = false;
}
#define SWAP_IF_SWAPPED( pFrm )\
- sal_Bool bUndoSwap = sal_False; \
+ bool bUndoSwap = false; \
if ( pFrm->IsVertical() && pFrm->IsSwapped() )\
{ \
- bUndoSwap = sal_True; \
+ bUndoSwap = true; \
((SwTxtFrm*)pFrm)->SwapWidthAndHeight(); \
}
#define SWAP_IF_NOT_SWAPPED( pFrm )\
- sal_Bool bUndoSwap = sal_False; \
+ bool bUndoSwap = false; \
if ( pFrm->IsVertical() && ! pFrm->IsSwapped() )\
{ \
- bUndoSwap = sal_True; \
+ bUndoSwap = true; \
((SwTxtFrm*)pFrm)->SwapWidthAndHeight(); \
}
@@ -733,9 +733,9 @@ inline void SwTxtFrm::ResetBlinkPor() const
class SwFrmSwapper
{
const SwTxtFrm* pFrm;
- sal_Bool bUndo;
+ bool bUndo;
public:
- SwFrmSwapper( const SwTxtFrm* pFrm, sal_Bool bSwapIfNotSwapped );
+ SwFrmSwapper( const SwTxtFrm* pFrm, bool bSwapIfNotSwapped );
~SwFrmSwapper();
};
@@ -746,7 +746,7 @@ class SwLayoutModeModifier
public:
SwLayoutModeModifier( const OutputDevice& rOutp );
~SwLayoutModeModifier();
- void Modify( sal_Bool bChgToRTL );
+ void Modify( bool bChgToRTL );
void SetAuto();
};
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index f15cbf14..8925e0d 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -83,8 +83,8 @@ SwFrmNotify::SwFrmNotify( SwFrm *pF ) :
{
if ( pF->IsTxtFrm() )
{
- mnFlyAnchorOfst = ((SwTxtFrm*)pF)->GetBaseOfstForFly( sal_True );
- mnFlyAnchorOfstNoWrap = ((SwTxtFrm*)pF)->GetBaseOfstForFly( sal_False );
+ mnFlyAnchorOfst = ((SwTxtFrm*)pF)->GetBaseOfstForFly( true );
+ mnFlyAnchorOfstNoWrap = ((SwTxtFrm*)pF)->GetBaseOfstForFly( false );
}
else
{
@@ -112,8 +112,8 @@ SwFrmNotify::~SwFrmNotify()
const bool bChgHeight =
(aFrm.*fnRect->fnGetHeight)()!=(pFrm->Frm().*fnRect->fnGetHeight)();
const bool bChgFlyBasePos = pFrm->IsTxtFrm() &&
- ( ( mnFlyAnchorOfst != ((SwTxtFrm*)pFrm)->GetBaseOfstForFly( sal_True ) ) ||
- ( mnFlyAnchorOfstNoWrap != ((SwTxtFrm*)pFrm)->GetBaseOfstForFly( sal_False ) ) );
+ ( ( mnFlyAnchorOfst != ((SwTxtFrm*)pFrm)->GetBaseOfstForFly( true ) ) ||
+ ( mnFlyAnchorOfstNoWrap != ((SwTxtFrm*)pFrm)->GetBaseOfstForFly( false ) ) );
if ( pFrm->IsFlowFrm() && !pFrm->IsInFtn() )
{
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index 6636666..1022b87 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -265,7 +265,7 @@ sal_Bool SwTxtFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos,
if( !pFrm->HasPara() )
return sal_False;
- SwFrmSwapper aSwapper( pFrm, sal_True );
+ SwFrmSwapper aSwapper( pFrm, true );
if ( bVert )
nMaxY = pFrm->SwitchVerticalToHorizontal( nMaxY );
@@ -367,10 +367,10 @@ sal_Bool SwTxtFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos,
* and is used by the auto-positioned frame.
*/
-sal_Bool SwTxtFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const
+bool SwTxtFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const
{
if( IsHiddenNow() )
- return sal_False;
+ return false;
const sal_Int32 nOffset = rPos.nContent.GetIndex();
SwTxtFrm* pFrm = &(const_cast<SwTxtFrm*>(this)->GetFrmAtOfst( nOffset ));
@@ -411,14 +411,14 @@ sal_Bool SwTxtFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const
aPnt2.Y() = nMaxY;
}
rOrig = SwRect( aPnt1, aPnt2 );
- return sal_True;
+ return true;
}
else
{
if( !pFrm->HasPara() )
- return sal_False;
+ return false;
- SwFrmSwapper aSwapper( pFrm, sal_True );
+ SwFrmSwapper aSwapper( pFrm, true );
if ( bVert )
nMaxY = pFrm->SwitchVerticalToHorizontal( nMaxY );
@@ -440,9 +440,9 @@ sal_Bool SwTxtFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const
if ( bVert )
pFrm->SwitchHorizontalToVertical( rOrig );
- return sal_True;
+ return true;
}
- return sal_False;
+ return false;
}
}
@@ -499,7 +499,7 @@ bool SwTxtFrm::GetTopOfLine( SwTwips& _onTopOfLine,
else
{
// assure that text frame is in a horizontal layout
- SwFrmSwapper aSwapper( pFrm, sal_True );
+ SwFrmSwapper aSwapper( pFrm, true );
// determine text line that contains the requested position
SwTxtSizeInfo aInf( pFrm );
SwTxtCursor aLine( pFrm, &aInf );
@@ -552,14 +552,14 @@ struct SwFillData
void SetOrient( const sal_Int16 eNew ){ pCMS->pFill->eOrient = eNew; }
};
-sal_Bool SwTxtFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint,
- const sal_Bool bChgFrm, SwCrsrMoveState* pCMS ) const
+bool SwTxtFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint,
+ const bool bChgFrm, SwCrsrMoveState* pCMS ) const
{
// _GetCrsrOfst is called by GetCrsrOfst and GetKeyCrsrOfst.
- // Never just a return sal_False.
+ // Never just a return false.
if( IsLocked() || IsHiddenNow() )
- return sal_False;
+ return false;
((SwTxtFrm*)this)->GetFormatted();
@@ -586,7 +586,7 @@ sal_Bool SwTxtFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint,
{
SwTwips nDiff = rPoint.X() - Frm().Left() - Prt().Left();
if( nDiff > 50 || nDiff < 0 )
- ((SwCrsrMoveState*)pCMS)->bPosCorr = sal_True;
+ ((SwCrsrMoveState*)pCMS)->bPosCorr = true;
}
}
else
@@ -665,7 +665,7 @@ sal_Bool SwTxtFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint,
(Point&)rPoint = aOldPoint;
delete pFillData;
- return sal_True;
+ return true;
}
/*************************************************************************
@@ -787,8 +787,8 @@ public:
inline void SetRight( const sal_Bool bNew ) { bRight = bNew; }
};
-sal_Bool SwTxtFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset,
- sal_Bool bSetInReadOnly ) const
+bool SwTxtFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset,
+ bool bSetInReadOnly ) const
{
// Set the RightMargin if needed
SwSetToRightMargin aSet;
@@ -865,7 +865,7 @@ sal_Bool SwTxtFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset,
#endif
// The node should not be changed
sal_Int32 nTmpOfst = aLine.GetCrsrOfst( pPam->GetPoint(),
- aCharBox.Pos(), sal_False );
+ aCharBox.Pos(), false );
#if OSL_DEBUG_LEVEL > 0
OSL_ENSURE( nOldNode == pPam->GetPoint()->nNode.GetIndex(),
"SwTxtFrm::UnitUp: illegal node change" );
@@ -875,11 +875,11 @@ sal_Bool SwTxtFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset,
if( nTmpOfst >= nStart && nStart && !bSecondOfDouble )
{
nTmpOfst = nStart;
- aSet.SetRight( sal_True );
+ aSet.SetRight( true );
}
pPam->GetPoint()->nContent =
SwIndex( ((SwTxtFrm*)this)->GetTxtNode(), nTmpOfst );
- return sal_True;
+ return true;
}
if ( IsFollow() )
@@ -901,7 +901,7 @@ sal_Bool SwTxtFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset,
if( pTmpPrev )
{
SwViewShell *pSh = getRootFrm()->GetCurrShell();
- sal_Bool bProtectedAllowed = pSh && pSh->GetViewOptions()->IsCursorInProtectedArea();
+ const bool bProtectedAllowed = pSh && pSh->GetViewOptions()->IsCursorInProtectedArea();
const SwTxtFrm *pPrevPrev = pTmpPrev;
// We skip protected frames and frames without content here
while( pPrevPrev && ( pPrevPrev->GetOfst() == nOffs ||
@@ -930,7 +930,7 @@ sal_Bool SwTxtFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset,
// bLeft: whether the break iterator has to add or subtract from the
// current position
static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nIdx,
- sal_Int32& nPos, sal_Bool& bRight,
+ sal_Int32& nPos, bool& bRight,
sal_uInt8& nCrsrLevel, sal_uInt8 nDefaultDir )
{
const SwLinePortion* pPor = rCurrLine.GetFirstPortion();
@@ -985,7 +985,7 @@ static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nI
{
const SwLineLayout& rLine = ((SwMultiPortion*)pPor)->GetRoot();
sal_Int32 nTmpPos = nPos - nIdx;
- sal_Bool bTmpForward = ! bRight;
+ bool bTmpForward = ! bRight;
sal_uInt8 nTmpCrsrLevel = nCrsrLevel;
lcl_VisualMoveRecursion( rLine, 0, nTmpPos, bTmpForward,
nTmpCrsrLevel, nDefaultDir + 1 );
@@ -998,7 +998,7 @@ static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nI
// go forward
else
{
- bRight = sal_True;
+ bRight = true;
nCrsrLevel = nDefaultDir;
}
@@ -1044,7 +1044,7 @@ static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nI
{
const SwLineLayout& rLine = ((SwMultiPortion*)pPor)->GetRoot();
sal_Int32 nTmpPos = nPos - nIdx;
- sal_Bool bTmpForward = ! bRight;
+ bool bTmpForward = ! bRight;
sal_uInt8 nTmpCrsrLevel = nCrsrLevel;
lcl_VisualMoveRecursion( rLine, 0, nTmpPos, bTmpForward,
nTmpCrsrLevel, nDefaultDir + 1 );
@@ -1068,14 +1068,14 @@ static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nI
// go backward
else
{
- bRight = sal_False;
+ bRight = false;
nCrsrLevel = nDefaultDir;
}
}
}
void SwTxtFrm::PrepareVisualMove( sal_Int32& nPos, sal_uInt8& nCrsrLevel,
- sal_Bool& bForward, sal_Bool bInsertCrsr )
+ bool& bForward, bool bInsertCrsr )
{
if( IsEmpty() || IsHiddenNow() )
return;
@@ -1182,8 +1182,8 @@ void SwTxtFrm::PrepareVisualMove( sal_Int32& nPos, sal_uInt8& nCrsrLevel,
* SwTxtFrm::_UnitDown()
*************************************************************************/
-sal_Bool SwTxtFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset,
- sal_Bool bSetInReadOnly ) const
+bool SwTxtFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset,
+ bool bSetInReadOnly ) const
{
if ( IsInTab() &&
@@ -1234,7 +1234,7 @@ sal_Bool SwTxtFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset,
aLine.NextLine();
sal_Int32 nTmpOfst = aLine.GetCrsrOfst( pPam->GetPoint(),
- aCharBox.Pos(), sal_False );
+ aCharBox.Pos(), false );
#if OSL_DEBUG_LEVEL > 0
OSL_ENSURE( nOldNode == pPam->GetPoint()->nNode.GetIndex(),
"SwTxtFrm::UnitDown: illegal node change" );
@@ -1249,7 +1249,7 @@ sal_Bool SwTxtFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset,
if ( IsVertical() )
((SwTxtFrm*)this)->SwapWidthAndHeight();
- return sal_True;
+ return true;
}
if( 0 != ( pTmpFollow = GetFollow() ) )
{ // Skip protected follows
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 01ff28e..5f215ed 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -148,7 +148,7 @@ void SwTxtFrm::ValidateBodyFrm()
UNDO_SWAP( this )
}
-sal_Bool SwTxtFrm::_GetDropRect( SwRect &rRect ) const
+bool SwTxtFrm::_GetDropRect( SwRect &rRect ) const
{
SWAP_IF_NOT_SWAPPED( this )
@@ -168,12 +168,12 @@ sal_Bool SwTxtFrm::_GetDropRect( SwRect &rRect ) const
if ( IsVertical() )
SwitchHorizontalToVertical( rRect );
UNDO_SWAP( this )
- return sal_True;
+ return true;
}
UNDO_SWAP( this )
- return sal_False;
+ return false;
}
const SwBodyFrm *SwTxtFrm::FindBodyFrm() const
@@ -188,7 +188,7 @@ const SwBodyFrm *SwTxtFrm::FindBodyFrm() const
return 0;
}
-sal_Bool SwTxtFrm::CalcFollow( const sal_Int32 nTxtOfst )
+bool SwTxtFrm::CalcFollow( const sal_Int32 nTxtOfst )
{
SWAP_IF_SWAPPED( this )
@@ -213,7 +213,7 @@ sal_Bool SwTxtFrm::CalcFollow( const sal_Int32 nTxtOfst )
SwTwips nMyPos = (Frm().*fnRect->fnGetTop)();
const SwPageFrm *pPage = 0;
- sal_Bool bOldInvaCntnt = sal_True;
+ bool bOldInvaCntnt = true;
if ( !IsInFly() && GetNext() )
{
pPage = FindPageFrm();
@@ -235,7 +235,7 @@ sal_Bool SwTxtFrm::CalcFollow( const sal_Int32 nTxtOfst )
}
// The footnote area must not get larger
- SwSaveFtnHeight aSave( FindFtnBossFrm( sal_True ), LONG_MAX );
+ SwSaveFtnHeight aSave( FindFtnBossFrm( true ), LONG_MAX );
pMyFollow->CalcFtnFlag();
if ( !pMyFollow->GetNext() && !pMyFollow->HasFtn() )
@@ -343,16 +343,16 @@ sal_Bool SwTxtFrm::CalcFollow( const sal_Int32 nTxtOfst )
Frm().Top() - nMyPos ) )
{
UNDO_SWAP( this )
- return sal_True;
+ return true;
}
}
UNDO_SWAP( this )
- return sal_False;
+ return false;
}
-void SwTxtFrm::AdjustFrm( const SwTwips nChgHght, sal_Bool bHasToFit )
+void SwTxtFrm::AdjustFrm( const SwTwips nChgHght, bool bHasToFit )
{
if( IsUndersized() )
{
@@ -560,7 +560,7 @@ void SwTxtFrm::_AdjustFollow( SwTxtFormatter &rLine,
const sal_Int32 nOffset, const sal_Int32 nEnd,
const sal_uInt8 nMode )
{
- SwFrmSwapper aSwapper( this, sal_False );
+ SwFrmSwapper aSwapper( this, false );
// We got the rest of the text mass: Delete all Follows
// DummyPortions() are a special case.
@@ -645,7 +645,7 @@ SwCntntFrm *SwTxtFrm::JoinFrm()
pFtnBoss = pFoll->FindFtnBossFrm( sal_True );
pFtnBoss->ChangeFtnRef( pFoll, (SwTxtFtn*)pHt, this );
}
- SetFtn( sal_True );
+ SetFtn( true );
}
}
}
@@ -661,7 +661,7 @@ SwCntntFrm *SwTxtFrm::JoinFrm()
#endif
pFoll->MoveFlyInCnt( this, nStart, COMPLETE_STRING );
- pFoll->SetFtn( sal_False );
+ pFoll->SetFtn( false );
// #i27138#
// notify accessibility paragraphs objects about changed CONTENT_FLOWS_FROM/_TO relation.
// Relation CONTENT_FLOWS_FROM for current next paragraph will change
@@ -738,7 +738,7 @@ SwCntntFrm *SwTxtFrm::SplitFrm( const sal_Int32 nTxtPos )
pFtnBoss = FindFtnBossFrm( sal_True );
pFtnBoss->ChangeFtnRef( this, (SwTxtFtn*)pHt, pNew );
}
- pNew->SetFtn( sal_True );
+ pNew->SetFtn( true );
}
}
}
@@ -779,21 +779,21 @@ void SwTxtFrm::_SetOfst( const sal_Int32 nNewOfst )
InvalidateSize();
}
-sal_Bool SwTxtFrm::CalcPreps()
+bool SwTxtFrm::CalcPreps()
{
OSL_ENSURE( ! IsVertical() || ! IsSwapped(), "SwTxtFrm::CalcPreps with swapped frame" );
SWRECTFN( this );
SwParaPortion *pPara = GetPara();
if ( !pPara )
- return sal_False;
+ return false;
const bool bPrep = pPara->IsPrep();
const bool bPrepWidows = pPara->IsPrepWidows();
const bool bPrepAdjust = pPara->IsPrepAdjust();
const bool bPrepMustFit = pPara->IsPrepMustFit();
ResetPreps();
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if( bPrep && !pPara->GetReformat()->Len() )
{
// PREP_WIDOWS means that the orphans rule got activated in the Follow.
@@ -803,7 +803,7 @@ sal_Bool SwTxtFrm::CalcPreps()
if( !GetFollow() )
{
OSL_ENSURE( GetFollow(), "+SwTxtFrm::CalcPreps: no credits" );
- return sal_False;
+ return false;
}
// We need to prepare for two cases:
@@ -817,7 +817,7 @@ sal_Bool SwTxtFrm::CalcPreps()
{
if( bPrepMustFit )
{
- GetFollow()->SetJustWidow( sal_True );
+ GetFollow()->SetJustWidow( true );
GetFollow()->Prepare( PREP_CLEAR );
}
else if ( bVert )
@@ -825,7 +825,7 @@ sal_Bool SwTxtFrm::CalcPreps()
Frm().Width( Frm().Width() + Frm().Left() );
Prt().Width( Prt().Width() + Frm().Left() );
Frm().Left( 0 );
- SetWidow( sal_True );
+ SetWidow( true );
}
else
{
@@ -833,7 +833,7 @@ sal_Bool SwTxtFrm::CalcPreps()
SwTwips nDiff = nTmp - Frm().Height();
Frm().Height( nTmp );
Prt().Height( Prt().Height() + nDiff );
- SetWidow( sal_True );
+ SetWidow( true );
}
}
else
@@ -843,7 +843,7 @@ sal_Bool SwTxtFrm::CalcPreps()
nChgHeight = (Prt().*fnRect->fnGetHeight)() - nChgHeight;
- GetFollow()->SetJustWidow( sal_True );
+ GetFollow()->SetJustWidow( true );
GetFollow()->Prepare( PREP_CLEAR );
Shrink( nChgHeight );
SwRect &rRepaint = *(pPara->GetRepaint());
@@ -860,9 +860,8 @@ sal_Bool SwTxtFrm::CalcPreps()
if( 0 >= rRepaint.Width() )
rRepaint.Width(1);
}
- bRet = sal_True;
+ bRet = true;
}
-
else if ( bPrepAdjust )
{
if ( HasFtn() )
@@ -874,7 +873,7 @@ sal_Bool SwTxtFrm::CalcPreps()
SwTxtLineAccess aAccess( this );
aAccess.GetPara()->SetPrepMustFit();
}
- return sal_False;
+ return false;
}
}
@@ -895,7 +894,7 @@ sal_Bool SwTxtFrm::CalcPreps()
// that the lines protruding at the bottom get indeed
// truncated
bool bBreak = aFrmBreak.IsBreakNowWidAndOrp( aLine );
- bRet = sal_True;
+ bRet = true;
while( !bBreak && aLine.Next() )
{
bBreak = aFrmBreak.IsBreakNowWidAndOrp( aLine );
@@ -926,7 +925,7 @@ sal_Bool SwTxtFrm::CalcPreps()
const SwCharRange aFollowRg( GetFollow()->GetOfst(), 1 );
*(pPara->GetReformat()) += aFollowRg;
// We should continue!
- bRet = sal_False;
+ bRet = false;
}
}
@@ -975,7 +974,7 @@ sal_Bool SwTxtFrm::CalcPreps()
void SwTxtFrm::FormatAdjust( SwTxtFormatter &rLine,
WidowsAndOrphans &rFrmBreak,
const sal_Int32 nStrLen,
- const sal_Bool bDummy )
+ const bool bDummy )
{
SWAP_IF_NOT_SWAPPED( this )
@@ -1141,7 +1140,7 @@ void SwTxtFrm::FormatAdjust( SwTxtFormatter &rLine,
* Else, wo don't know whether we can limit the repaint or not.
*************************************************************************/
-sal_Bool SwTxtFrm::FormatLine( SwTxtFormatter &rLine, const sal_Bool bPrev )
+bool SwTxtFrm::FormatLine( SwTxtFormatter &rLine, const bool bPrev )
{
OSL_ENSURE( ! IsVertical() || IsSwapped(),
"SwTxtFrm::FormatLine( rLine, bPrev) with unswapped frame" );
@@ -1254,31 +1253,31 @@ sal_Bool SwTxtFrm::FormatLine( SwTxtFormatter &rLine, const sal_Bool bPrev )
// Stop!
if( rLine.IsStop() )
- return sal_False;
+ return false;
// Absolutely another line
if( rLine.IsNewLine() )
- return sal_True;
+ return true;
// Until the String's end?
if (nNewStart >= GetTxtNode()->GetTxt().getLength())
- return sal_False;
+ return false;
if( rLine.GetInfo().IsShift() )
- return sal_True;
+ return true;
// Reached the Reformat's end?
const sal_Int32 nEnd = pPara->GetReformat()->Start() +
pPara->GetReformat()->Len();
if( nNewStart <= nEnd )
- return sal_True;
+ return true;
return 0 != *(pPara->GetDelta());
}
void SwTxtFrm::_Format( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf,
- const sal_Bool bAdjust )
+ const bool bAdjust )
{
OSL_ENSURE( ! IsVertical() || IsSwapped(),"SwTxtFrm::_Format with unswapped frame" );
@@ -1377,7 +1376,7 @@ void SwTxtFrm::_Format( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf,
// The whole thing looks weird, but we need to make sure that
// rLine stops at the last non-fitting line when calling IsBreakNow.
bool bFirst = true;
- sal_Bool bFormat = sal_True;
+ bool bFormat = true;
// The CharToLine() can also get us into the danger zone.
// In that case we need to walk back until rLine is set
@@ -1417,10 +1416,10 @@ void SwTxtFrm::_Format( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf,
Jump(End/Mid)Hyph: if a cutoff point disappears
*/
- sal_Bool bJumpEndHyph = sal_False,
- bWatchEndHyph = sal_False,
- bJumpMidHyph = sal_False,
- bWatchMidHyph = sal_False;
+ bool bJumpEndHyph = false;
+ bool bWatchEndHyph = false;
+ bool bJumpMidHyph = false;
+ bool bWatchMidHyph = false;
const SwAttrSet& rAttrSet = GetTxtNode()->GetSwAttrSet();
bool bMaxHyph = ( 0 !=
@@ -1447,7 +1446,7 @@ void SwTxtFrm::_Format( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf,
if( pRest )
rInf.SetRest( pRest );
else
- SetFieldFollow( sal_False );
+ SetFieldFollow( false );
}
/* Ad cancel criterion:
@@ -1486,7 +1485,7 @@ void SwTxtFrm::_Format( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf,
}
rLine.Insert( new SwLineLayout() );
rLine.Next();
- bFormat = sal_True;
+ bFormat = true;
}
}
if ( !bFormat && bMaxHyph &&
@@ -1500,8 +1499,8 @@ void SwTxtFrm::_Format( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf,
else
{
bFormat = bJumpEndHyph;
- bWatchEndHyph = sal_False;
- bJumpEndHyph = sal_False;
+ bWatchEndHyph = false;
+ bJumpEndHyph = false;
}
if ( rLine.GetCurr()->IsMidHyph() )
{
@@ -1510,9 +1509,9 @@ void SwTxtFrm::_Format( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf,
}
else
{
- bFormat = bFormat || bJumpMidHyph;
- bWatchMidHyph = sal_False;
- bJumpMidHyph = sal_False;
+ bFormat |= bJumpMidHyph;
+ bWatchMidHyph = false;
+ bJumpMidHyph = false;
}
}
if( bFormat )
@@ -1653,7 +1652,7 @@ void SwTxtFrm::FormatOnceMore( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
rLine.CalcDropHeight( 1 );
SwCharRange aTmpRange( 0, rInf.GetTxt().getLength() );
*(pPara->GetReformat()) = aTmpRange;
- _Format( rLine, rInf, sal_True );
+ _Format( rLine, rInf, true );
// We paint everything ...
SetCompletePaint();
}
@@ -1765,7 +1764,7 @@ void SwTxtFrm::Format( const SwBorderAttrs * )
if ( nStrLen || !FormatEmpty() )
{
- SetEmpty( sal_False );
+ SetEmpty( false );
// In order to not get confused by nested Formats
FormatLevel aLevel;
if( 12 == aLevel.GetLevel() )
@@ -1814,7 +1813,7 @@ void SwTxtFrm::Format( const SwBorderAttrs * )
aAccess.GetPara()->SetPrep();
CalcPreps();
}
- SetWidow( sal_False );
+ SetWidow( false );
}
else if( bSetOfst && IsFollow() )
{
@@ -1834,7 +1833,7 @@ void SwTxtFrm::Format( const SwBorderAttrs * )
if ( bSetOfst )
_SetOfst( 0 );
- const sal_Bool bOrphan = IsWidow();
+ const bool bOrphan = IsWidow();
const SwFtnBossFrm* pFtnBoss = HasFtn() ? FindFtnBossFrm() : 0;
SwTwips nFtnHeight = 0;
if( pFtnBoss )
@@ -1862,7 +1861,7 @@ void SwTxtFrm::Format( const SwBorderAttrs * )
if( bOrphan )
{
ValidateFrm();
- SetWidow( sal_False );
+ SetWidow( false );
}
}
if( IsEmptyMaster() )
@@ -1902,7 +1901,7 @@ void SwTxtFrm::Format( const SwBorderAttrs * )
* force the quick formatting in the situation of issue i29062.
*************************************************************************/
-sal_Bool SwTxtFrm::FormatQuick( bool bForceQuickFormat )
+bool SwTxtFrm::FormatQuick( bool bForceQuickFormat )
{
OSL_ENSURE( ! IsVertical() || ! IsSwapped(),
"SwTxtFrm::FormatQuick with swapped frame" );
@@ -1921,31 +1920,31 @@ sal_Bool SwTxtFrm::FormatQuick( bool bForceQuickFormat )
#endif
if( IsEmpty() && FormatEmpty() )
- return sal_True;
+ return true;
// We're very picky:
if( HasPara() || IsWidow() || IsLocked()
|| !GetValidSizeFlag() ||
( ( IsVertical() ? Prt().Width() : Prt().Height() ) && IsHiddenNow() ) )
- return sal_False;
+ return false;
SwTxtLineAccess aAccess( this );
SwParaPortion *pPara = aAccess.GetPara();
if( !pPara )
- return sal_False;
+ return false;
- SwFrmSwapper aSwapper( this, sal_True );
+ SwFrmSwapper aSwapper( this, true );
SwTxtFrmLocker aLock(this);
SwTxtFormatInfo aInf( this, false, true );
if( 0 != aInf.MaxHyph() ) // Respect MaxHyphen!
- return sal_False;
+ return false;
SwTxtFormatter aLine( this, &aInf );
// DropCaps are too complicated ...
if( aLine.GetDropFmt() )
- return sal_False;
+ return false;
sal_Int32 nStart = GetOfst();
const sal_Int32 nEnd = GetFollow()
@@ -1968,11 +1967,11 @@ sal_Bool SwTxtFrm::FormatQuick( bool bForceQuickFormat )
// Attention: This situation can occur due to FormatLevel==12. Don't panic!
const sal_Int32 nStrt = GetOfst();
_InvalidateRange( SwCharRange( nStrt, nEnd - nStrt) );
- return sal_False;
+ return false;
}
if (m_pFollow && nStart != (static_cast<SwTxtFrm*>(m_pFollow))->GetOfst())
- return sal_False; // can be caused by e.g. Orphans
+ return false; // can be caused by e.g. Orphans
// We made it!
@@ -1984,7 +1983,7 @@ sal_Bool SwTxtFrm::FormatQuick( bool bForceQuickFormat )
*(pPara->GetReformat()) = SwCharRange();
*(pPara->GetDelta()) = 0;
- return sal_True;
+ return true;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/frminf.cxx b/sw/source/core/text/frminf.cxx
index 704b649..c3eda66 100644
--- a/sw/source/core/text/frminf.cxx
+++ b/sw/source/core/text/frminf.cxx
@@ -144,7 +144,7 @@ SwTwips SwTxtFrmInfo::GetLineStart() const
SwTwips SwTxtFrmInfo::GetCharPos( sal_Int32 nChar, sal_Bool bCenter ) const
{
SWRECTFN( pFrm )
- SwFrmSwapper aSwapper( pFrm, sal_True );
+ SwFrmSwapper aSwapper( pFrm, true );
SwTxtSizeInfo aInf( (SwTxtFrm*)pFrm );
SwTxtCursor aLine( (SwTxtFrm*)pFrm, &aInf );
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index eef726b..bf4dc37 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -314,7 +314,7 @@ void SwTxtFrm::PaintExtraData( const SwRect &rRect ) const
SwitchVerticalToHorizontal( (SwRect&)rRect );
SwLayoutModeModifier aLayoutModeModifier( *pSh->GetOut() );
- aLayoutModeModifier.Modify( sal_False );
+ aLayoutModeModifier.Modify( false );
// #i16816# tagged pdf support
SwTaggedPDFHelper aTaggedPDFHelper( 0, 0, 0, *pSh->GetOut() );
@@ -330,7 +330,7 @@ void SwTxtFrm::PaintExtraData( const SwRect &rRect ) const
SwTxtPaintInfo aInf( (SwTxtFrm*)this, rRect );
- aLayoutModeModifier.Modify( sal_False );
+ aLayoutModeModifier.Modify( false );
SwTxtPainter aLine( (SwTxtFrm*)this, &aInf );
bool bNoDummy = !aLine.GetNext(); // Only one empty line!
@@ -453,7 +453,7 @@ SwRect SwTxtFrm::Paint()
return aRet;
}
-sal_Bool SwTxtFrm::PaintEmpty( const SwRect &rRect, sal_Bool bCheck ) const
+bool SwTxtFrm::PaintEmpty( const SwRect &rRect, bool bCheck ) const
{
SwViewShell *pSh = getRootFrm()->GetCurrShell();
if( pSh && ( pSh->GetViewOptions()->IsParagraph() || bInitFont ) )
@@ -463,7 +463,7 @@ sal_Bool SwTxtFrm::PaintEmpty( const SwRect &rRect, sal_Bool bCheck ) const
aTxtFly.SetTopRule();
SwRect aRect;
if( bCheck && aTxtFly.IsOn() && aTxtFly.IsAnyObj( aRect ) )
- return sal_False;
+ return false;
else if( pSh->GetWin() )
{
SwFont *pFnt;
@@ -503,7 +503,7 @@ sal_Bool SwTxtFrm::PaintEmpty( const SwRect &rRect, sal_Bool bCheck ) const
pFnt->SetCharSet( RTL_TEXTENCODING_SYMBOL, SW_LATIN );
}
pFnt->SetVertical( 0, IsVertical() );
- SwFrmSwapper aSwapper( this, sal_True );
+ SwFrmSwapper aSwapper( this, true );
SwLayoutModeModifier aLayoutModeModifier( *pSh->GetOut() );
aLayoutModeModifier.Modify( IsRightToLeft() );
@@ -558,7 +558,7 @@ sal_Bool SwTxtFrm::PaintEmpty( const SwRect &rRect, sal_Bool bCheck ) const
aDrawInf.SetSmartTags( NULL ); // SMARTTAGS
aDrawInf.SetFrm( this );
aDrawInf.SetFont( pFnt );
- aDrawInf.SetSnapToGrid( sal_False );
+ aDrawInf.SetSnapToGrid( false );
pFnt->SetColor(NON_PRINTING_CHARACTER_COLOR);
pFnt->_DrawText( aDrawInf );
@@ -566,12 +566,12 @@ sal_Bool SwTxtFrm::PaintEmpty( const SwRect &rRect, sal_Bool bCheck ) const
delete pClip;
}
delete pFnt;
- return sal_True;
+ return true;
}
}
else
- return sal_True;
- return sal_False;
+ return true;
+ return false;
}
void SwTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
@@ -587,7 +587,7 @@ void SwTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
Frm_Info aFrmInfo( *this );
SwTaggedPDFHelper aTaggedPDFHelperParagraph( 0, &aFrmInfo, 0, *pSh->GetOut() );
- if( !IsEmpty() || !PaintEmpty( rRect, sal_True ) )
+ if( !IsEmpty() || !PaintEmpty( rRect, true ) )
{
#if OSL_DEBUG_LEVEL > 1
const SwTwips nDbgY = Frm().Top();
@@ -607,7 +607,7 @@ void SwTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
((SwTxtFrm*)this)->GetFormatted( true );
if( IsEmpty() )
{
- PaintEmpty( rRect, sal_False );
+ PaintEmpty( rRect, false );
return;
}
if( !HasPara() )
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index 643636f..8c1bc56 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -291,7 +291,7 @@ SwTwips SwTxtFrm::EmptyHeight() const
* SwTxtFrm::FormatEmpty()
*************************************************************************/
-sal_Bool SwTxtFrm::FormatEmpty()
+bool SwTxtFrm::FormatEmpty()
{
OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTxtFrm::FormatEmpty with swapped frame" );
@@ -301,18 +301,18 @@ sal_Bool SwTxtFrm::FormatEmpty()
0 != GetTxtNode()->GetNumRule() ||
GetTxtNode()->HasHiddenCharAttribute( true ) ||
IsInFtn() || ( HasPara() && GetPara()->IsPrepMustFit() ) )
- return sal_False;
+ return false;
const SwAttrSet& aSet = GetTxtNode()->GetSwAttrSet();
const SvxAdjust nAdjust = aSet.GetAdjust().GetAdjust();
if( !bCollapse && ( ( ( ! IsRightToLeft() && ( SVX_ADJUST_LEFT != nAdjust ) ) ||
( IsRightToLeft() && ( SVX_ADJUST_RIGHT != nAdjust ) ) ) ||
aSet.GetRegister().GetValue() ) )
- return sal_False;
+ return false;
const SvxLineSpacingItem &rSpacing = aSet.GetLineSpacing();
if( !bCollapse && ( SVX_LINE_SPACE_MIN == rSpacing.GetLineSpaceRule() ||
SVX_LINE_SPACE_FIX == rSpacing.GetLineSpaceRule() ||
aSet.GetLRSpace().IsAutoFirst() ) )
- return sal_False;
+ return false;
else
{
SwTxtFly aTxtFly( this );
@@ -320,7 +320,7 @@ sal_Bool SwTxtFrm::FormatEmpty()
bool bFirstFlyCheck = 0 != Prt().Height();
if ( !bCollapse && bFirstFlyCheck &&
aTxtFly.IsOn() && aTxtFly.IsAnyObj( aRect ) )
- return sal_False;
+ return false;
else
{
SwTwips nHeight = EmptyHeight();
@@ -337,7 +337,7 @@ sal_Bool SwTxtFrm::FormatEmpty()
const SwTwips nChg = nHeight - (Prt().*fnRect->fnGetHeight)();
if( !nChg )
- SetUndersized( sal_False );
+ SetUndersized( false );
AdjustFrm( nChg );
if( HasBlinkPor() )
@@ -348,23 +348,23 @@ sal_Bool SwTxtFrm::FormatEmpty()
SetCacheIdx( MSHRT_MAX );
if( !IsEmpty() )
{
- SetEmpty( sal_True );
+ SetEmpty( true );
SetCompletePaint();
}
if( !bCollapse && !bFirstFlyCheck &&
aTxtFly.IsOn() && aTxtFly.IsAnyObj( aRect ) )
- return sal_False;
+ return false;
// #i35635# - call method <HideAndShowObjects()>
// to assure that objects anchored at the empty paragraph are
// correctly visible resp. invisible.
HideAndShowObjects();
- return sal_True;
+ return true;
}
}
}
-sal_Bool SwTxtFrm::FillRegister( SwTwips& rRegStart, KSHORT& rRegDiff )
+bool SwTxtFrm::FillRegister( SwTwips& rRegStart, KSHORT& rRegDiff )
{
const SwFrm *pFrm = this;
rRegDiff = 0;
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index a03b00f..e2b6abe 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -245,14 +245,14 @@ long SwTxtFrm::SwitchVerticalToHorizontal( long nLimit ) const
return aTmp.Y();
}
-SwFrmSwapper::SwFrmSwapper( const SwTxtFrm* pTxtFrm, sal_Bool bSwapIfNotSwapped )
- : pFrm( pTxtFrm ), bUndo( sal_False )
+SwFrmSwapper::SwFrmSwapper( const SwTxtFrm* pTxtFrm, bool bSwapIfNotSwapped )
+ : pFrm( pTxtFrm ), bUndo( false )
{
if ( pFrm->IsVertical() &&
( ( bSwapIfNotSwapped && ! pFrm->IsSwapped() ) ||
( ! bSwapIfNotSwapped && pFrm->IsSwapped() ) ) )
{
- bUndo = sal_True;
+ bUndo = true;
((SwTxtFrm*)pFrm)->SwapWidthAndHeight();
}
}
@@ -295,7 +295,7 @@ SwLayoutModeModifier::~SwLayoutModeModifier()
((OutputDevice&)rOut).SetLayoutMode( nOldLayoutMode );
}
-void SwLayoutModeModifier::Modify( sal_Bool bChgToRTL )
+void SwLayoutModeModifier::Modify( bool bChgToRTL )
{
((OutputDevice&)rOut).SetLayoutMode( bChgToRTL ?
TEXT_LAYOUT_BIDI_STRONG | TEXT_LAYOUT_BIDI_RTL :
@@ -405,15 +405,15 @@ void SwTxtFrm::ResetPreps()
/*************************************************************************
* SwTxtFrm::IsHiddenNow()
*************************************************************************/
-sal_Bool SwTxtFrm::IsHiddenNow() const
+bool SwTxtFrm::IsHiddenNow() const
{
- SwFrmSwapper aSwapper( this, sal_True );
+ SwFrmSwapper aSwapper( this, true );
if( !Frm().Width() && IsValid() && GetUpper()->IsValid() )
// invalid when stack overflows (StackHack)!
{
// OSL_FAIL( "SwTxtFrm::IsHiddenNow: thin frame" );
- return sal_True;
+ return true;
}
const bool bHiddenCharsHidePara = GetTxtNode()->HasHiddenCharAttribute( true );
@@ -429,11 +429,11 @@ sal_Bool SwTxtFrm::IsHiddenNow() const
( bHiddenCharsHidePara &&
!pVsh->GetViewOptions()->IsShowHiddenChar() ) )
{
- return sal_True;
+ return true;
}
}
- return sal_False;
+ return false;
}
@@ -671,19 +671,19 @@ sal_Int32 SwTxtFrm::FindBrk( const OUString &rTxt,
* SwTxtFrm::IsIdxInside()
*************************************************************************/
-sal_Bool SwTxtFrm::IsIdxInside( const sal_Int32 nPos, const sal_Int32 nLen ) const
+bool SwTxtFrm::IsIdxInside( const sal_Int32 nPos, const sal_Int32 nLen ) const
{
if( nLen != COMPLETE_STRING && GetOfst() > nPos + nLen ) // the range preceded us
- return sal_False;
+ return false;
if( !GetFollow() ) // the range doesn't precede us,
- return sal_True; // nobody follows us.
+ return true; // nobody follows us.
const sal_Int32 nMax = GetFollow()->GetOfst();
// either the range overlap or our text has been deleted
if( nMax > nPos || nMax > GetTxt().getLength() )
- return sal_True;
+ return true;
// changes made in the first line of a follow can modify the master
const SwParaPortion* pPara = GetFollow()->GetPara();
@@ -710,7 +710,7 @@ void SwTxtFrm::_InvalidateRange( const SwCharRange &aRange, const long nD)
return;
}
- SetWidow( sal_False );
+ SetWidow( false );
SwParaPortion *pPara = GetPara();
bool bInv = false;
@@ -1367,7 +1367,7 @@ bool SwTxtFrm::GetInfo( SfxPoolItem &rHnt ) const
* SwTxtFrm::PrepWidows()
*************************************************************************/
-void SwTxtFrm::PrepWidows( const MSHORT nNeed, sal_Bool bNotify )
+void SwTxtFrm::PrepWidows( const MSHORT nNeed, bool bNotify )
{
OSL_ENSURE(GetFollow() && nNeed, "+SwTxtFrm::Prepare: lost all friends");
@@ -1409,7 +1409,7 @@ void SwTxtFrm::PrepWidows( const MSHORT nNeed, sal_Bool bNotify )
GetFollow()->SetOfst( aLine.GetEnd() );
aLine.TruncLines( true );
if( pPara->IsFollowField() )
- GetFollow()->SetFieldFollow( sal_True );
+ GetFollow()->SetFieldFollow( true );
}
}
if ( bNotify )
@@ -1451,7 +1451,7 @@ static bool lcl_ErgoVadis( SwTxtFrm* pFrm, sal_Int32 &rPos, const PrepareHint eP
void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
sal_Bool bNotify )
{
- SwFrmSwapper aSwapper( this, sal_False );
+ SwFrmSwapper aSwapper( this, false );
#if OSL_DEBUG_LEVEL > 1
const SwTwips nDbgY = Frm().Top();
@@ -1959,7 +1959,7 @@ sal_Bool SwTxtFrm::WouldFit( SwTwips &rMaxHeight, sal_Bool &bSplit, sal_Bool bTs
( 0 == Frm().Left() ) :
( LONG_MAX - 20000 < Frm().Bottom() ) ) )
{
- SetWidow(sal_False);
+ SetWidow(false);
if ( GetFollow() )
{
// Wenn wir hier durch eine Widow-Anforderung unseres Follows gelandet
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index d0327e8..fe9149a 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -59,7 +59,7 @@ using namespace ::com::sun::star;
* _IsFtnNumFrm()
*************************************************************************/
-sal_Bool SwTxtFrm::_IsFtnNumFrm() const
+bool SwTxtFrm::_IsFtnNumFrm() const
{
const SwFtnFrm* pFtn = FindFtnFrm()->GetMaster();
while( pFtn && !pFtn->ContainsCntnt() )
@@ -97,7 +97,7 @@ void SwTxtFrm::CalcFtnFlag( sal_Int32 nStop )//For testing the SplitFrm
void SwTxtFrm::CalcFtnFlag()
#endif
{
- bFtn = sal_False;
+ bFtn = false;
const SwpHints *pHints = GetTxtNode()->GetpSwpHints();
if( !pHints )
@@ -122,7 +122,7 @@ void SwTxtFrm::CalcFtnFlag()
break;
if( GetOfst() <= nIdx )
{
- bFtn = sal_True;
+ bFtn = true;
break;
}
}
@@ -133,10 +133,10 @@ void SwTxtFrm::CalcFtnFlag()
* CalcPrepFtnAdjust()
*************************************************************************/
-sal_Bool SwTxtFrm::CalcPrepFtnAdjust()
+bool SwTxtFrm::CalcPrepFtnAdjust()
{
OSL_ENSURE( HasFtn(), "Wer ruft mich da?" );
- SwFtnBossFrm *pBoss = FindFtnBossFrm( sal_True );
+ SwFtnBossFrm *pBoss = FindFtnBossFrm( true );
const SwFtnFrm *pFtn = pBoss->FindFirstFtn( this );
if( pFtn && FTNPOS_CHAPTER != GetNode()->GetDoc()->GetFtnInfo().ePos &&
( !pBoss->GetUpper()->IsSctFrm() ||
@@ -149,7 +149,7 @@ sal_Bool SwTxtFrm::CalcPrepFtnAdjust()
if ( pCont && (*fnRect->fnYDiff)( (pCont->Frm().*fnRect->fnGetTop)(),
(Frm().*fnRect->fnGetBottom)() ) > 0 )
{
- pBoss->RearrangeFtns( (Frm().*fnRect->fnGetBottom)(), sal_False,
+ pBoss->RearrangeFtns( (Frm().*fnRect->fnGetBottom)(), false,
pFtn->GetAttr() );
ValidateBodyFrm();
ValidateFrm();
@@ -164,10 +164,10 @@ sal_Bool SwTxtFrm::CalcPrepFtnAdjust()
aLine.TruncLines();
SetPara( 0 ); //Wird ggf. geloescht!
ResetPreps();
- return sal_False;
+ return false;
}
}
- return sal_True;
+ return true;
}
@@ -372,10 +372,10 @@ SwTwips SwTxtFrm::_GetFtnFrmHeight() const
if ( !pRef->IsInFtnConnect() )
{
SwSaveFtnHeight aSave( (SwFtnBossFrm*)pBoss, nHeight );
- nHeight = ((SwFtnContFrm*)pCont)->Grow( LONG_MAX, sal_True );
+ nHeight = ((SwFtnContFrm*)pCont)->Grow( LONG_MAX, true );
}
else
- nHeight = ((SwFtnContFrm*)pCont)->Grow( LONG_MAX, sal_True );
+ nHeight = ((SwFtnContFrm*)pCont)->Grow( LONG_MAX, true );
nHeight += nTmp;
if( nHeight < 0 )
@@ -474,7 +474,7 @@ void SwTxtFrm::RemoveFtn( const sal_Int32 nStart, const sal_Int32 nLen )
if( nEnd >= nIdx )
{
SwTxtFtn *pFtn = (SwTxtFtn*)pHt;
- sal_Bool bEndn = pFtn->GetFtn().IsEndNote();
+ const bool bEndn = pFtn->GetFtn().IsEndNote();
if( bEndn )
{
@@ -485,7 +485,7 @@ void SwTxtFrm::RemoveFtn( const sal_Int32 nStart, const sal_Int32 nLen )
{
if( !pFtnBoss )
{
- pFtnBoss = pSource->FindFtnBossFrm( sal_True );
+ pFtnBoss = pSource->FindFtnBossFrm( true );
if( pFtnBoss->GetUpper()->IsSctFrm() )
{
SwSectionFrm* pSect = (SwSectionFrm*)
@@ -511,14 +511,14 @@ void SwTxtFrm::RemoveFtn( const sal_Int32 nStart, const sal_Int32 nLen )
if( pFtnFrm )
{
- const bool bEndDoc = bEndn ? true : bFtnEndDoc;
+ const bool bEndDoc = bEndn || bFtnEndDoc;
if( bRollBack )
{
while ( pFtnFrm )
{
pFtnFrm->SetRef( this );
pFtnFrm = pFtnFrm->GetFollow();
- SetFtn( sal_True );
+ SetFtn( true );
}
}
else if( GetFollow() )
@@ -551,7 +551,7 @@ void SwTxtFrm::RemoveFtn( const sal_Int32 nStart, const sal_Int32 nLen )
pFtnBoss->MoveFtns( this, pDest, pFtn );
bRemove = true;
}
- ((SwTxtFrm*)pDest)->SetFtn( sal_True );
+ ((SwTxtFrm*)pDest)->SetFtn( true );
OSL_ENSURE( pDest->FindFtnBossFrm( !bEndn )->FindFtn( pDest,
pFtn),"SwTxtFrm::RemoveFtn: footnote ChgRef failed");
@@ -603,7 +603,7 @@ void SwTxtFrm::RemoveFtn( const sal_Int32 nStart, const sal_Int32 nLen )
/*************************************************************************
* SwTxtFormatter::ConnectFtn()
*************************************************************************/
-// sal_False, wenn irgendetwas schief gegangen ist.
+// false, wenn irgendetwas schief gegangen ist.
// Es gibt eigentlich nur zwei Moeglichkeiten:
// a) Die Ftn ist bereits vorhanden
// => dann wird sie gemoved, wenn ein anderer pSrcFrm gefunden wurde
@@ -620,9 +620,9 @@ void SwTxtFrm::ConnectFtn( SwTxtFtn *pFtn, const SwTwips nDeadLine )
OSL_ENSURE( !IsVertical() || !IsSwapped(),
"SwTxtFrm::ConnectFtn with swapped frame" );
- bFtn = sal_True;
- bInFtnConnect = sal_True; //Bloss zuruecksetzen!
- sal_Bool bEnd = pFtn->GetFtn().IsEndNote();
+ bFtn = true;
+ bInFtnConnect = true; //Bloss zuruecksetzen!
+ const bool bEnd = pFtn->GetFtn().IsEndNote();
//
// We want to store this value, because it is needed as a fallback
@@ -684,7 +684,7 @@ void SwTxtFrm::ConnectFtn( SwTxtFtn *pFtn, const SwTwips nDeadLine )
}
else if( pSrcFrm != this )
pBoss->ChangeFtnRef( pSrcFrm, pFtn, this );
- bInFtnConnect = sal_False;
+ bInFtnConnect = false;
return;
}
else if( pSrcFrm )
@@ -705,7 +705,7 @@ void SwTxtFrm::ConnectFtn( SwTxtFtn *pFtn, const SwTwips nDeadLine )
pBoss->AppendFtn( this, pFtn );
else if( pSrcFrm != this )
pBoss->ChangeFtnRef( pSrcFrm, pFtn, this );
- bInFtnConnect = sal_False;
+ bInFtnConnect = false;
return;
}
@@ -739,7 +739,7 @@ void SwTxtFrm::ConnectFtn( SwTxtFtn *pFtn, const SwTwips nDeadLine )
if ( pFtnFrm->GetFollow() && nDiff > 0 )
{
SwTwips nHeight = (pCont->Frm().*fnRect->fnGetHeight)();
- pBoss->RearrangeFtns( nDeadLine, sal_False, pFtn );
+ pBoss->RearrangeFtns( nDeadLine, false, pFtn );
ValidateBodyFrm();
ValidateFrm();
SwViewShell *pSh = getRootFrm()->GetCurrShell();
@@ -747,7 +747,7 @@ void SwTxtFrm::ConnectFtn( SwTxtFtn *pFtn, const SwTwips nDeadLine )
//Damit uns nix durch die Lappen geht.
pSh->InvalidateWindows( pCont->Frm() );
}
- bInFtnConnect = sal_False;
+ bInFtnConnect = false;
return;
}
else
@@ -786,7 +786,7 @@ void SwTxtFrm::ConnectFtn( SwTxtFtn *pFtn, const SwTwips nDeadLine )
// eingestellt werden kann.
if( bBrutal )
{
- pBoss->RemoveFtn( pSrcFrm, pFtn, sal_False );
+ pBoss->RemoveFtn( pSrcFrm, pFtn, false );
SwSaveFtnHeight *pHeight = bEnd ? NULL :
new SwSaveFtnHeight( pBoss, nDeadLine );
pBoss->AppendFtn( this, pFtn );
@@ -802,7 +802,7 @@ void SwTxtFrm::ConnectFtn( SwTxtFtn *pFtn, const SwTwips nDeadLine )
// Umgebung validieren, um Oszillationen zu verhindern.
SwSaveFtnHeight aNochmal( pBoss, nDeadLine );
ValidateBodyFrm();
- pBoss->RearrangeFtns( nDeadLine, sal_True );
+ pBoss->RearrangeFtns( nDeadLine, true );
ValidateFrm();
}
else if( pSect->IsFtnAtEnd() )
@@ -822,7 +822,7 @@ void SwTxtFrm::ConnectFtn( SwTxtFtn *pFtn, const SwTwips nDeadLine )
nRstHeight = GetRstHeight();
(void)nRstHeight;
#endif
- bInFtnConnect = sal_False;
+ bInFtnConnect = false;
return;
}
@@ -920,7 +920,7 @@ SwFtnPortion *SwTxtFormatter::NewFtnPortion( SwTxtFormatInfo &rInf,
// gleichzeitig auf der Seite/Seitenspalte geben
if( pSct && !bAtSctEnd ) // liegt unser Container in einem (spaltigen) Bereich?
{
- SwFtnBossFrm* pTmp = pBoss->FindSctFrm()->FindFtnBossFrm( sal_True );
+ SwFtnBossFrm* pTmp = pBoss->FindSctFrm()->FindFtnBossFrm( true );
SwFtnContFrm* pFtnC = pTmp->FindFtnCont();
if( pFtnC )
{
@@ -996,7 +996,7 @@ SwNumberPortion *SwTxtFormatter::NewFtnNumPortion( SwTxtFormatInfo &rInf ) const
SwFmtFtn& rFtn = (SwFmtFtn&)pFtn->GetFtn();
SwDoc *pDoc = pFrm->GetNode()->GetDoc();
- OUString aFtnTxt( rFtn.GetViewNumStr( *pDoc, sal_True ));
+ OUString aFtnTxt( rFtn.GetViewNumStr( *pDoc, true ));
const SwEndNoteInfo* pInfo;
if( rFtn.IsEndNote() )
@@ -1364,14 +1364,14 @@ SwFtnSave::SwFtnSave( const SwTxtSizeInfo &rInf,
// set the correct rotation at the footnote font
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_ROTATE,
- sal_True, &pItem ))
+ true, &pItem ))
pFnt->SetVertical( ((SvxCharRotateItem*)pItem)->GetValue(),
rInf.GetTxtFrm()->IsVertical() );
pFnt->ChgPhysFnt( pInf->GetVsh(), *pInf->GetOut() );
if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_BACKGROUND,
- sal_True, &pItem ))
+ true, &pItem ))
pFnt->SetBackColor( new Color( ((SvxBrushItem*)pItem)->GetColor() ) );
}
else
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 70dc04c..3a184f3 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -328,7 +328,7 @@ static void lcl_ChangeFtnRef( SwTxtNode &rNode )
{
pFtn->SetRef( pFrm );
pFtn = pFtn->GetFollow();
- ((SwTxtFrm*)pFrm)->SetFtn( sal_True );
+ ((SwTxtFrm*)pFrm)->SetFtn( true );
}
}
#if OSL_DEBUG_LEVEL > 0
commit a915d7d505d8f837521f7898dc7b1a343139410f
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date: Sat Feb 15 23:20:29 2014 +0100
sal_Bool to bool and minor optimizations
Change-Id: Iddee0b723ce8a0ac9020b0b048a31212dc377430
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index 683d154..a987acb 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -121,8 +121,8 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable
/// Copies the attributes at nStart to pDest.
SAL_DLLPRIVATE void CopyAttr( SwTxtNode *pDest, const sal_Int32 nStart, const sal_Int32 nOldPos);
- SAL_DLLPRIVATE SwTxtNode* _MakeNewTxtNode( const SwNodeIndex&, sal_Bool bNext = sal_True,
- sal_Bool bChgFollow = sal_True );
+ SAL_DLLPRIVATE SwTxtNode* _MakeNewTxtNode( const SwNodeIndex&, bool bNext = true,
+ bool bChgFollow = true );
SAL_DLLPRIVATE void CutImpl(
SwTxtNode * const pDest, const SwIndex & rDestStart,
@@ -148,7 +148,7 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable
SAL_DLLPRIVATE void CalcHiddenCharFlags() const;
- SAL_DLLPRIVATE SwNumRule * _GetNumRule(sal_Bool bInParent = sal_True) const;
+ SAL_DLLPRIVATE SwNumRule * _GetNumRule(bool bInParent = true) const;
SAL_DLLPRIVATE void SetLanguageAndFont( const SwPaM &rPaM,
LanguageType nLang, sal_uInt16 nLangWhichId,
@@ -269,7 +269,7 @@ public:
const sal_Int32 nLen,
const sal_uInt16 nWhich = 0,
const SfxItemSet* pSet = 0,
- const sal_Bool bInclRefToxMark = sal_False );
+ const bool bInclRefToxMark = false );
void GCAttr();
// Delete text attribute (needs to be deregistered at Pool!)
@@ -289,19 +289,19 @@ public:
/** Set these attributes at TextNode. If the whole range is comprised
set them only in AutoAttrSet (SwCntntNode::SetAttr). */
- sal_Bool SetAttr( const SfxItemSet& rSet,
+ bool SetAttr( const SfxItemSet& rSet,
sal_Int32 nStt, sal_Int32 nEnd,
const SetAttrMode nMode = nsSetAttrMode::SETATTR_DEFAULT );
/** Query the attributes of textnode over the range.
Introduce 4th optional parameter <bMergeIndentValuesOfNumRule>.
- If <bMergeIndentValuesOfNumRule> == sal_True, the indent attributes of
+ If <bMergeIndentValuesOfNumRule> == true, the indent attributes of
the corresponding list level of an applied list style is merged into
- the requested item set as a LR-SPACE item, if <bOnlyTxtAttr> == sal_False,
+ the requested item set as a LR-SPACE item, if <bOnlyTxtAttr> == false,
corresponding node has not its own indent attributes and the
position-and-space mode of the list level is SvxNumberFormat::LABEL_ALIGNMENT. */
- sal_Bool GetAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd,
- sal_Bool bOnlyTxtAttr = sal_False,
- sal_Bool bGetFromChrFmt = sal_True,
+ bool GetAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd,
+ const bool bOnlyTxtAttr = false,
+ const bool bGetFromChrFmt = true,
const bool bMergeIndentValuesOfNumRule = false ) const;
/// Convey attributes of an AttrSet (AutoFmt) to SwpHintsArray.
@@ -419,7 +419,7 @@ public:
@return numbering rule of this text node or NULL if none is set
*/
- SwNumRule *GetNumRule(sal_Bool bInParent = sal_True) const;
+ SwNumRule *GetNumRule(bool bInParent = true) const;
inline const SwNodeNum* GetNum() const
{
@@ -469,7 +469,7 @@ public:
@return additional indents
*/
- long GetLeftMarginWithNum( sal_Bool bTxtLeft = sal_False ) const;
+ long GetLeftMarginWithNum( bool bTxtLeft = false ) const;
/**
Returns the combined first line indent of this text node and
@@ -478,10 +478,10 @@ public:
@param the first line indent of this text node taking the
numbering into account (return parameter)
- @retval sal_True this node has SwNodeNum and has numbering rule
- @retval sal_False else
+ @retval true this node has SwNodeNum and has numbering rule
+ @retval false else
*/
- sal_Bool GetFirstLineOfsWithNum( short& rFirstOffset ) const;
+ bool GetFirstLineOfsWithNum( short& rFirstOffset ) const;
SwTwips GetAdditionalIndentForStartingNewList() const;
@@ -500,10 +500,10 @@ public:
numbering rule and the numbering format specified for the
level of the SwNodeNum is of an enumeration type.
- @retval sal_True This text node has a number.
- @retval sal_False else
+ @retval true This text node has a number.
+ @retval false else
*/
- sal_Bool HasNumber() const;
+ bool HasNumber() const;
/** Returns if this text node has a bullet.
@@ -511,23 +511,23 @@ public:
numbering rule and the numbering format specified for the
level of the SwNodeNum is of a bullet type.
- @retval sal_True This text node has a bullet.
- @retval sal_False else
+ @retval true This text node has a bullet.
+ @retval false else
*/
- sal_Bool HasBullet() const;
+ bool HasBullet() const;
/** Returns is this text node is numbered.
This node is numbered if it has a SwNodeNum and it has a
numbering rule and has not a hidden SwNodeNum.
- ATTENTION: Returns sal_True even if the SwNumFmt has type
+ ATTENTION: Returns true even if the SwNumFmt has type
SVX_NUM_NUMBER_NONE.
- @retval sal_True This node is numbered.
- @retval sal_False else
+ @retval true This node is numbered.
+ @retval false else
*/
- sal_Bool IsNumbered() const;
+ bool IsNumbered() const;
/** Returns if this text node has a marked label.
@@ -613,7 +613,7 @@ public:
Note: This function returns false, if the numbering format is
SVX_NUM_NUMBER_NONE or if the numbering/bullet has been deleted.
- @return sal_True if the paragraph has a visible numbering/bullet/outline
+ @return true if the paragraph has a visible numbering/bullet/outline
*/
bool HasVisibleNumberingOrBullet() const;
@@ -663,11 +663,11 @@ public:
sal_uInt16 nScript = 0 ) const;
/// in ndcopy.cxx
- sal_Bool IsSymbol( const sal_Int32 nBegin ) const; // In itratr.cxx.
+ bool IsSymbol( const sal_Int32 nBegin ) const; // In itratr.cxx.
virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
/// Interactive hyphenation: we find TxtFrm and call its CalcHyph.
- sal_Bool Hyphenate( SwInterHyphInfo &rHyphInf );
+ bool Hyphenate( SwInterHyphInfo &rHyphInf );
void DelSoftHyph( const sal_Int32 nStart, const sal_Int32 nEnd );
/** add 4th optional parameter <bAddSpaceAfterListLabelStr> indicating,
@@ -689,8 +689,8 @@ public:
OUString GetRedlineTxt( sal_Int32 nIdx = 0,
sal_Int32 nLen = SAL_MAX_INT32,
- sal_Bool bExpandFlds = sal_False,
- sal_Bool bWithNum = sal_False ) const;
+ bool bExpandFlds = false,
+ bool bWithNum = false ) const;
/** @return actual count of initial chars for initial-function.
If nWishLen == 0 that of first word. */
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx
index b776572..7f04523 100644
--- a/sw/source/core/edit/edattr.cxx
+++ b/sw/source/core/edit/edattr.cxx
@@ -140,7 +140,7 @@ sal_Bool SwEditShell::GetPaMAttr( SwPaM* pPaM, SfxItemSet& rSet,
: static_cast<SwTxtNode*>(pNd)->GetTxt().getLength();
((SwTxtNode*)pNd)->GetAttr( *pSet, nStt, nEnd,
- sal_False, sal_True,
+ false, true,
bMergeIndentValuesOfNumRule );
}
break;
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index 8b15118..6636666 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -1480,7 +1480,7 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const
rRect.Top( rRect.Top() + nFirst );
rRect.Height( nLineHeight );
SwTwips nLeft = rFill.Left() + rLRSpace.GetLeft() +
- GetTxtNode()->GetLeftMarginWithNum( sal_False );
+ GetTxtNode()->GetLeftMarginWithNum();
SwTwips nRight = rFill.Right() - rLRSpace.GetRight();
SwTwips nCenter = ( nLeft + nRight ) / 2;
rRect.Left( nLeft );
@@ -1553,7 +1553,7 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const
else if( rFill.X() > nLeft )
{
SwTwips nTxtLeft = rFill.Left() + rLRSpace.GetTxtLeft() +
- GetTxtNode()->GetLeftMarginWithNum( sal_True );
+ GetTxtNode()->GetLeftMarginWithNum( true );
rFill.nLineWidth += rFill.bFirstLine ? nLeft : nTxtLeft;
SwTwips nLeftTab = nLeft;
SwTwips nRightTab = nLeft;
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index 26341a4..53e0d0a 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -428,7 +428,7 @@ static bool lcl_MinMaxString( SwMinMaxArgs& rArg, SwFont* pFnt, const OUString &
return bRet;
}
-sal_Bool SwTxtNode::IsSymbol( const sal_Int32 nBegin ) const
+bool SwTxtNode::IsSymbol( const sal_Int32 nBegin ) const
{
SwScriptInfo aScriptInfo;
SwAttrIter aIter( *(SwTxtNode*)this, aScriptInfo );
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index 69c3c25..aa03472 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -192,14 +192,14 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
// 5. paragraph border
// Note: These values have already been used during calculation
// of the printing area of the paragraph.
- const int nLMWithNum = pNode->GetLeftMarginWithNum( sal_True );
+ const int nLMWithNum = pNode->GetLeftMarginWithNum( true );
if ( pFrm->IsRightToLeft() )
{
// this calculation is identical this the calculation for L2R layout - see below
nLeft = pFrm->Frm().Left() +
pFrm->Prt().Left() +
nLMWithNum -
- pNode->GetLeftMarginWithNum( sal_False ) -
+ pNode->GetLeftMarginWithNum() -
// #i95907#
// #i111284#
// rSpace.GetLeft() +
@@ -219,7 +219,7 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
nLeft = pFrm->Frm().Left() +
pFrm->Prt().Left() +
nLMWithNum -
- pNode->GetLeftMarginWithNum( sal_False ) -
+ pNode->GetLeftMarginWithNum() -
// #i95907#
// #i111284#
( bListLevelIndentsApplicableAndLabelAlignmentActive
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 6ce20e8..70dc04c 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -362,7 +362,7 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos )
const sal_Int32 nSplitPos = rPos.nContent.GetIndex();
const sal_Int32 nTxtLen = m_Text.getLength();
SwTxtNode* const pNode =
- _MakeNewTxtNode( rPos.nNode, sal_False, nSplitPos==nTxtLen );
+ _MakeNewTxtNode( rPos.nNode, false, nSplitPos==nTxtLen );
// the first paragraph gets the XmlId,
// _except_ if it is empty and the second is not empty
@@ -2450,7 +2450,7 @@ void SwTxtNode::GCAttr()
}
// #i23726#
-SwNumRule* SwTxtNode::_GetNumRule(sal_Bool bInParent) const
+SwNumRule* SwTxtNode::_GetNumRule(bool bInParent) const
{
SwNumRule* pRet = 0;
@@ -2490,7 +2490,7 @@ SwNumRule* SwTxtNode::_GetNumRule(sal_Bool bInParent) const
return pRet;
}
-SwNumRule* SwTxtNode::GetNumRule(sal_Bool bInParent) const
+SwNumRule* SwTxtNode::GetNumRule(bool bInParent) const
{
return _GetNumRule(bInParent);
}
@@ -2526,15 +2526,10 @@ void SwTxtNode::NumRuleChgd()
}
// -> #i27615#
-sal_Bool SwTxtNode::IsNumbered() const
+bool SwTxtNode::IsNumbered() const
{
- sal_Bool bResult = sal_False;
-
SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
- if ( pRule && IsCountedInList() )
- bResult = sal_True;
-
- return bResult;
+ return pRule && IsCountedInList();
}
bool SwTxtNode::HasMarkedLabel() const
@@ -2551,8 +2546,8 @@ bool SwTxtNode::HasMarkedLabel() const
}
// <- #i27615#
-SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, sal_Bool bNext,
- sal_Bool bChgFollow )
+SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, bool bNext,
+ bool bChgFollow )
{
/* hartes PageBreak/PageDesc/ColumnBreak aus AUTO-Set ignorieren */
SwAttrSet* pNewAttrSet = 0;
@@ -2681,7 +2676,7 @@ SwCntntNode* SwTxtNode::AppendNode( const SwPosition & rPos )
{
// Position hinter dem eingefuegt wird
SwNodeIndex aIdx( rPos.nNode, 1 );
- SwTxtNode* pNew = _MakeNewTxtNode( aIdx, sal_True );
+ SwTxtNode* pNew = _MakeNewTxtNode( aIdx, true );
// reset list attributes at appended text node
pNew->ResetAttr( RES_PARATR_LIST_ISRESTART );
@@ -2732,9 +2727,9 @@ SwTxtAttr * SwTxtNode::GetTxtAttrForCharAt(
}
// -> #i29560#
-sal_Bool SwTxtNode::HasNumber() const
+bool SwTxtNode::HasNumber() const
{
- sal_Bool bResult = sal_False;
+ bool bResult = false;
const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
if ( pRule )
@@ -2757,9 +2752,9 @@ sal_Bool SwTxtNode::HasNumber() const
return bResult;
}
-sal_Bool SwTxtNode::HasBullet() const
+bool SwTxtNode::HasBullet() const
{
- sal_Bool bResult = sal_False;
+ bool bResult = false;
const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
if ( pRule )
@@ -2819,7 +2814,7 @@ OUString SwTxtNode::GetNumString( const bool _bInclPrefixAndSuffixStrings,
return OUString();
}
-long SwTxtNode::GetLeftMarginWithNum( sal_Bool bTxtLeft ) const
+long SwTxtNode::GetLeftMarginWithNum( bool bTxtLeft ) const
{
long nRet = 0;
const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
@@ -2870,9 +2865,8 @@ long SwTxtNode::GetLeftMarginWithNum( sal_Bool bTxtLeft ) const
return nRet;
}
-sal_Bool SwTxtNode::GetFirstLineOfsWithNum( short& rFLOffset ) const
+bool SwTxtNode::GetFirstLineOfsWithNum( short& rFLOffset ) const
{
- sal_Bool bRet( sal_False );
// #i95907#
rFLOffset = 0;
@@ -2915,14 +2909,11 @@ sal_Bool SwTxtNode::GetFirstLineOfsWithNum( short& rFLOffset ) const
}
}
- bRet = sal_True;
- }
- else
- {
- rFLOffset = GetSwAttrSet().GetLRSpace().GetTxtFirstLineOfst();
+ return true;
}
- return bRet;
+ rFLOffset = GetSwAttrSet().GetLRSpace().GetTxtFirstLineOfst();
+ return false;
}
//
@@ -3326,7 +3317,7 @@ bool SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx,
}
OUString SwTxtNode::GetRedlineTxt( sal_Int32 nIdx, sal_Int32 nLen,
- sal_Bool bExpandFlds, sal_Bool bWithNum ) const
+ bool bExpandFlds, bool bWithNum ) const
{
std::vector<sal_Int32> aRedlArr;
const SwDoc* pDoc = GetDoc();
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 07fd4a3..aec3d26 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -1859,14 +1859,14 @@ bool SwTxtNode::TryCharSetExpandToNum(const SfxItemSet& aCharSet)
// setze diese Attribute am TextNode. Wird der gesamte Bereich umspannt,
// dann setze sie nur im AutoAttrSet (SwCntntNode:: SetAttr)
-sal_Bool SwTxtNode::SetAttr(
+bool SwTxtNode::SetAttr(
const SfxItemSet& rSet,
const sal_Int32 nStt,
const sal_Int32 nEnd,
const SetAttrMode nMode )
{
if( !rSet.Count() )
- return sal_False;
+ return false;
// teil die Sets auf (fuer Selektion in Nodes)
const SfxItemSet* pSet = &rSet;
@@ -1898,8 +1898,8 @@ sal_Bool SwTxtNode::SetAttr(
// we want to set them at the paragraph:
if( aTxtSet.Count() != rSet.Count() )
{
- sal_Bool bRet = SetAttr( rSet );
- if( !aTxtSet.Count() )
+ const bool bRet = SetAttr( rSet );
+ if( !aTxtSet.Count() )
return bRet;
}
@@ -1909,8 +1909,8 @@ sal_Bool SwTxtNode::SetAttr(
if ( bAutoStyle )
{
boost::shared_ptr<SfxItemSet> pAutoStyleSet = static_cast<const SwFmtAutoFmt*>(pItem)->GetStyleHandle();
- sal_Bool bRet = SetAttr( *pAutoStyleSet );
- if( 1 == aTxtSet.Count() )
+ const bool bRet = SetAttr( *pAutoStyleSet );
+ if( 1 == aTxtSet.Count() )
return bRet;
}
@@ -1988,7 +1988,7 @@ sal_Bool SwTxtNode::SetAttr(
TryDeleteSwpHints();
- return nCount ? sal_True : sal_False;
+ return nCount != 0;
}
static void lcl_MergeAttr( SfxItemSet& rSet, const SfxPoolItem& rAttr )
@@ -2079,8 +2079,8 @@ static void lcl_MergeListLevelIndentAsLRSpaceItem( const SwTxtNode& rTxtNode,
}
// erfrage die Attribute vom TextNode ueber den Bereich
-sal_Bool SwTxtNode::GetAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd,
- sal_Bool bOnlyTxtAttr, sal_Bool bGetFromChrFmt,
+bool SwTxtNode::GetAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd,
+ const bool bOnlyTxtAttr, const bool bGetFromChrFmt,
const bool bMergeIndentValuesOfNumRule ) const
{
if( HasHints() )
@@ -2294,7 +2294,7 @@ sal_Bool SwTxtNode::GetAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd,
}
}
- return rSet.Count() ? sal_True : sal_False;
+ return rSet.Count() != 0;
}
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 7ab20bd..79baeec 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -374,7 +374,7 @@ void SwTxtNode::RstTxtAttr(
const sal_Int32 nLen,
const sal_uInt16 nWhich,
const SfxItemSet* pSet,
- const sal_Bool bInclRefToxMark )
+ const bool bInclRefToxMark )
{
if ( !GetpSwpHints() )
return;
@@ -1574,7 +1574,7 @@ void SwTxtFrm::CollectAutoCmplWrds( SwCntntNode* pActNode, sal_Int32 nActPos )
}
/** Findet den TxtFrm und sucht dessen CalcHyph */
-sal_Bool SwTxtNode::Hyphenate( SwInterHyphInfo &rHyphInf )
+bool SwTxtNode::Hyphenate( SwInterHyphInfo &rHyphInf )
{
// Abkuerzung: am Absatz ist keine Sprache eingestellt:
if ( LANGUAGE_NONE == sal_uInt16( GetSwAttrSet().GetLanguage().GetLanguage() )
@@ -1582,7 +1582,7 @@ sal_Bool SwTxtNode::Hyphenate( SwInterHyphInfo &rHyphInf )
{
if( !rHyphInf.IsCheck() )
rHyphInf.SetNoLang( true );
- return sal_False;
+ return false;
}
if( pLinguNode != this )
@@ -1599,7 +1599,7 @@ sal_Bool SwTxtNode::Hyphenate( SwInterHyphInfo &rHyphInf )
// moeglich, in denen kein Frame zum Node vorliegt.
// Also keinOSL_ENSURE
OSL_ENSURE( pFrm, "!SwTxtNode::Hyphenate: can't find any frame" );
- return sal_False;
+ return false;
}
while( pFrm )
@@ -1610,7 +1610,7 @@ sal_Bool SwTxtNode::Hyphenate( SwInterHyphInfo &rHyphInf )
// (7821, 7662, 7408); vgl. layact.cxx,
// SwLayAction::_TurboAction(), if( !pCnt->IsValid() ...
pFrm->SetCompletePaint();
- return sal_True;
+ return true;
}
pFrm = (SwTxtFrm*)(pFrm->GetFollow());
if( pFrm )
@@ -1619,7 +1619,7 @@ sal_Bool SwTxtNode::Hyphenate( SwInterHyphInfo &rHyphInf )
rHyphInf.nStart = pFrm->GetOfst();
}
}
- return sal_False;
+ return false;
}
namespace
diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx
index 5572cfa..73a6964 100644
--- a/sw/source/ui/uiview/viewtab.cxx
+++ b/sw/source/ui/uiview/viewtab.cxx
@@ -1244,7 +1244,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
short nOffset = static_cast< short >(aLR.GetTxtLeft() +
// #i42922# Mouse move of numbering label
// has to consider the left indent of the paragraph
- m_pNumRuleNodeFromDoc->GetLeftMarginWithNum( sal_True ) );
+ m_pNumRuleNodeFromDoc->GetLeftMarginWithNum( true ) );
short nFLOffset;
m_pNumRuleNodeFromDoc->GetFirstLineOfsWithNum( nFLOffset );
commit 781b17a577991b8a830038ab0e61de0c048f11aa
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date: Sat Feb 15 17:39:35 2014 +0100
sal_Bool to bool
Change-Id: I98da667e406aef18e0f8b8bdb9b380cf76b36952
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index 06b8d1a..689720f 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -344,7 +344,7 @@ public:
// Wir formatieren eine Zeile fuer die interaktive Trennung
// Return: found
- sal_Bool Hyphenate( SwInterHyphInfo &rInf );
+ bool Hyphenate( SwInterHyphInfo &rInf );
// Probegrow
inline SwTwips GrowTst( const SwTwips nGrow );
diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx
index ed18cee..5aef790 100644
--- a/sw/source/core/text/txthyph.cxx
+++ b/sw/source/core/text/txthyph.cxx
@@ -61,19 +61,19 @@ Reference< XHyphenatedWord > SwTxtFormatInfo::HyphWord(
* Wir formatieren eine Zeile fuer die interaktive Trennung
*************************************************************************/
-sal_Bool SwTxtFrm::Hyphenate( SwInterHyphInfo &rHyphInf )
+bool SwTxtFrm::Hyphenate( SwInterHyphInfo &rHyphInf )
{
OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"swapped frame at SwTxtFrm::Hyphenate" );
if( !g_pBreakIt->GetBreakIter().is() )
- return sal_False;
+ return false;
// Wir machen den Laden erstmal dicht:
OSL_ENSURE( !IsLocked(), "SwTxtFrm::Hyphenate: this is locked" );
// 4935: Der frame::Frame muss eine gueltige SSize haben!
Calc();
GetFormatted();
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if( !IsEmpty() )
{
// Wir muessen die Trennung immer einschalten.
@@ -230,7 +230,7 @@ bool SwTxtFormatter::Hyphenate( SwInterHyphInfo &rHyphInf )
Boundary aBound =
g_pBreakIt->GetBreakIter()->getWordBoundary( rInf.GetTxt(), nWrdStart,
- g_pBreakIt->GetLocale( rInf.GetFont()->GetLanguage() ), WordType::DICTIONARY_WORD, sal_True );
+ g_pBreakIt->GetLocale( rInf.GetFont()->GetLanguage() ), WordType::DICTIONARY_WORD, true );
nWrdStart = aBound.startPos;
nLen = aBound.endPos - nWrdStart;
if ( nLen == 0 )
@@ -481,12 +481,12 @@ void SwSoftHyphPortion::Paint( const SwTxtPaintInfo &rInf ) const
* Fall 1: "Au-to"
* 1) {Au}{-}{to}, {to} passt nicht mehr => Underflow
* 2) {-} ruft Hyphenate => keine Alternative
- * 3) FormatEOL() und bFull = sal_True
+ * 3) FormatEOL() und bFull = true
*
* Fall 2: "Zuc-ker"
* 1) {Zuc}{-}{ker}, {ker} passt nicht mehr => Underflow
* 2) {-} ruft Hyphenate => Alternative!
- * 3) Underflow() und bFull = sal_True
+ * 3) Underflow() und bFull = true
* 4) {Zuc} ruft Hyphenate => {Zuk}{-}{ker}
*/
commit 54cbd46dc52c51dda1594ee090f0619a7b92d56a
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date: Sat Feb 15 16:56:30 2014 +0100
Avoid assignment in complex if condition
Change-Id: Ibaff0eb54b67e946d07e5a626f5af04ac46132cc
diff --git a/sw/source/core/text/wrong.cxx b/sw/source/core/text/wrong.cxx
index cbd184f..4a56bce 100644
--- a/sw/source/core/text/wrong.cxx
+++ b/sw/source/core/text/wrong.cxx
@@ -99,9 +99,11 @@ void SwWrongList::ClearList()
*/
bool SwWrongList::InWrongWord( sal_Int32 &rChk, sal_Int32 &rLn ) const
{
- MSHORT nPos = GetWrongPos( rChk );
- sal_Int32 nWrPos;
- if( nPos < Count() && ( nWrPos = Pos( nPos ) ) <= rChk )
+ const MSHORT nPos = GetWrongPos( rChk );
+ if ( nPos >= Count() )
+ return false;
+ const sal_Int32 nWrPos = Pos( nPos );
+ if ( nWrPos <= rChk )
{
rLn = Len( nPos );
if( nWrPos + rLn <= rChk )
commit 09baf615705715b318b6ae42ef82193dffd57e1f
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date: Sat Feb 15 16:48:40 2014 +0100
sal_Bool to bool
Change-Id: I866ba6d09512411ee18dc83a2601a262d1649338
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 561e396..f9297eb 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -964,7 +964,7 @@ sal_Bool SwAccessibleParagraph::GetTextBoundary(
nLast += pWrongList->Len( nWrongPos );
}
//
- sal_Bool bIn = pWrongList->InWrongWord(nBegin,nLen); // && !pTxtNode->IsSymbol(nBegin) )
+ const bool bIn = pWrongList->InWrongWord(nBegin, nLen); // && !pTxtNode->IsSymbol(nBegin) )
if(bIn)
{
rBound.startPos = max(nNext, rBound.startPos);
diff --git a/sw/source/core/inc/wrong.hxx b/sw/source/core/inc/wrong.hxx
index e1ba495..4a7604c 100644
--- a/sw/source/core/inc/wrong.hxx
+++ b/sw/source/core/inc/wrong.hxx
@@ -212,18 +212,18 @@ public:
inline WrongListType GetWrongListType() const { return meType; }
inline sal_Int32 GetBeginInv() const { return nBeginInvalid; }
inline sal_Int32 GetEndInv() const { return nEndInvalid; }
- inline sal_Bool InsideInvalid( sal_Int32 nChk ) const
+ inline bool InsideInvalid( sal_Int32 nChk ) const
{ return nChk >= nBeginInvalid && nChk <= nEndInvalid; }
void SetInvalid( sal_Int32 nBegin, sal_Int32 nEnd );
inline void Validate(){ nBeginInvalid = COMPLETE_STRING; }
void Invalidate( sal_Int32 nBegin, sal_Int32 nEnd );
- sal_Bool InvalidateWrong();
- sal_Bool Fresh( sal_Int32 &rStart, sal_Int32 &rEnd, sal_Int32 nPos,
+ bool InvalidateWrong();
+ bool Fresh( sal_Int32 &rStart, sal_Int32 &rEnd, sal_Int32 nPos,
sal_Int32 nLen, sal_uInt16 nIndex, sal_Int32 nCursorPos );
sal_uInt16 GetWrongPos( sal_Int32 nValue ) const;
- sal_Bool Check( sal_Int32 &rChk, sal_Int32 &rLn ) const;
- sal_Bool InWrongWord( sal_Int32 &rChk, sal_Int32 &rLn ) const;
+ bool Check( sal_Int32 &rChk, sal_Int32 &rLn ) const;
+ bool InWrongWord( sal_Int32 &rChk, sal_Int32 &rLn ) const;
sal_Int32 NextWrong( sal_Int32 nChk ) const;
void Move( sal_Int32 nPos, sal_Int32 nDiff );
diff --git a/sw/source/core/text/wrong.cxx b/sw/source/core/text/wrong.cxx
index 7a8ef2a..cbd184f 100644
--- a/sw/source/core/text/wrong.cxx
+++ b/sw/source/core/text/wrong.cxx
@@ -97,7 +97,7 @@ void SwWrongList::ClearList()
@return <true> if incorrectly selected, <false> otherwise
*/
-sal_Bool SwWrongList::InWrongWord( sal_Int32 &rChk, sal_Int32 &rLn ) const
+bool SwWrongList::InWrongWord( sal_Int32 &rChk, sal_Int32 &rLn ) const
{
MSHORT nPos = GetWrongPos( rChk );
sal_Int32 nWrPos;
@@ -105,11 +105,11 @@ sal_Bool SwWrongList::InWrongWord( sal_Int32 &rChk, sal_Int32 &rLn ) const
{
rLn = Len( nPos );
if( nWrPos + rLn <= rChk )
- return sal_False;
+ return false;
rChk = nWrPos;
- return sal_True;
+ return true;
}
- return sal_False;
+ return false;
}
/** Calculate first incorrectly selected area.
@@ -119,13 +119,13 @@ sal_Bool SwWrongList::InWrongWord( sal_Int32 &rChk, sal_Int32 &rLn ) const
@return <true> if incorrectly selected area was found, <false> otherwise
*/
-sal_Bool SwWrongList::Check( sal_Int32 &rChk, sal_Int32 &rLn ) const
+bool SwWrongList::Check( sal_Int32 &rChk, sal_Int32 &rLn ) const
{
MSHORT nPos = GetWrongPos( rChk );
rLn += rChk;
if( nPos == Count() )
- return sal_False;
+ return false;
sal_Int32 nWrPos = Pos( nPos );
sal_Int32 nEnd = nWrPos + Len( nPos );
@@ -133,7 +133,7 @@ sal_Bool SwWrongList::Check( sal_Int32 &rChk, sal_Int32 &rLn ) const
{
++nPos;
if( nPos == Count() )
- return sal_False;
+ return false;
nWrPos = Pos( nPos );
nEnd = nWrPos + Len( nPos );
@@ -147,7 +147,7 @@ sal_Bool SwWrongList::Check( sal_Int32 &rChk, sal_Int32 &rLn ) const
rLn -= rChk;
return 0 != rLn;
}
- return sal_False;
+ return false;
}
/** Find next incorrectly selected position.
@@ -353,11 +353,11 @@ void SwWrongList::Move( sal_Int32 nPos, sal_Int32 nDiff )
@return <true> if ???
*/
-sal_Bool SwWrongList::Fresh( sal_Int32 &rStart, sal_Int32 &rEnd, sal_Int32 nPos,
+bool SwWrongList::Fresh( sal_Int32 &rStart, sal_Int32 &rEnd, sal_Int32 nPos,
sal_Int32 nLen, MSHORT nIndex, sal_Int32 nCursorPos )
{
// length of word must be greater than 0 and cursor position must be outside the word
- sal_Bool bRet = nLen && ( nCursorPos > nPos + nLen || nCursorPos < nPos );
+ bool bRet = nLen && ( nCursorPos > nPos + nLen || nCursorPos < nPos );
sal_Int32 nWrPos = 0;
sal_Int32 nWrEnd = rEnd;
@@ -380,7 +380,7 @@ sal_Bool SwWrongList::Fresh( sal_Int32 &rStart, sal_Int32 &rEnd, sal_Int32 nPos,
if( nCnt < Count() && nWrPos == nPos && Len( nCnt ) == nLen )
{
++nCnt;
- bRet = sal_True;
+ bRet = true;
}
else
{
@@ -425,16 +425,16 @@ void SwWrongList::Invalidate( sal_Int32 nBegin, sal_Int32 nEnd )
_Invalidate( nBegin, nEnd );
}
-sal_Bool SwWrongList::InvalidateWrong( )
+bool SwWrongList::InvalidateWrong( )
{
if( Count() )
{
const sal_Int32 nFirst = Pos( 0 );
const sal_Int32 nLast = Pos( Count() - 1 ) + Len( Count() - 1 );
Invalidate( nFirst, nLast );
- return sal_True;
+ return true;
}
- return sal_False;
+ return false;
}
SwWrongList* SwWrongList::SplitList( sal_Int32 nSplitPos )
commit 8b3d4df3c8985dca67a986932c510a204c78f63a
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date: Sat Feb 15 11:59:31 2014 +0100
sal_Bool to bool
Change-Id: I799196d2d9d52711937d56c018e70a1b453bce45
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index fc20df9..06b8d1a 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -172,7 +172,7 @@ class SwTxtFrm: public SwCntntFrm
sal_Bool _GetDropRect( SwRect &rRect ) const;
- void SetPara( SwParaPortion *pNew, sal_Bool bDelete = sal_True );
+ void SetPara( SwParaPortion *pNew, bool bDelete = true );
sal_Bool _IsFtnNumFrm() const;
@@ -351,8 +351,8 @@ public:
SwParaPortion *GetPara();
inline const SwParaPortion *GetPara() const;
- inline sal_Bool HasPara() const;
- sal_Bool _HasPara() const;
+ inline bool HasPara() const;
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list