diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-03-13 23:19:52 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-03-16 09:39:14 +0100 |
commit | e6405ba66233ee0a138e6c623e6a36158026c58b (patch) | |
tree | a248ed69fe48bf3d90861858f9af34d4291ce157 | |
parent | 35bbf925b353e20e88c23e5c8f1934397a0b1a6a (diff) |
sal_Bool to bool
Change-Id: Iadb3c137813039b64a909e2be5693656ae35db45
-rw-r--r-- | sw/source/core/inc/cntfrm.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/flowfrm.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/inc/sectfrm.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/tabfrm.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/layout/calcmove.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/layout/flowfrm.cxx | 10 | ||||
-rw-r--r-- | sw/source/core/layout/sectfrm.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/layout/tabfrm.cxx | 25 |
8 files changed, 30 insertions, 27 deletions
diff --git a/sw/source/core/inc/cntfrm.hxx b/sw/source/core/inc/cntfrm.hxx index e9ddcd627a80..be61756ea5ca 100644 --- a/sw/source/core/inc/cntfrm.hxx +++ b/sw/source/core/inc/cntfrm.hxx @@ -50,7 +50,7 @@ class SwCntntFrm: public SwFrm, public SwFlowFrm void _UpdateAttr( const SfxPoolItem*, const SfxPoolItem*, sal_uInt8 &, SwAttrSetChg *pa = 0, SwAttrSetChg *pb = 0 ); - virtual sal_Bool ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool, sal_Bool& ); + virtual bool ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool, bool& ); const SwCntntFrm* ImplGetNextCntntFrm( bool bFwd ) const; diff --git a/sw/source/core/inc/flowfrm.hxx b/sw/source/core/inc/flowfrm.hxx index 398d5bd9f819..09a6afbd0172 100644 --- a/sw/source/core/inc/flowfrm.hxx +++ b/sw/source/core/inc/flowfrm.hxx @@ -138,8 +138,8 @@ protected: sal_Bool CheckMoveFwd( bool& rbMakePage, sal_Bool bKeep, sal_Bool bMovedBwd ); sal_Bool MoveFwd( sal_Bool bMakePage, sal_Bool bPageBreak, sal_Bool bMoveAlways = sal_False ); - sal_Bool MoveBwd( sal_Bool &rbReformat ); - virtual sal_Bool ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool bHead, sal_Bool &rReformat )=0; + bool MoveBwd( bool &rbReformat ); + virtual bool ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool bHead, bool &rReformat )=0; public: SwFlowFrm( SwFrm &rFrm ); diff --git a/sw/source/core/inc/sectfrm.hxx b/sw/source/core/inc/sectfrm.hxx index b15b75346e29..930d1bc83840 100644 --- a/sw/source/core/inc/sectfrm.hxx +++ b/sw/source/core/inc/sectfrm.hxx @@ -55,7 +55,7 @@ class SwSectionFrm: public SwLayoutFrm, public SwFlowFrm bool IsEndnoteAtMyEnd() const; protected: virtual void MakeAll(); - virtual sal_Bool ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool bHead, sal_Bool &rReformat ); + virtual bool ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool bHead, bool &rReformat ); virtual void Format( const SwBorderAttrs *pAttrs = 0 ); virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ); virtual void SwClientNotify( const SwModify&, const SfxHint& ); diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx index 44ff0f340fa0..02a454cb9943 100644 --- a/sw/source/core/inc/tabfrm.hxx +++ b/sw/source/core/inc/tabfrm.hxx @@ -98,7 +98,7 @@ class SwTabFrm: public SwLayoutFrm, public SwFlowFrm SwAttrSetChg *pa = 0, SwAttrSetChg *pb = 0 ); - virtual sal_Bool ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool bHead, sal_Bool &rReformat ); + virtual bool ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool bHead, bool &rReformat ); protected: virtual void MakeAll(); diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index bbd6bfce767e..ce04d827a736 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -46,7 +46,7 @@ // Move methods /// Return value tells whether the Frm should be moved. -sal_Bool SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool, sal_Bool & ) +bool SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool, bool & ) { if ( (SwFlowFrm::IsMoveBwdJump() || !IsPrevObjMove())) { @@ -73,7 +73,7 @@ sal_Bool SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool, sal_Bool SwPageFrm *pOldPage = FindPageFrm(); if ( SwFlowFrm::IsMoveBwdJump() ) - return sal_True; + return true; if( IsInFtn() && IsInSct() ) { @@ -193,7 +193,7 @@ sal_Bool SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool, sal_Bool return nSpace != 0; } } - return sal_False; + return false; } // Calc methods @@ -1345,7 +1345,7 @@ void SwCntntFrm::MakeAll() // backwards (if this is movable at all). // To prevent oscillations/loops, check that this has not just // flowed forwards. - sal_Bool bDummy; + bool bDummy; if ( !lcl_Prev( this ) && !bMovedFwd && ( bMoveable || ( bFly && !bTab ) ) && diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index e0c8e937028c..5b512429d2ae 100644 --- a/sw/source/core/layout/flowfrm.cxx +++ b/sw/source/core/layout/flowfrm.cxx @@ -1964,13 +1964,13 @@ sal_Bool SwFlowFrm::MoveFwd( sal_Bool bMakePage, sal_Bool bPageBreak, sal_Bool b * @note This should be called by derived classes. * @note The actual moving must be implemented in the subclasses. */ -sal_Bool SwFlowFrm::MoveBwd( sal_Bool &rbReformat ) +bool SwFlowFrm::MoveBwd( bool &rbReformat ) { SwFlowFrm::SetMoveBwdJump( sal_False ); SwFtnFrm* pFtn = m_rThis.FindFtnFrm(); if ( pFtn && pFtn->IsBackMoveLocked() ) - return sal_False; + return false; // #115759# - text frames, which are directly inside // tables aren't allowed to move backward. @@ -1981,9 +1981,9 @@ sal_Bool SwFlowFrm::MoveBwd( sal_Bool &rbReformat ) { if ( pUpperFrm->IsTabFrm() ) { - return sal_False; + return false; } - else if ( pUpperFrm->IsColumnFrm() && pUpperFrm->IsInSct() ) + if ( pUpperFrm->IsColumnFrm() && pUpperFrm->IsInSct() ) { break; } @@ -2290,7 +2290,7 @@ sal_Bool SwFlowFrm::MoveBwd( sal_Bool &rbReformat ) pNewUpper = 0; } } - if ( pNewUpper && !ShouldBwdMoved( pNewUpper, sal_True, rbReformat ) ) + if ( pNewUpper && !ShouldBwdMoved( pNewUpper, true, rbReformat ) ) { if( !pNewUpper->Lower() ) { diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx index f6a9055e0129..79889a7f1855 100644 --- a/sw/source/core/layout/sectfrm.cxx +++ b/sw/source/core/layout/sectfrm.cxx @@ -751,10 +751,10 @@ void SwSectionFrm::MakeAll() DelEmpty( sal_False ); } -sal_Bool SwSectionFrm::ShouldBwdMoved( SwLayoutFrm *, sal_Bool , sal_Bool & ) +bool SwSectionFrm::ShouldBwdMoved( SwLayoutFrm *, bool , bool & ) { OSL_FAIL( "Hups, wo ist meine Tarnkappe?" ); - return sal_False; + return false; } const SwSectionFmt* SwSectionFrm::_GetEndSectFmt() const diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 82eeb6eceadd..a326d4ce5d36 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -1947,13 +1947,13 @@ void SwTabFrm::MakeAll() if( pFrm && n1StLineHeight >(pFrm->Frm().*fnRect->fnGetHeight )() ) { SwTabFrm *pMaster = (SwTabFrm*)FindMaster(); - sal_Bool bDummy; - if ( ShouldBwdMoved( pMaster->GetUpper(), sal_False, bDummy ) ) + bool bDummy; + if ( ShouldBwdMoved( pMaster->GetUpper(), false, bDummy ) ) pMaster->InvalidatePos(); } } SwFtnBossFrm *pOldBoss = bFtnsInDoc ? FindFtnBossFrm( sal_True ) : 0; - sal_Bool bReformat; + bool bReformat; if ( MoveBwd( bReformat ) ) { SWREFRESHFN( this ) @@ -2038,8 +2038,8 @@ void SwTabFrm::MakeAll() // at least one further row of an existing follow. if ( !bSplit && GetFollow() ) { - sal_Bool bDummy; - if ( GetFollow()->ShouldBwdMoved( GetUpper(), sal_False, bDummy ) ) + bool bDummy; + if ( GetFollow()->ShouldBwdMoved( GetUpper(), false, bDummy ) ) { SwFrm *pTmp = GetUpper(); SwTwips nDeadLine = (pTmp->*fnRect->fnGetPrtBottom)(); @@ -3251,9 +3251,9 @@ SwCntntFrm *SwTabFrm::FindLastCntnt() } /// Return value defines if the frm needs to be relocated -sal_Bool SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool, sal_Bool &rReformat ) +bool SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool, bool &rReformat ) { - rReformat = sal_False; + rReformat = false; if ( (SwFlowFrm::IsMoveBwdJump() || !IsPrevObjMove()) ) { //Floating back Frm's is quite time consuming unfortunately. @@ -3320,8 +3320,11 @@ sal_Bool SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool, sal_Bool &r bMoveAnyway = true; if ( bMoveAnyway ) - return rReformat = sal_True; - else if ( !bLockBackMove && nSpace > 0 ) + { + rReformat = true; + return true; + } + if ( !bLockBackMove && nSpace > 0 ) { // #i26945# - check, if follow flow line // contains frame, which are moved forward due to its object @@ -3332,7 +3335,7 @@ sal_Bool SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool, sal_Bool &r *(pFirstRow->GetFmt()->GetDoc()), *(pFirstRow) ) ) { - return sal_False; + return false; } SwTwips nTmpHeight = CalcHeightOfFirstContentLine(); @@ -3344,7 +3347,7 @@ sal_Bool SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool, sal_Bool &r return nTmpHeight <= nSpace; } } - return sal_False; + return false; } void SwTabFrm::Cut() |