diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-02-16 22:49:51 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-02-16 22:55:30 +0100 |
commit | 3ec96dc587411c5347a77bba404c1e7a94e2d19c (patch) | |
tree | 90f2aae90a4886bde33ec4bda7fda5de7e914d7f /sw | |
parent | a915d7d505d8f837521f7898dc7b1a343139410f (diff) |
sal_Bool to bool
Change-Id: Ifc98bc3afff33670fbde724a0d8e8df842dda641
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/crsr/swcrsr.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/txtfrm.hxx | 168 | ||||
-rw-r--r-- | sw/source/core/layout/frmtool.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/text/frmcrsr.cxx | 62 | ||||
-rw-r--r-- | sw/source/core/text/frmform.cxx | 121 | ||||
-rw-r--r-- | sw/source/core/text/frminf.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/text/frmpaint.cxx | 22 | ||||
-rw-r--r-- | sw/source/core/text/porrst.cxx | 20 | ||||
-rw-r--r-- | sw/source/core/text/txtfrm.cxx | 36 | ||||
-rw-r--r-- | sw/source/core/text/txtftn.cxx | 60 | ||||
-rw-r--r-- | sw/source/core/txtnode/ndtxt.cxx | 2 |
11 files changed, 251 insertions, 252 deletions
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index c25d93685645..ed7384246f56 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 689720fa865f..3052fb1e1c00 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 f15cbf14762f..8925e0d693be 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 6636666fa425..1022b8721e78 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 01ff28e7b0b1..5f215ed43f17 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 704b649000b3..c3eda66e9104 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 eef726b2b810..bf4dc37250df 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 643636f37ea6..8c1bc56f2bcb 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 a03b00fb4113..e2b6abec83d7 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 d0327e816ae7..fe9149a750e8 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 70dc04c0e6ab..3a184f3c6535 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 |