diff options
Diffstat (limited to 'sw/source/core/layout/calcmove.cxx')
-rw-r--r-- | sw/source/core/layout/calcmove.cxx | 276 |
1 files changed, 138 insertions, 138 deletions
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index dc4395c1ab60..90eb1f9ddff2 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -79,7 +79,7 @@ |*************************************************************************/ -BOOL SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL & ) +sal_Bool SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool, sal_Bool & ) { if ( (SwFlowFrm::IsMoveBwdJump() || !IsPrevObjMove())) { @@ -104,12 +104,12 @@ BOOL SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL & ) //von Leerseiten), so muss in jedemfall gemoved werden - sonst wuerde, //falls der Frm nicht in das Blatt passt, nicht mehr auf die //dazwischenliegenden Blaetter geachtet werden. - BYTE nMoveAnyway = 0; + sal_uInt8 nMoveAnyway = 0; SwPageFrm * const pNewPage = pNewUpper->FindPageFrm(); SwPageFrm *pOldPage = FindPageFrm(); if ( SwFlowFrm::IsMoveBwdJump() ) - return TRUE; + return sal_True; if( IsInFtn() && IsInSct() ) { @@ -122,7 +122,7 @@ BOOL SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL & ) pSect = pSect->GetUpper()->FindSctFrm(); ASSERT( pSect, "Escaping footnote" ); if( pSect != pMySect ) - return FALSE; + return sal_False; } } SWRECTFN( this ) @@ -188,7 +188,7 @@ BOOL SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL & ) ( pNewUpper->IsColBodyFrm() && !pNewUpper->GetUpper()->GetPrev() && !pNewUpper->GetUpper()->GetNext() ) ) ) ) - nSpace += pNewUpper->Grow( LONG_MAX, TRUE ); + nSpace += pNewUpper->Grow( LONG_MAX, sal_True ); if ( nMoveAnyway < 3 ) { @@ -205,7 +205,7 @@ BOOL SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL & ) // dabei ist sogar die Breite egal, da ein TestFormat in der neuen Umgebung // vorgenommen wird. // --> OD 2007-11-26 #b6614158# - const BYTE nBwdMoveNecessaryResult = + const sal_uInt8 nBwdMoveNecessaryResult = BwdMoveNecessary( pNewPage, aRect); const bool bObjsInNewUpper( nBwdMoveNecessaryResult == 2 || nBwdMoveNecessaryResult == 3 ); @@ -221,21 +221,21 @@ BOOL SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL & ) !(pNewUpper->Prt().*fnRectX->fnGetWidth)() && ( pNewUpper->GetUpper()->GetPrev() || pNewUpper->GetUpper()->GetNext() ) ) - return TRUE; + return sal_True; else - return FALSE; // Kein Platz, dann ist es sinnlos, zurueckzufliessen + return sal_False; // Kein Platz, dann ist es sinnlos, zurueckzufliessen } else { // OD 2004-05-26 #i25904# - check for space left in new upper if ( nSpace ) - return TRUE; + return sal_True; else - return FALSE; + return sal_False; } } } - return FALSE; + return sal_False; } //------------------------------------------------------------------------ @@ -295,10 +295,10 @@ void SwFrm::PrepareMake() if ( !GetUpper() ) return; - const BOOL bCnt = IsCntntFrm(); - const BOOL bTab = IsTabFrm(); - BOOL bNoSect = IsInSct(); - BOOL bOldTabLock = FALSE, bFoll = FALSE; + const sal_Bool bCnt = IsCntntFrm(); + const sal_Bool bTab = IsTabFrm(); + sal_Bool bNoSect = IsInSct(); + sal_Bool bOldTabLock = sal_False, bFoll = sal_False; SwFlowFrm* pThis = bCnt ? (SwCntntFrm*)this : NULL; if ( bTab ) @@ -312,9 +312,9 @@ void SwFrm::PrepareMake() { pThis = (SwSectionFrm*)this; bFoll = pThis->IsFollow(); - bNoSect = FALSE; + bNoSect = sal_False; } - else if ( bCnt && TRUE == (bFoll = pThis->IsFollow()) && + else if ( bCnt && sal_True == (bFoll = pThis->IsFollow()) && GetPrev() ) { //Wenn der Master gereade ein CalcFollow ruft braucht die Kette @@ -427,11 +427,11 @@ void SwFrm::PrepareCrsr() if ( !GetUpper() ) return; - const BOOL bCnt = IsCntntFrm(); - const BOOL bTab = IsTabFrm(); - BOOL bNoSect = IsInSct(); + const sal_Bool bCnt = IsCntntFrm(); + const sal_Bool bTab = IsTabFrm(); + sal_Bool bNoSect = IsInSct(); - BOOL bOldTabLock = FALSE, bFoll; + sal_Bool bOldTabLock = sal_False, bFoll; SwFlowFrm* pThis = bCnt ? (SwCntntFrm*)this : NULL; if ( bTab ) @@ -443,7 +443,7 @@ void SwFrm::PrepareCrsr() else if( IsSctFrm() ) { pThis = (SwSectionFrm*)this; - bNoSect = FALSE; + bNoSect = sal_False; } bFoll = pThis && pThis->IsFollow(); @@ -505,7 +505,7 @@ void SwFrm::PrepareCrsr() // Hier wird GetPrev() zurueckgegeben, allerdings werden // dabei leere SectionFrms ueberlesen -SwFrm* lcl_Prev( SwFrm* pFrm, BOOL bSectPrv = TRUE ) +SwFrm* lcl_Prev( SwFrm* pFrm, sal_Bool bSectPrv = sal_True ) { SwFrm* pRet = pFrm->GetPrev(); if( !pRet && pFrm->GetUpper() && pFrm->GetUpper()->IsSctFrm() && @@ -531,8 +531,8 @@ void SwFrm::MakePos() { if ( !bValidPos ) { - bValidPos = TRUE; - BOOL bUseUpper = FALSE; + bValidPos = sal_True; + sal_Bool bUseUpper = sal_False; SwFrm* pPrv = lcl_Prev( this ); if ( pPrv && ( !pPrv->IsCntntFrm() || @@ -549,19 +549,19 @@ void SwFrm::MakePos() } else if ( pPrv->Frm().Top() == 0 ) { - bUseUpper = TRUE; + bUseUpper = sal_True; } } - pPrv = lcl_Prev( this, FALSE ); - USHORT nMyType = GetType(); + pPrv = lcl_Prev( this, sal_False ); + sal_uInt16 nMyType = GetType(); SWRECTFN( ( IsCellFrm() && GetUpper() ? GetUpper() : this ) ) if ( !bUseUpper && pPrv ) { aFrm.Pos( pPrv->Frm().Pos() ); if( FRM_NEIGHBOUR & nMyType ) { - BOOL bR2L = IsRightToLeft(); + sal_Bool bR2L = IsRightToLeft(); if( bR2L ) (aFrm.*fnRect->fnSetPosX)( (aFrm.*fnRect->fnGetLeft)() - (aFrm.*fnRect->fnGetWidth)() ); @@ -605,13 +605,13 @@ void SwFrm::MakePos() GetUpper()->Calc(); } // <-- - pPrv = lcl_Prev( this, FALSE ); + pPrv = lcl_Prev( this, sal_False ); if ( !bUseUpper && pPrv ) { aFrm.Pos( pPrv->Frm().Pos() ); if( FRM_NEIGHBOUR & nMyType ) { - BOOL bR2L = IsRightToLeft(); + sal_Bool bR2L = IsRightToLeft(); if( bR2L ) (aFrm.*fnRect->fnSetPosX)( (aFrm.*fnRect->fnGetLeft)() - (aFrm.*fnRect->fnGetWidth)() ); @@ -654,7 +654,7 @@ void SwFrm::MakePos() aFrm.Pos().X() = aFrm.Pos().Y() = 0; if( IsBodyFrm() && bVert && !bReverse && GetUpper() ) aFrm.Pos().X() += GetUpper()->Prt().Width() - aFrm.Width(); - bValidPos = TRUE; + bValidPos = sal_True; } } @@ -672,7 +672,7 @@ void lcl_CheckObjects( SwSortedObjs* pSortedObjs, SwFrm* pFrm, long& rBot ) //Und dann kann es natuerlich noch Absatzgebundene //Rahmen geben, die unterhalb ihres Absatzes stehen. long nMax = 0; - for ( USHORT i = 0; i < pSortedObjs->Count(); ++i ) + for ( sal_uInt16 i = 0; i < pSortedObjs->Count(); ++i ) { // --> OD 2004-07-01 #i28701# - consider changed type of <SwSortedObjs> // entries. @@ -713,7 +713,7 @@ void SwPageFrm::MakeAll() if ( !bValidPos ) { // PAGES01 - bValidPos = TRUE; // positioning of the pages is taken care of by the root frame + bValidPos = sal_True; // positioning of the pages is taken care of by the root frame } if ( !bValidSize || !bValidPrtArea ) @@ -723,7 +723,7 @@ void SwPageFrm::MakeAll() Frm().Width( 0 ); Prt().Width( 0 ); Frm().Height( 0 ); Prt().Height( 0 ); Prt().Left( 0 ); Prt().Top( 0 ); - bValidSize = bValidPrtArea = TRUE; + bValidSize = bValidPrtArea = sal_True; } else { @@ -830,7 +830,7 @@ void SwPageFrm::MakeAll() Prt().Width( Frm().Width() - ( Prt().Left() + pAttrs->CalcRightLine() + aBorder.Width() ) ); Prt().Height( Frm().Height() - (nTop + nBottom) ); - bValidSize = bValidPrtArea = TRUE; + bValidSize = bValidPrtArea = sal_True; } else { //FixSize einstellen, bei Seiten nicht vom Upper sondern vom @@ -873,7 +873,7 @@ void SwLayoutFrm::MakeAll() //uebernimmt im DTor die Benachrichtigung const SwLayNotify aNotify( this ); - BOOL bVert = IsVertical(); + sal_Bool bVert = IsVertical(); SwRectFn fnRect = ( IsNeighbourFrm() == bVert )? fnRectHori : fnRectVert; SwBorderAttrAccess *pAccess = 0; @@ -890,7 +890,7 @@ void SwLayoutFrm::MakeAll() if ( IsLeaveUpperAllowed() ) { if ( !bValidSize ) - bValidPrtArea = FALSE; + bValidPrtArea = sal_False; } else { @@ -898,7 +898,7 @@ void SwLayoutFrm::MakeAll() { //FixSize einstellen, die VarSize wird von Format() nach //Berechnung der PrtArea eingestellt. - bValidPrtArea = FALSE; + bValidPrtArea = sal_False; SwTwips nPrtWidth = (GetUpper()->Prt().*fnRect->fnGetWidth)(); if( bVert && ( IsBodyFrm() || IsFtnContFrm() ) ) @@ -927,7 +927,7 @@ void SwLayoutFrm::MakeAll() // Don't leave your upper const SwTwips nDeadLine = (GetUpper()->*fnRect->fnGetPrtBottom)(); if( (Frm().*fnRect->fnOverStep)( nDeadLine ) ) - bValidSize = FALSE; + bValidSize = sal_False; } } } @@ -954,16 +954,16 @@ void SwLayoutFrm::MakeAll() |* |*************************************************************************/ -BOOL SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs ) +sal_Bool SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs ) { - BOOL bSizeChgd = FALSE; + sal_Bool bSizeChgd = sal_False; if ( !bValidPrtArea ) { - bValidPrtArea = TRUE; + bValidPrtArea = sal_True; SWRECTFN( this ) - const BOOL bTxtFrm = IsTxtFrm(); + const sal_Bool bTxtFrm = IsTxtFrm(); SwTwips nUpper = 0; if ( bTxtFrm && ((SwTxtFrm*)this)->IsHiddenNow() ) { @@ -998,13 +998,13 @@ BOOL SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs ) //geben kann (RootFrm::ImplCalcBrowseWidth()) long nMinWidth = 0; - for (USHORT i = 0; GetDrawObjs() && i < GetDrawObjs()->Count();++i) + for (sal_uInt16 i = 0; GetDrawObjs() && i < GetDrawObjs()->Count();++i) { // --> OD 2004-07-01 #i28701# - consider changed type of // <SwSortedObjs> entries SwAnchoredObject* pObj = (*GetDrawObjs())[i]; const SwFrmFmt& rFmt = pObj->GetFrmFmt(); - const BOOL bFly = pObj->ISA(SwFlyFrm); + const sal_Bool bFly = pObj->ISA(SwFlyFrm); if ((bFly && (WEIT_WECH == pObj->GetObjRect().Width())) || rFmt.GetFrmSize().GetWidthPercent()) { @@ -1081,7 +1081,7 @@ BOOL SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs ) GrowFrm( nUpper ); else ShrinkFrm( -nUpper ); - bSizeChgd = TRUE; + bSizeChgd = sal_True; } } return bSizeChgd; @@ -1105,8 +1105,8 @@ inline void ValidateSz( SwFrm *pFrm ) { if ( pFrm ) { - pFrm->bValidSize = TRUE; - pFrm->bValidPrtArea = TRUE; + pFrm->bValidSize = sal_True; + pFrm->bValidPrtArea = sal_True; } } @@ -1127,7 +1127,7 @@ void SwCntntFrm::MakeAll() if ( ((SwTxtFrm*)this)->IsLocked() ) { - ASSERT( FALSE, "Format fuer gelockten TxtFrm." ); + ASSERT( sal_False, "Format fuer gelockten TxtFrm." ); return; } @@ -1156,31 +1156,31 @@ void SwCntntFrm::MakeAll() //uebernimmt im DTor die Benachrichtigung SwCntntNotify *pNotify = new SwCntntNotify( this ); - BOOL bMakePage = TRUE; //solange TRUE kann eine neue Seite + sal_Bool bMakePage = sal_True; //solange sal_True kann eine neue Seite //angelegt werden (genau einmal) - BOOL bMovedBwd = FALSE; //Wird TRUE wenn der Frame zurueckfliesst - BOOL bMovedFwd = FALSE; //solange FALSE kann der Frm zurueck- + sal_Bool bMovedBwd = sal_False; //Wird sal_True wenn der Frame zurueckfliesst + sal_Bool bMovedFwd = sal_False; //solange sal_False kann der Frm zurueck- //fliessen (solange, bis er einmal //vorwaerts ge'moved wurde). - BOOL bFormatted = FALSE; //Fuer die Witwen und Waisen Regelung + sal_Bool bFormatted = sal_False; //Fuer die Witwen und Waisen Regelung //wird der letzte CntntFrm einer Kette //u.U. zum Formatieren angeregt, dies //braucht nur einmal zu passieren. //Immer wenn der Frm gemoved wird muss //das Flag zurueckgesetzt werden. - BOOL bMustFit = FALSE; //Wenn einmal die Notbremse gezogen wurde, + sal_Bool bMustFit = sal_False; //Wenn einmal die Notbremse gezogen wurde, //werden keine anderen Prepares mehr //abgesetzt. - BOOL bFitPromise = FALSE; //Wenn ein Absatz nicht passte, mit WouldFit + sal_Bool bFitPromise = sal_False; //Wenn ein Absatz nicht passte, mit WouldFit //aber verspricht, dass er sich passend //einstellt wird dieses Flag gesetzt. //Wenn er dann sein Versprechen nicht haelt, //kann kontrolliert verfahren werden. - BOOL bMoveable; - const BOOL bFly = IsInFly(); - const BOOL bTab = IsInTab(); - const BOOL bFtn = IsInFtn(); - const BOOL bSct = IsInSct(); + sal_Bool bMoveable; + const sal_Bool bFly = IsInFly(); + const sal_Bool bTab = IsInTab(); + const sal_Bool bFtn = IsInFtn(); + const sal_Bool bSct = IsInSct(); Point aOldFrmPos; //Damit bei Turnarounds jew. mit der Point aOldPrtPos; //letzten Pos verglichen und geprueft //werden kann, ob ein Prepare sinnvoll ist. @@ -1194,7 +1194,7 @@ void SwCntntFrm::MakeAll() pNotify->SetBordersJoinedWithPrev(); } - const BOOL bKeep = IsKeep( rAttrs.GetAttrSet() ); + const sal_Bool bKeep = IsKeep( rAttrs.GetAttrSet() ); SwSaveFtnHeight *pSaveFtn = 0; if ( bFtn ) @@ -1239,8 +1239,8 @@ void SwCntntFrm::MakeAll() GetUpper()->GetUpper()->IsCellFrm() ) ) && IsMoveable() ) { - bMovedFwd = TRUE; - MoveFwd( bMakePage, FALSE ); + bMovedFwd = sal_True; + MoveFwd( bMakePage, sal_False ); } // <-- } @@ -1250,7 +1250,7 @@ void SwCntntFrm::MakeAll() //gleich verschoben werden. if ( lcl_Prev( this ) && ((SwTxtFrm*)this)->IsFollow() && IsMoveable() ) { - bMovedFwd = TRUE; + bMovedFwd = sal_True; // OD 2004-03-02 #106629# - If follow frame is in table, it's master // will be the last in the current table cell. Thus, invalidate the // printing area of the master, @@ -1258,7 +1258,7 @@ void SwCntntFrm::MakeAll() { lcl_Prev( this )->InvalidatePrt(); } - MoveFwd( bMakePage, FALSE ); + MoveFwd( bMakePage, sal_False ); } // OD 08.11.2002 #104840# - check footnote content for forward move. @@ -1277,8 +1277,8 @@ void SwCntntFrm::MakeAll() pFtnBossOfFtn != pFtnBossOfRef && pFtnBossOfFtn->IsBefore( pFtnBossOfRef ) ) { - bMovedFwd = TRUE; - MoveFwd( bMakePage, FALSE ); + bMovedFwd = sal_True; + MoveFwd( bMakePage, sal_False ); } } } @@ -1291,13 +1291,13 @@ void SwCntntFrm::MakeAll() SwRect aOldFrm_StopFormat( Frm() ); SwRect aOldPrt_StopFormat( Prt() ); // <-- - if ( TRUE == (bMoveable = IsMoveable()) ) + if ( sal_True == (bMoveable = IsMoveable()) ) { SwFrm *pPre = GetIndPrev(); if ( CheckMoveFwd( bMakePage, bKeep, bMovedBwd ) ) { SWREFRESHFN( this ) - bMovedFwd = TRUE; + bMovedFwd = sal_True; if ( bMovedBwd ) { //Beim zurueckfliessen wurde der Upper angeregt sich @@ -1327,7 +1327,7 @@ void SwCntntFrm::MakeAll() // - current frame width is 0. // - current printing area width is 0. // - frame width is adjusted to a value greater than 0. - // - printing area flag is TRUE. + // - printing area flag is sal_True. // Thus, it's assured that the printing area is adjusted, if the // frame area width changes its width from 0 to something greater // than 0. @@ -1339,7 +1339,7 @@ void SwCntntFrm::MakeAll() (Frm().*fnRect->fnGetWidth)() == 0 && (Prt().*fnRect->fnGetWidth)() == 0 ) { - bValidPrtArea = FALSE; + bValidPrtArea = sal_False; } (Frm().*fnRect->fnSetWidth)( nNewFrmWidth ); @@ -1375,7 +1375,7 @@ void SwCntntFrm::MakeAll() if ( !bNoPrepAdjustFrm ) { Prepare( PREP_ADJUST_FRM ); - bValidSize = FALSE; + bValidSize = sal_False; } // <-- } @@ -1389,32 +1389,32 @@ void SwCntntFrm::MakeAll() //- Er muss mit der Unterkante der PrtArea des Upper ueberlappen. if ( !bMustFit ) { - BOOL bWidow = TRUE; + sal_Bool bWidow = sal_True; const SwTwips nDeadLine = (GetUpper()->*fnRect->fnGetPrtBottom)(); if ( bMoveable && !bFormatted && ( GetFollow() || ( (Frm().*fnRect->fnOverStep)( nDeadLine ) ) ) ) { - Prepare( PREP_WIDOWS_ORPHANS, 0, FALSE ); - bValidSize = bWidow = FALSE; + Prepare( PREP_WIDOWS_ORPHANS, 0, sal_False ); + bValidSize = bWidow = sal_False; } if( (Frm().*fnRect->fnGetPos)() != aOldFrmPos || (Prt().*fnRect->fnGetPos)() != aOldPrtPos ) { // In diesem Prepare erfolgt ggf. ein _InvalidateSize(). - // bValidSize wird FALSE und das Format() wird gerufen. - Prepare( PREP_POS_CHGD, (const void*)&bFormatted, FALSE ); + // bValidSize wird sal_False und das Format() wird gerufen. + Prepare( PREP_POS_CHGD, (const void*)&bFormatted, sal_False ); if ( bWidow && GetFollow() ) - { Prepare( PREP_WIDOWS_ORPHANS, 0, FALSE ); - bValidSize = FALSE; + { Prepare( PREP_WIDOWS_ORPHANS, 0, sal_False ); + bValidSize = sal_False; } } } if ( !bValidSize ) { - bValidSize = bFormatted = TRUE; + bValidSize = bFormatted = sal_True; ++nFormatCount; if( nFormatCount > STOP_FLY_FORMAT ) - SetFlyLock( TRUE ); + SetFlyLock( sal_True ); // --> OD 2006-09-25 #b6448963# - loop prevention // No format any longer, if <cnStopFormat> consequetive formats // without change occur. @@ -1443,10 +1443,10 @@ void SwCntntFrm::MakeAll() ) { SwFrm* pOldUpper = GetUpper(); - MoveFwd( TRUE, FALSE ); + MoveFwd( sal_True, sal_False ); if ( GetUpper() != pOldUpper ) { - bMovedFwd = TRUE; + bMovedFwd = sal_True; SWREFRESHFN( this ) continue; } @@ -1456,7 +1456,7 @@ void SwCntntFrm::MakeAll() //ich zurueckfliessen kann (wenn ich mich ueberhaupt bewegen soll). //Damit es keine Oszillation gibt, darf ich nicht gerade vorwaerts //geflossen sein. - BOOL bDummy; + sal_Bool bDummy; if ( !lcl_Prev( this ) && !bMovedFwd && ( bMoveable || ( bFly && !bTab ) ) && @@ -1464,13 +1464,13 @@ void SwCntntFrm::MakeAll() && MoveBwd( bDummy ) ) { SWREFRESHFN( this ) - bMovedBwd = TRUE; - bFormatted = FALSE; + bMovedBwd = sal_True; + bFormatted = sal_False; if ( bKeep && bMoveable ) { - if( CheckMoveFwd( bMakePage, FALSE, bMovedBwd ) ) + if( CheckMoveFwd( bMakePage, sal_False, bMovedBwd ) ) { - bMovedFwd = TRUE; + bMovedFwd = sal_True; bMoveable = IsMoveable(); SWREFRESHFN( this ) } @@ -1478,7 +1478,7 @@ void SwCntntFrm::MakeAll() MakePos(); if( aOldPos != (Frm().*fnRect->fnGetPos)() ) { - Prepare( PREP_POS_CHGD, (const void*)&bFormatted, FALSE ); + Prepare( PREP_POS_CHGD, (const void*)&bFormatted, sal_False ); if ( !bValidSize ) { (Frm().*fnRect->fnSetWidth)( (GetUpper()-> @@ -1488,11 +1488,11 @@ void SwCntntFrm::MakeAll() const long nOldW = (Prt().*fnRect->fnGetWidth)(); MakePrtArea( rAttrs ); if( nOldW != (Prt().*fnRect->fnGetWidth)() ) - Prepare( PREP_FIXSIZE_CHG, 0, FALSE ); + Prepare( PREP_FIXSIZE_CHG, 0, sal_False ); } if( GetFollow() ) - Prepare( PREP_WIDOWS_ORPHANS, 0, FALSE ); - bValidSize = bFormatted = TRUE; + Prepare( PREP_WIDOWS_ORPHANS, 0, sal_False ); + bValidSize = bFormatted = sal_True; Format(); } } @@ -1520,10 +1520,10 @@ void SwCntntFrm::MakeAll() { SwSectionFrm* pNxtSct = pNxt->FindSctFrm(); if( pNxtSct && pSct->IsAnFollow( pNxtSct ) ) - bValidPos = FALSE; + bValidPos = sal_False; } else - bValidPos = FALSE; + bValidPos = sal_False; } } } @@ -1545,7 +1545,7 @@ void SwCntntFrm::MakeAll() !GetDrawObjs() ) // <-- { - bValidPos = FALSE; + bValidPos = sal_False; MakePos(); aOldFrmPos = (Frm().*fnRect->fnGetPos)(); aOldPrtPos = (Prt().*fnRect->fnGetPos)(); @@ -1600,8 +1600,8 @@ void SwCntntFrm::MakeAll() } if ( pNxt ) { - const BOOL bMoveFwdInvalid = 0 != GetIndNext(); - const BOOL bNxtNew = + const sal_Bool bMoveFwdInvalid = 0 != GetIndNext(); + const sal_Bool bNxtNew = ( 0 == (pNxt->Prt().*fnRect->fnGetHeight)() ) && (!pNxt->IsTxtFrm() ||!((SwTxtFrm*)pNxt)->IsHiddenNow()); @@ -1613,7 +1613,7 @@ void SwCntntFrm::MakeAll() { if( bMovedFwd ) pNotify->SetInvaKeep(); - bMovedFwd = FALSE; + bMovedFwd = sal_False; } } } @@ -1649,8 +1649,8 @@ void SwCntntFrm::MakeAll() //Wenn ich nicht passe und nicht Spaltbar (WouldFit()) bin, so schicke //ich meinem TxtFrmanteil die Nachricht, dass eben falls moeglich //trotz des Attributes 'nicht aufspalten' aufgespalten werden muss. - BOOL bMoveOrFit = FALSE; - BOOL bDontMoveMe = !GetIndPrev(); + sal_Bool bMoveOrFit = sal_False; + sal_Bool bDontMoveMe = !GetIndPrev(); if( bDontMoveMe && IsInSct() ) { SwFtnBossFrm* pBoss = FindFtnBossFrm(); @@ -1659,10 +1659,10 @@ void SwCntntFrm::MakeAll() } // Finally, we are able to split table rows. Therefore, bDontMoveMe - // can be set to FALSE: + // can be set to sal_False: if( bDontMoveMe && IsInTab() && 0 != const_cast<SwCntntFrm*>(this)->GetNextCellLeaf( MAKEPAGE_NONE ) ) - bDontMoveMe = FALSE; + bDontMoveMe = sal_False; if ( bDontMoveMe && (Frm().*fnRect->fnGetHeight)() > (GetUpper()->Prt().*fnRect->fnGetHeight)() ) @@ -1671,12 +1671,12 @@ void SwCntntFrm::MakeAll() { SwTwips nTmp = (GetUpper()->Prt().*fnRect->fnGetHeight)() - (Prt().*fnRect->fnGetTop)(); - BOOL bSplit = !IsFwdMoveAllowed(); + sal_Bool bSplit = !IsFwdMoveAllowed(); if ( nTmp > 0 && WouldFit( nTmp, bSplit, sal_False ) ) { - Prepare( PREP_WIDOWS_ORPHANS, 0, FALSE ); - bValidSize = FALSE; - bFitPromise = TRUE; + Prepare( PREP_WIDOWS_ORPHANS, 0, sal_False ); + bValidSize = sal_False; + bFitPromise = sal_True; continue; } /* -----------------19.02.99 12:58------------------- @@ -1692,12 +1692,12 @@ void SwCntntFrm::MakeAll() else if ( !bFtn && bMoveable && ( !bFly || !FindFlyFrm()->IsColLocked() ) && ( !bSct || !FindSctFrm()->IsColLocked() ) ) - bMoveOrFit = TRUE; + bMoveOrFit = sal_True; } #ifdef DBG_UTIL else { - ASSERT( FALSE, "+TxtFrm hat WouldFit-Versprechen nicht eingehalten." ); + ASSERT( sal_False, "+TxtFrm hat WouldFit-Versprechen nicht eingehalten." ); } #endif } @@ -1716,13 +1716,13 @@ void SwCntntFrm::MakeAll() pOldUp->GetUpper()->GetUpper()->IsSctFrm() && ( pPre || pOldUp->GetUpper()->GetPrev() ) && ((SwSectionFrm*)pOldUp->GetUpper()->GetUpper())->MoveAllowed(this) ) - bMovedFwd = FALSE; + bMovedFwd = sal_False; const sal_Bool bCheckForGrownBody = pOldUp->IsBodyFrm(); const long nOldBodyHeight = (pOldUp->Frm().*fnRect->fnGetHeight)(); - if ( !bMovedFwd && !MoveFwd( bMakePage, FALSE ) ) - bMakePage = FALSE; + if ( !bMovedFwd && !MoveFwd( bMakePage, sal_False ) ) + bMakePage = sal_False; SWREFRESHFN( this ) // If MoveFwd moves the paragraph to the next page, a following @@ -1733,19 +1733,19 @@ void SwCntntFrm::MakeAll() // Therefore we only check for growing body frames. if ( bCheckForGrownBody && ! bMovedBwd && pOldUp != GetUpper() && (pOldUp->Frm().*fnRect->fnGetHeight)() > nOldBodyHeight ) - bMovedFwd = FALSE; + bMovedFwd = sal_False; else - bMovedFwd = TRUE; + bMovedFwd = sal_True; - bFormatted = FALSE; + bFormatted = sal_False; if ( bMoveOrFit && GetUpper() == pOldUp ) { // FME 2007-08-30 #i81146# new loop control if ( nConsequetiveFormatsWithoutChange <= cnStopFormat ) { - Prepare( PREP_MUST_FIT, 0, FALSE ); - bValidSize = FALSE; - bMustFit = TRUE; + Prepare( PREP_MUST_FIT, 0, sal_False ); + bValidSize = sal_False; + bMustFit = sal_True; continue; } @@ -1794,7 +1794,7 @@ void SwCntntFrm::MakeAll() pNotify->SetInvalidatePrevPrtArea(); } delete pNotify; - SetFlyLock( FALSE ); + SetFlyLock( sal_False ); } /************************************************************************* @@ -1815,10 +1815,10 @@ void MakeNxt( SwFrm *pFrm, SwFrm *pNxt ) //Der erste Versuch, der Abbruch mit pFrm = 0 wenn !Valid, //fuehrt leider zu dem Problem, dass das Keep dann u.U. nicht mehr //korrekt beachtet wird (27417) - const BOOL bOldPos = pFrm->GetValidPosFlag(); - const BOOL bOldSz = pFrm->GetValidSizeFlag(); - const BOOL bOldPrt = pFrm->GetValidPrtAreaFlag(); - pFrm->bValidPos = pFrm->bValidPrtArea = pFrm->bValidSize = TRUE; + const sal_Bool bOldPos = pFrm->GetValidPosFlag(); + const sal_Bool bOldSz = pFrm->GetValidSizeFlag(); + const sal_Bool bOldPrt = pFrm->GetValidPrtAreaFlag(); + pFrm->bValidPos = pFrm->bValidPrtArea = pFrm->bValidSize = sal_True; //fix(29272): Nicht MakeAll rufen, dort wird evtl. pFrm wieder invalidert //und kommt rekursiv wieder herein. @@ -1860,7 +1860,7 @@ void MakeNxt( SwFrm *pFrm, SwFrm *pNxt ) // Diese Routine ueberprueft, ob zwischen dem FtnBoss von pFrm und dem // von pNxt keine anderen FtnBosse liegen -BOOL lcl_IsNextFtnBoss( const SwFrm *pFrm, const SwFrm* pNxt ) +sal_Bool lcl_IsNextFtnBoss( const SwFrm *pFrm, const SwFrm* pNxt ) { ASSERT( pFrm && pNxt, "lcl_IsNextFtnBoss: No Frames?" ); pFrm = pFrm->FindFtnBossFrm(); @@ -1876,9 +1876,9 @@ BOOL lcl_IsNextFtnBoss( const SwFrm *pFrm, const SwFrm* pNxt ) } // --> OD 2007-11-26 #b6614158# -BOOL SwCntntFrm::_WouldFit( SwTwips nSpace, +sal_Bool SwCntntFrm::_WouldFit( SwTwips nSpace, SwLayoutFrm *pNewUpper, - BOOL bTstMove, + sal_Bool bTstMove, const bool bObjsInNewUpper ) // <-- { @@ -1890,12 +1890,12 @@ BOOL SwCntntFrm::_WouldFit( SwTwips nSpace, if ( IsInFtn() ) { if( !lcl_IsNextFtnBoss( pNewUpper, this ) ) - return TRUE; + return sal_True; pFtnFrm = FindFtnFrm(); } - BOOL bRet; - BOOL bSplit = !pNewUpper->Lower(); + sal_Bool bRet; + sal_Bool bSplit = !pNewUpper->Lower(); SwCntntFrm *pFrm = this; const SwFrm *pTmpPrev = pNewUpper->Lower(); if( pTmpPrev && pTmpPrev->IsFtnFrm() ) @@ -1907,7 +1907,7 @@ BOOL SwCntntFrm::_WouldFit( SwTwips nSpace, // --> FME 2005-03-31 #b6236853# #i46181# SwTwips nSecondCheck = 0; SwTwips nOldSpace = nSpace; - BOOL bOldSplit = bSplit; + sal_Bool bOldSplit = bSplit; // <-- if ( bTstMove || IsInFly() || ( IsInSct() && @@ -1940,7 +1940,7 @@ BOOL SwCntntFrm::_WouldFit( SwTwips nSpace, ) ) { - bTstMove = TRUE; + bTstMove = sal_True; bRet = ((SwTxtFrm*)pFrm)->TestFormat( pTmpPrev, nSpace, bSplit ); } else @@ -2008,7 +2008,7 @@ BOOL SwCntntFrm::_WouldFit( SwTwips nSpace, if ( nSpace < 0 ) { - bRet = FALSE; + bRet = sal_False; // --> FME 2005-03-31 #b6236853# #i46181# if ( nSecondCheck > 0 ) @@ -2025,8 +2025,8 @@ BOOL SwCntntFrm::_WouldFit( SwTwips nSpace, const bool bSecondRet = nOldSpace >= 0 && pFrm->WouldFit( nOldSpace, bOldSplit, sal_False ); if ( bSecondRet && bOldSplit && nOldSpace >= 0 ) { - bRet = TRUE; - bSplit = TRUE; + bRet = sal_True; + bSplit = sal_True; } } // <-- @@ -2040,7 +2040,7 @@ BOOL SwCntntFrm::_WouldFit( SwTwips nSpace, nSpace -= rAttrs.GetULSpace().GetLower(); if ( nSpace < 0 ) { - bRet = FALSE; + bRet = sal_False; } } @@ -2054,11 +2054,11 @@ BOOL SwCntntFrm::_WouldFit( SwTwips nSpace, } // OD 11.04.2003 #108824# - If last follow frame of <this> text // frame isn't valid, a formatting of the next content frame - // doesn't makes sense. Thus, return TRUE. + // doesn't makes sense. Thus, return sal_True. if ( IsAnFollow( pFrm ) && !pFrm->IsValid() ) { ASSERT( false, "Only a warning for task 108824:/n<SwCntntFrm::_WouldFit(..) - follow not valid!" ); - return TRUE; + return sal_True; } } SwFrm *pNxt; @@ -2073,7 +2073,7 @@ BOOL SwCntntFrm::_WouldFit( SwTwips nSpace, if ( bTstMove && ( pNxt->GetDrawObjs() || bObjsInNewUpper ) ) { - return TRUE; + return sal_True; } // <-- |