diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-02-22 08:40:37 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-02-22 12:25:07 +0100 |
commit | 5e5b86c425be4d67b7a5966c28a034e9616e19f4 (patch) | |
tree | 32e7ed605220de54909ea7f6c19d5bfd0022f555 /sw | |
parent | 69cae997f95234d1f933e0c446c3946978269d31 (diff) |
sal_Bool to bool
Change-Id: Ic17400b4cde699387b6fccbc0744aeb8ef5734c5
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/inc/cntfrm.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/txtfrm.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/layout/calcmove.cxx | 14 | ||||
-rw-r--r-- | sw/source/core/layout/unusedf.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/text/txtfrm.cxx | 26 |
5 files changed, 25 insertions, 25 deletions
diff --git a/sw/source/core/inc/cntfrm.hxx b/sw/source/core/inc/cntfrm.hxx index 8f326feb82c1..b1b4ca967622 100644 --- a/sw/source/core/inc/cntfrm.hxx +++ b/sw/source/core/inc/cntfrm.hxx @@ -97,7 +97,7 @@ public: // nMaxHeight is the required height // bSplit indicates that the paragraph has to be split // bTst indicates that we are currently doing a test formatting - virtual sal_Bool WouldFit( SwTwips &nMaxHeight, sal_Bool &bSplit, sal_Bool bTst ); + virtual bool WouldFit( SwTwips &nMaxHeight, bool &bSplit, bool bTst ); sal_Bool MoveFtnCntFwd( sal_Bool, SwFtnBossFrm* ); // called by MoveFwd if content diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx index 2e8fc9ca84a9..9a6c8c27ca18 100644 --- a/sw/source/core/inc/txtfrm.hxx +++ b/sw/source/core/inc/txtfrm.hxx @@ -331,14 +331,14 @@ public: // nMaxHeight is the required height // bSplit indicates, that the paragraph has to be split // bTst indicates, that we are currently doing a test formatting - virtual sal_Bool WouldFit( SwTwips &nMaxHeight, sal_Bool &bSplit, sal_Bool bTst ); + virtual bool WouldFit( SwTwips &nMaxHeight, bool &bSplit, bool bTst ); // Hier das WouldFit-Aequivalent fuer mal kurz probeweise // umgehaengte TextFrames, auch hier liefert // nMaxHeight die benoetigte Hoehe, // und bSplit sagt, obj der Absatz gesplittet werden muss. // Uebergeben wird der potentielle Vorgaenger fuer die Abstandsberechnung - sal_Bool TestFormat( const SwFrm* pPrv, SwTwips &nMaxHeight, sal_Bool &bSplit ); + bool TestFormat( const SwFrm* pPrv, SwTwips &nMaxHeight, bool &bSplit ); // Wir formatieren eine Zeile fuer die interaktive Trennung // Return: found diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index 90dfb7249f3d..ae1fbc8f4279 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -1563,8 +1563,8 @@ void SwCntntFrm::MakeAll() { SwTwips nTmp = (GetUpper()->Prt().*fnRect->fnGetHeight)() - (Prt().*fnRect->fnGetTop)(); - sal_Bool bSplit = !IsFwdMoveAllowed(); - if ( nTmp > 0 && WouldFit( nTmp, bSplit, sal_False ) ) + bool bSplit = !IsFwdMoveAllowed(); + if ( nTmp > 0 && WouldFit( nTmp, bSplit, false ) ) { Prepare( PREP_WIDOWS_ORPHANS, 0, false ); mbValidSize = sal_False; @@ -1771,7 +1771,7 @@ sal_Bool SwCntntFrm::_WouldFit( SwTwips nSpace, } sal_Bool bRet; - sal_Bool bSplit = !pNewUpper->Lower(); + bool bSplit = !pNewUpper->Lower(); SwCntntFrm *pFrm = this; const SwFrm *pTmpPrev = pNewUpper->Lower(); if( pTmpPrev && pTmpPrev->IsFtnFrm() ) @@ -1783,7 +1783,7 @@ sal_Bool SwCntntFrm::_WouldFit( SwTwips nSpace, // #i46181# SwTwips nSecondCheck = 0; SwTwips nOldSpace = nSpace; - sal_Bool bOldSplit = bSplit; + bool bOldSplit = bSplit; if ( bTstMove || IsInFly() || ( IsInSct() && ( pFrm->GetUpper()->IsColBodyFrm() || ( pFtnFrm && @@ -1818,14 +1818,14 @@ sal_Bool SwCntntFrm::_WouldFit( SwTwips nSpace, bRet = ((SwTxtFrm*)pFrm)->TestFormat( pTmpPrev, nSpace, bSplit ); } else - bRet = pFrm->WouldFit( nSpace, bSplit, sal_False ); + bRet = pFrm->WouldFit( nSpace, bSplit, false ); pTmpFrm->Remove(); pTmpFrm->InsertBefore( pUp, pOldNext ); } else { - bRet = pFrm->WouldFit( nSpace, bSplit, sal_False ); + bRet = pFrm->WouldFit( nSpace, bSplit, false ); nSecondCheck = !bSplit ? 1 : 0; } @@ -1894,7 +1894,7 @@ sal_Bool SwCntntFrm::_WouldFit( SwTwips nSpace, // We do a second check with the original remaining space // reduced by the required upper space: nOldSpace -= nSecondCheck; - const bool bSecondRet = nOldSpace >= 0 && pFrm->WouldFit( nOldSpace, bOldSplit, sal_False ); + const bool bSecondRet = nOldSpace >= 0 && pFrm->WouldFit( nOldSpace, bOldSplit, false ); if ( bSecondRet && bOldSplit && nOldSpace >= 0 ) { bRet = sal_True; diff --git a/sw/source/core/layout/unusedf.cxx b/sw/source/core/layout/unusedf.cxx index ae710bc8a3db..5603fe0833f1 100644 --- a/sw/source/core/layout/unusedf.cxx +++ b/sw/source/core/layout/unusedf.cxx @@ -31,10 +31,10 @@ void SwFrm::Paint(SwRect const&, SwPrintData const*const) const OSL_FAIL( "Paint() of the base class called." ); } -sal_Bool SwCntntFrm::WouldFit( SwTwips &, sal_Bool&, sal_Bool ) +bool SwCntntFrm::WouldFit( SwTwips &, bool&, bool ) { OSL_FAIL( "WouldFit of CntntFrm called." ); - return sal_False; + return false; } bool SwFrm::FillSelection( SwSelectionList& , const SwRect& ) const diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index 0e92844055d1..cab59b1aa486 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -1836,16 +1836,16 @@ SwTestFormat::~SwTestFormat() pFrm->SetPara( pOldPara ); } -sal_Bool SwTxtFrm::TestFormat( const SwFrm* pPrv, SwTwips &rMaxHeight, sal_Bool &bSplit ) +bool SwTxtFrm::TestFormat( const SwFrm* pPrv, SwTwips &rMaxHeight, bool &bSplit ) { PROTOCOL_ENTER( this, PROT_TESTFORMAT, 0, 0 ) if( IsLocked() && GetUpper()->Prt().Width() <= 0 ) - return sal_False; + return false; SwTestFormat aSave( this, pPrv, rMaxHeight ); - return SwTxtFrm::WouldFit( rMaxHeight, bSplit, sal_True ); + return SwTxtFrm::WouldFit( rMaxHeight, bSplit, true ); } /* SwTxtFrm::WouldFit() @@ -1859,14 +1859,14 @@ sal_Bool SwTxtFrm::TestFormat( const SwFrm* pPrv, SwTwips &rMaxHeight, sal_Bool * Die benoetigte Hoehe wird von nMaxHeight abgezogen! */ -sal_Bool SwTxtFrm::WouldFit( SwTwips &rMaxHeight, sal_Bool &bSplit, sal_Bool bTst ) +bool SwTxtFrm::WouldFit( SwTwips &rMaxHeight, bool &bSplit, bool bTst ) { OSL_ENSURE( ! IsVertical() || ! IsSwapped(), "SwTxtFrm::WouldFit with swapped frame" ); SWRECTFN( this ); if( IsLocked() ) - return sal_False; + return false; // it can happen that the IdleCollector removed the cached information if( !IsEmpty() ) @@ -1878,23 +1878,23 @@ sal_Bool SwTxtFrm::WouldFit( SwTwips &rMaxHeight, sal_Bool &bSplit, sal_Bool bTs // which is called in <SwTxtFrm::TestFormat(..)> if ( IsEmpty() && !bTst ) { - bSplit = sal_False; + bSplit = false; SwTwips nHeight = bVert ? Prt().SSize().Width() : Prt().SSize().Height(); if( rMaxHeight < nHeight ) - return sal_False; + return false; else { rMaxHeight -= nHeight; - return sal_True; + return true; } } // In sehr unguenstigen Faellen kann GetPara immer noch 0 sein. - // Dann returnen wir sal_True, um auf der neuen Seite noch einmal + // Dann returnen wir true, um auf der neuen Seite noch einmal // anformatiert zu werden. OSL_ENSURE( HasPara() || IsHiddenNow(), "WouldFit: GetFormatted() and then !HasPara()" ); if( !HasPara() || ( !(Frm().*fnRect->fnGetHeight)() && IsHiddenNow() ) ) - return sal_True; + return true; // Da das Orphan-Flag nur sehr fluechtig existiert, wird als zweite // Bedingung ueberprueft, ob die Rahmengroesse durch CalcPreps @@ -1924,10 +1924,10 @@ sal_Bool SwTxtFrm::WouldFit( SwTwips &rMaxHeight, sal_Bool &bSplit, sal_Bool bTs !pFoll->Frm().Height() ) ) pFoll = pFoll->GetFollow(); if( pFoll ) - return sal_False; + return false; } else - return sal_False; + return false; } } @@ -1938,7 +1938,7 @@ sal_Bool SwTxtFrm::WouldFit( SwTwips &rMaxHeight, sal_Bool &bSplit, sal_Bool bTs WidowsAndOrphans aFrmBreak( this, rMaxHeight, bSplit ); - sal_Bool bRet = sal_True; + bool bRet = true; aLine.Bottom(); // is breaking necessary? |