diff options
Diffstat (limited to 'sw/source/core/layout/wsfrm.cxx')
-rw-r--r-- | sw/source/core/layout/wsfrm.cxx | 186 |
1 files changed, 55 insertions, 131 deletions
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index 6a375f09b914..703c7d4cfc46 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,7 +29,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include <hintids.hxx> #include <hints.hxx> #include <tools/pstm.hxx> @@ -85,9 +85,6 @@ using namespace ::com::sun::star; |* |* SwFrm::SwFrm() |* -|* Ersterstellung AK 12-Feb-1991 -|* Letzte Aenderung MA 05. Apr. 94 -|* |*************************************************************************/ SwFrm::SwFrm( SwModify *pMod, SwFrm* pSib ) : @@ -106,11 +103,11 @@ SwFrm::SwFrm( SwModify *pMod, SwFrm* pSib ) : , bInfFtn ( sal_False ) , bInfSct ( sal_False ) { -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 1 bFlag01 = bFlag02 = bFlag03 = bFlag04 = bFlag05 = 0; #endif - ASSERT( pMod, "Kein Frameformat uebergeben." ); + OSL_ENSURE( pMod, "Kein Frameformat uebergeben." ); bInvalidR2L = bInvalidVert = 1; //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin bDerivedR2L = bDerivedVert = bRightToLeft = bVertical = bReverse = bVertLR = 0; @@ -356,7 +353,7 @@ void SwFrm::_UpdateAttrFrm( const SfxPoolItem *pOld, const SfxPoolItem *pNew, break; } case RES_COL: - ASSERT( sal_False, "Spalten fuer neuen FrmTyp?" ); + OSL_FAIL( "Spalten fuer neuen FrmTyp?" ); break; default: @@ -367,8 +364,6 @@ void SwFrm::_UpdateAttrFrm( const SfxPoolItem *pOld, const SfxPoolItem *pNew, /************************************************************************* |* |* SwFrm::Prepare() -|* Ersterstellung MA 13. Apr. 93 -|* Letzte Aenderung MA 26. Jun. 96 |* |*************************************************************************/ void SwFrm::Prepare( const PrepareHint, const void *, sal_Bool ) @@ -382,8 +377,6 @@ void SwFrm::Prepare( const PrepareHint, const void *, sal_Bool ) |* Beschreibung: Invalidiert die Seite, in der der Frm gerade steht. |* Je nachdem ob es ein Layout, Cntnt oder FlyFrm ist wird die Seite |* entsprechend Invalidiert. -|* Ersterstellung MA 22. Jul. 92 -|* Letzte Aenderung MA 14. Oct. 94 |* |*************************************************************************/ void SwFrm::InvalidatePage( const SwPageFrm *pPage ) const @@ -500,9 +493,6 @@ void SwFrm::InvalidatePage( const SwPageFrm *pPage ) const |* |* SwFrm::ChgSize() |* -|* Ersterstellung AK 15-Feb-1991 -|* Letzte Aenderung MA 18. Nov. 98 -|* |*************************************************************************/ Size SwFrm::ChgSize( const Size& aNewSize ) { @@ -585,13 +575,12 @@ Size SwFrm::ChgSize( const Size& aNewSize ) |* Eingefuegt wird unterhalb des Parent und entweder |* vor pBehind oder am Ende der Kette wenn pBehind |* leer ist. -|* Letzte Aenderung MA 06. Aug. 99 |* |*************************************************************************/ void SwFrm::InsertBefore( SwLayoutFrm* pParent, SwFrm* pBehind ) { - ASSERT( pParent, "Kein Parent fuer Insert." ); - ASSERT( (!pBehind || (pBehind && pParent == pBehind->GetUpper())), + OSL_ENSURE( pParent, "Kein Parent fuer Insert." ); + OSL_ENSURE( (!pBehind || (pBehind && pParent == pBehind->GetUpper())), "Framebaum inkonsistent." ); pUpper = pParent; @@ -626,13 +615,12 @@ void SwFrm::InsertBefore( SwLayoutFrm* pParent, SwFrm* pBehind ) |* Eingefuegt wird unterhalb des Parent und entweder |* hinter pBefore oder am Anfang der Kette wenn pBefore |* leer ist. -|* Letzte Aenderung MA 06. Aug. 99 |* |*************************************************************************/ void SwFrm::InsertBehind( SwLayoutFrm *pParent, SwFrm *pBefore ) { - ASSERT( pParent, "Kein Parent fuer Insert." ); - ASSERT( (!pBefore || (pBefore && pParent == pBefore->GetUpper())), + OSL_ENSURE( pParent, "Kein Parent fuer Insert." ); + OSL_ENSURE( (!pBefore || (pBefore && pParent == pBefore->GetUpper())), "Framebaum inkonsistent." ); pUpper = pParent; @@ -660,7 +648,6 @@ void SwFrm::InsertBehind( SwLayoutFrm *pParent, SwFrm *pBefore ) |* |* Beschreibung Eine Kette von SwFrms wird in eine bestehende Struktur |* eingefuegt -|* Letzte Aenderung AMA 9. Dec. 97 |* |* Bisher wird dies genutzt, um einen SectionFrame, der ggf. schon Geschwister |* mit sich bringt, in eine bestehende Struktur einzufuegen. @@ -680,9 +667,9 @@ void SwFrm::InsertBehind( SwLayoutFrm *pParent, SwFrm *pBefore ) |*************************************************************************/ void SwFrm::InsertGroupBefore( SwFrm* pParent, SwFrm* pBehind, SwFrm* pSct ) { - ASSERT( pParent, "Kein Parent fuer Insert." ); - ASSERT( (!pBehind || (pBehind && ( pParent == pBehind->GetUpper()) - || ( pParent->IsSctFrm() && pBehind->GetUpper()->IsColBodyFrm() ) ) ), + OSL_ENSURE( pParent, "Kein Parent fuer Insert." ); + OSL_ENSURE( (!pBehind || ( (pBehind && (pParent == pBehind->GetUpper())) + || ((pParent->IsSctFrm() && pBehind->GetUpper()->IsColBodyFrm())) ) ), "Framebaum inkonsistent." ); if( pSct ) { @@ -724,9 +711,9 @@ void SwFrm::InsertGroupBefore( SwFrm* pParent, SwFrm* pBehind, SwFrm* pSct ) SwLayoutFrm* pTmp = (SwLayoutFrm*)pSct; if( pTmp->Lower() ) { - ASSERT( pTmp->Lower()->IsColumnFrm(), "InsertGrp: Used SectionFrm" ); + OSL_ENSURE( pTmp->Lower()->IsColumnFrm(), "InsertGrp: Used SectionFrm" ); pTmp = (SwLayoutFrm*)((SwLayoutFrm*)pTmp->Lower())->Lower(); - ASSERT( pTmp, "InsertGrp: Missing ColBody" ); + OSL_ENSURE( pTmp, "InsertGrp: Missing ColBody" ); } pBehind->pUpper = pTmp; pBehind->GetUpper()->pLower = pBehind; @@ -739,7 +726,7 @@ void SwFrm::InsertGroupBefore( SwFrm* pParent, SwFrm* pBehind, SwFrm* pSct ) } else { - ASSERT( pSct->IsSctFrm(), "InsertGroup: For SectionFrms only" ); + OSL_ENSURE( pSct->IsSctFrm(), "InsertGroup: For SectionFrms only" ); delete ((SwSectionFrm*)pSct); } } @@ -780,20 +767,17 @@ void SwFrm::InsertGroupBefore( SwFrm* pParent, SwFrm* pBehind, SwFrm* pSct ) |* |* SwFrm::Remove() |* -|* Ersterstellung AK 01-Mar-1991 -|* Letzte Aenderung MA 07. Dec. 95 -|* |*************************************************************************/ void SwFrm::Remove() { - ASSERT( pUpper, "Removen ohne Upper?" ); + OSL_ENSURE( pUpper, "Removen ohne Upper?" ); if( pPrev ) // einer aus der Mitte wird removed pPrev->pNext = pNext; else { // der erste in einer Folge wird removed - ASSERT( pUpper->pLower == this, "Layout inkonsistent." ); + OSL_ENSURE( pUpper->pLower == this, "Layout inkonsistent." ); pUpper->pLower = pNext; } if( pNext ) @@ -807,20 +791,17 @@ void SwFrm::Remove() |* |* SwCntntFrm::Paste() |* -|* Ersterstellung MA 23. Feb. 94 -|* Letzte Aenderung MA 09. Sep. 98 -|* |*************************************************************************/ void SwCntntFrm::Paste( SwFrm* pParent, SwFrm* pSibling) { - ASSERT( pParent, "Kein Parent fuer Paste." ); - ASSERT( pParent->IsLayoutFrm(), "Parent ist CntntFrm." ); - ASSERT( pParent != this, "Bin selbst der Parent." ); - ASSERT( pSibling != this, "Bin mein eigener Nachbar." ); - ASSERT( !GetPrev() && !GetNext() && !GetUpper(), + OSL_ENSURE( pParent, "Kein Parent fuer Paste." ); + OSL_ENSURE( pParent->IsLayoutFrm(), "Parent ist CntntFrm." ); + OSL_ENSURE( pParent != this, "Bin selbst der Parent." ); + OSL_ENSURE( pSibling != this, "Bin mein eigener Nachbar." ); + OSL_ENSURE( !GetPrev() && !GetNext() && !GetUpper(), "Bin noch irgendwo angemeldet." ); - ASSERT( !pSibling || pSibling->IsFlowFrm(), - "<SwCntntFrm::Paste(..)> - sibling not of expected type." ) + OSL_ENSURE( !pSibling || pSibling->IsFlowFrm(), + "<SwCntntFrm::Paste(..)> - sibling not of expected type." ); //In den Baum einhaengen. InsertBefore( (SwLayoutFrm*)pParent, pSibling ); @@ -915,13 +896,10 @@ void SwCntntFrm::Paste( SwFrm* pParent, SwFrm* pSibling) |* |* SwCntntFrm::Cut() |* -|* Ersterstellung AK 14-Feb-1991 -|* Letzte Aenderung MA 09. Sep. 98 -|* |*************************************************************************/ void SwCntntFrm::Cut() { - ASSERT( GetUpper(), "Cut ohne Upper()." ); + OSL_ENSURE( GetUpper(), "Cut ohne Upper()." ); SwPageFrm *pPage = FindPageFrm(); InvalidatePage( pPage ); @@ -1059,7 +1037,6 @@ void SwCntntFrm::Cut() { // --> OD 2006-09-25 #b6448963# // prevent delete of <ColLocked> footnote frame -// if( pUp->IsFtnFrm() ) if ( pUp->IsFtnFrm() && !pUp->IsColLocked()) // <-- { @@ -1075,7 +1052,6 @@ void SwCntntFrm::Cut() else { // --> OD 2006-09-25 #b6448963# -// if ( pSct->IsColLocked() || !pSct->IsInFtn() ) if ( pSct->IsColLocked() || !pSct->IsInFtn() || ( pUp->IsFtnFrm() && pUp->IsColLocked() ) ) // <-- @@ -1108,17 +1084,14 @@ void SwCntntFrm::Cut() |* |* SwLayoutFrm::Paste() |* -|* Ersterstellung MA 23. Feb. 94 -|* Letzte Aenderung MA 23. Feb. 94 -|* |*************************************************************************/ void SwLayoutFrm::Paste( SwFrm* pParent, SwFrm* pSibling) { - ASSERT( pParent, "Kein Parent fuer Paste." ); - ASSERT( pParent->IsLayoutFrm(), "Parent ist CntntFrm." ); - ASSERT( pParent != this, "Bin selbst der Parent." ); - ASSERT( pSibling != this, "Bin mein eigener Nachbar." ); - ASSERT( !GetPrev() && !GetNext() && !GetUpper(), + OSL_ENSURE( pParent, "Kein Parent fuer Paste." ); + OSL_ENSURE( pParent->IsLayoutFrm(), "Parent ist CntntFrm." ); + OSL_ENSURE( pParent != this, "Bin selbst der Parent." ); + OSL_ENSURE( pSibling != this, "Bin mein eigener Nachbar." ); + OSL_ENSURE( !GetPrev() && !GetNext() && !GetUpper(), "Bin noch irgendwo angemeldet." ); //In den Baum einhaengen. @@ -1216,9 +1189,6 @@ void SwLayoutFrm::Paste( SwFrm* pParent, SwFrm* pSibling) |* |* SwLayoutFrm::Cut() |* -|* Ersterstellung MA 23. Feb. 94 -|* Letzte Aenderung MA 23. Feb. 94 -|* |*************************************************************************/ void SwLayoutFrm::Cut() { @@ -1281,13 +1251,10 @@ void SwLayoutFrm::Cut() |* |* SwFrm::Grow() |* -|* Ersterstellung AK 19-Feb-1991 -|* Letzte Aenderung MA 05. May. 94 -|* |*************************************************************************/ SwTwips SwFrm::Grow( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) { - ASSERT( nDist >= 0, "Negatives Wachstum?" ); + OSL_ENSURE( nDist >= 0, "Negatives Wachstum?" ); PROTOCOL_ENTER( this, bTst ? PROT_GROW_TST : PROT_GROW, 0, &nDist ) @@ -1333,13 +1300,10 @@ SwTwips SwFrm::Grow( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) |* |* SwFrm::Shrink() |* -|* Ersterstellung AK 14-Feb-1991 -|* Letzte Aenderung MA 05. May. 94 -|* |*************************************************************************/ SwTwips SwFrm::Shrink( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) { - ASSERT( nDist >= 0, "Negative Verkleinerung?" ); + OSL_ENSURE( nDist >= 0, "Negative Verkleinerung?" ); PROTOCOL_ENTER( this, bTst ? PROT_SHRINK_TST : PROT_SHRINK, 0, &nDist ) @@ -1404,9 +1368,6 @@ SwTwips SwFrm::Shrink( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) |* |* Parameter: nDiff ist der Betrag, um den Platz geschaffen werden muss |* -|* Ersterstellung MA 07. May. 92 -|* Letzte Aenderung AMA 02. Nov. 98 -|* |*************************************************************************/ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, sal_Bool bTst ) { @@ -1676,14 +1637,14 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, sal_Bool bTst ) if( ( IsHeaderFrm() || IsFooterFrm() ) && pBoss->GetDrawObjs() ) { const SwSortedObjs &rObjs = *pBoss->GetDrawObjs(); - ASSERT( pBoss->IsPageFrm(), "Header/Footer out of page?" ); + OSL_ENSURE( pBoss->IsPageFrm(), "Header/Footer out of page?" ); for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i ) { SwAnchoredObject* pAnchoredObj = rObjs[i]; if ( pAnchoredObj->ISA(SwFlyFrm) ) { SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pAnchoredObj); - ASSERT( !pFly->IsFlyInCntFrm(), "FlyInCnt at Page?" ); + OSL_ENSURE( !pFly->IsFlyInCntFrm(), "FlyInCnt at Page?" ); const SwFmtVertOrient &rVert = pFly->GetFmt()->GetVertOrient(); // Wann muss invalidiert werden? @@ -1712,9 +1673,6 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, sal_Bool bTst ) |* SwFrm::ImplInvalidateSize(), ImplInvalidatePrt(), ImplInvalidatePos(), |* ImplInvalidateLineNum() |* -|* Ersterstellung MA 15. Oct. 92 -|* Letzte Aenderung MA 24. Mar. 94 -|* |*************************************************************************/ /** method to perform additional actions on an invalidation @@ -1793,7 +1751,7 @@ void SwFrm::ImplInvalidateLineNum() if ( _InvalidationAllowed( INVALID_LINENUM ) ) { bValidLineNum = sal_False; - ASSERT( IsTxtFrm(), "line numbers are implemented for text only" ); + OSL_ENSURE( IsTxtFrm(), "line numbers are implemented for text only" ); InvalidatePage(); // OD 2004-05-19 #i28701# @@ -1805,9 +1763,6 @@ void SwFrm::ImplInvalidateLineNum() |* |* SwFrm::ReinitializeFrmSizeAttrFlags |* -|* Ersterstellung MA 15. Oct. 96 -|* Letzte Aenderung MA 15. Oct. 96 -|* |*************************************************************************/ void SwFrm::ReinitializeFrmSizeAttrFlags() { @@ -1902,9 +1857,6 @@ void SwFrm::ValidateThisAndAllLowers( const sal_uInt16 nStage ) |* |* SwCntntFrm::GrowFrm() |* -|* Ersterstellung MA 30. Jul. 92 -|* Letzte Aenderung MA 25. Mar. 99 -|* |*************************************************************************/ SwTwips SwCntntFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) { @@ -2017,15 +1969,12 @@ SwTwips SwCntntFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) |* |* SwCntntFrm::ShrinkFrm() |* -|* Ersterstellung MA 30. Jul. 92 -|* Letzte Aenderung MA 05. May. 94 -|* |*************************************************************************/ SwTwips SwCntntFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) { SWRECTFN( this ) - ASSERT( nDist >= 0, "nDist < 0" ); - ASSERT( nDist <= (Frm().*fnRect->fnGetHeight)(), + OSL_ENSURE( nDist >= 0, "nDist < 0" ); + OSL_ENSURE( nDist <= (Frm().*fnRect->fnGetHeight)(), "nDist > als aktuelle Grosse." ); if ( !bTst ) @@ -2140,10 +2089,6 @@ SwTwips SwCntntFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) |* |* SwCntntFrm::Modify() |* -|* Beschreibung -|* Ersterstellung AK 05-Mar-1991 -|* Letzte Aenderung MA 13. Oct. 95 -|* |*************************************************************************/ void SwCntntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) { @@ -2373,9 +2318,6 @@ void SwCntntFrm::_UpdateAttr( const SfxPoolItem* pOld, const SfxPoolItem* pNew, |* |* SwLayoutFrm::SwLayoutFrm() |* -|* Ersterstellung AK 14-Feb-1991 -|* Letzte Aenderung MA 12. May. 95 -|* |*************************************************************************/ SwLayoutFrm::SwLayoutFrm( SwFrmFmt* pFmt, SwFrm* pSib ): SwFrm( pFmt, pSib ), @@ -2389,7 +2331,7 @@ SwLayoutFrm::SwLayoutFrm( SwFrmFmt* pFmt, SwFrm* pSib ): // --> OD 2004-06-29 #i28701# TYPEINIT1(SwLayoutFrm,SwFrm); // <-- -/*-----------------10.06.99 09:42------------------- +/*-------------------------------------------------- * SwLayoutFrm::InnerHeight() * --------------------------------------------------*/ @@ -2435,9 +2377,6 @@ SwTwips SwLayoutFrm::InnerHeight() const |* |* SwLayoutFrm::GrowFrm() |* -|* Ersterstellung MA 30. Jul. 92 -|* Letzte Aenderung MA 23. Sep. 96 -|* |*************************************************************************/ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) { @@ -2604,9 +2543,6 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) |* |* SwLayoutFrm::ShrinkFrm() |* -|* Ersterstellung MA 30. Jul. 92 -|* Letzte Aenderung MA 25. Mar. 99 -|* |*************************************************************************/ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) { @@ -2616,7 +2552,7 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) if( !(GetType() & nTmpType) && HasFixSize() ) return 0; - ASSERT( nDist >= 0, "nDist < 0" ); + OSL_ENSURE( nDist >= 0, "nDist < 0" ); SWRECTFN( this ) SwTwips nFrmHeight = (Frm().*fnRect->fnGetHeight)(); if ( nDist > nFrmHeight ) @@ -2674,7 +2610,7 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin if( bChgPos && !IsVertLR() ) Frm().Pos().X() += nRealDist - nReal; - ASSERT( !IsAccessibleFrm(), "bMoveAccFrm has to be set!" ); + OSL_ENSURE( !IsAccessibleFrm(), "bMoveAccFrm has to be set!" ); } } } @@ -2688,7 +2624,7 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin if( bChgPos && !IsVertLR() ) Frm().Pos().X() += nTmp - nReal; - ASSERT( !IsAccessibleFrm(), "bMoveAccFrm has to be set!" ); + OSL_ENSURE( !IsAccessibleFrm(), "bMoveAccFrm has to be set!" ); nReal = nTmp; } } @@ -2786,8 +2722,6 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) |* PrtArea des Frm's. |* Die Variablen Frm's werden auch proportional angepasst; sie werden |* sich schon wieder zurechtwachsen/-schrumpfen. -|* Ersterstellung MA 11.03.92 -|* Letzte Aenderung AMA 2. Nov. 98 |* |*************************************************************************/ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize ) @@ -3077,7 +3011,7 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize ) ( IsColumnFrm() && IsInSct() ) ) { - ASSERT( pLowerFrm->IsBodyFrm() || pLowerFrm->IsFtnContFrm(), + OSL_ENSURE( pLowerFrm->IsBodyFrm() || pLowerFrm->IsFtnContFrm(), "ChgLowersProp - only for body or foot note container" ); if ( pLowerFrm->IsBodyFrm() || pLowerFrm->IsFtnContFrm() ) { @@ -3089,7 +3023,7 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize ) if ( nNewHeight < 0) { // OD 01.04.2003 #108446# - adjust assertion condition and text - ASSERT( !( IsPageFrm() && + OSL_ENSURE( !( IsPageFrm() && (pLowerFrm->Frm().Height()>0) && (pLowerFrm->IsValid()) ), "ChgLowersProg - negative height for lower."); @@ -3169,12 +3103,12 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize ) const SwFmtCol* pColAttr = NULL; if ( IsPageBodyFrm() ) { - ASSERT( GetUpper()->IsPageFrm(), "Upper is not page frame" ) + OSL_ENSURE( GetUpper()->IsPageFrm(), "Upper is not page frame" ); pColAttr = &GetUpper()->GetFmt()->GetCol(); } else { - ASSERT( IsFlyFrm() || IsSctFrm(), "Columns not in fly or section" ) + OSL_ENSURE( IsFlyFrm() || IsSctFrm(), "Columns not in fly or section" ); pColAttr = &GetFmt()->GetCol(); } @@ -3189,13 +3123,11 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize ) |* |* Beschreibung: "Formatiert" den Frame; Frm und PrtArea. |* Die Fixsize wird hier nicht eingestellt. -|* Ersterstellung MA 28. Jul. 92 -|* Letzte Aenderung MA 21. Mar. 95 |* |*************************************************************************/ void SwLayoutFrm::Format( const SwBorderAttrs *pAttrs ) { - ASSERT( pAttrs, "LayoutFrm::Format, pAttrs ist 0." ); + OSL_ENSURE( pAttrs, "LayoutFrm::Format, pAttrs ist 0." ); if ( bValidPrtArea && bValidSize ) return; @@ -3282,13 +3214,10 @@ void SwLayoutFrm::Format( const SwBorderAttrs *pAttrs ) |* |* SwLayoutFrm::InvalidatePercentLowers() |* -|* Ersterstellung MA 13. Jun. 96 -|* Letzte Aenderung MA 13. Jun. 96 -|* |*************************************************************************/ static void InvaPercentFlys( SwFrm *pFrm, SwTwips nDiff ) { - ASSERT( pFrm->GetDrawObjs(), "Can't find any Objects" ); + OSL_ENSURE( pFrm->GetDrawObjs(), "Can't find any Objects" ); for ( sal_uInt16 i = 0; i < pFrm->GetDrawObjs()->Count(); ++i ) { SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i]; @@ -3334,7 +3263,7 @@ void SwLayoutFrm::InvaPercentLowers( SwTwips nDiff ) if ( pFrm->IsInTab() && !IsTabFrm() ) { SwFrm *pTmp = pFrm->FindTabFrm(); - ASSERT( pTmp, "Where's my TabFrm?" ); + OSL_ENSURE( pTmp, "Where's my TabFrm?" ); if( IsAnLower( pTmp ) ) pFrm = pTmp; } @@ -3355,9 +3284,6 @@ void SwLayoutFrm::InvaPercentLowers( SwTwips nDiff ) |* |* SwLayoutFrm::CalcRel() |* -|* Ersterstellung MA 13. Jun. 96 -|* Letzte Aenderung MA 10. Oct. 96 -|* |*************************************************************************/ long SwLayoutFrm::CalcRel( const SwFmtFrmSize &rSz, sal_Bool ) const { @@ -3390,7 +3316,7 @@ long MA_FASTCALL lcl_CalcMinColDiff( SwLayoutFrm *pLayFrm ) { long nDiff = 0, nFirstDiff = 0; SwLayoutFrm *pCol = (SwLayoutFrm*)pLayFrm->Lower(); - ASSERT( pCol, "Where's the columnframe?" ); + OSL_ENSURE( pCol, "Where's the columnframe?" ); SwFrm *pFrm = pCol->Lower(); do { @@ -3606,7 +3532,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs, ::CalcCntnt( this ); pCol = (SwLayoutFrm*)Lower(); - ASSERT( pCol && pCol->GetNext(), ":-( Spalten auf Urlaub?"); + OSL_ENSURE( pCol && pCol->GetNext(), ":-( Spalten auf Urlaub?"); // bMinDiff wird gesetzt, wenn es keine leere Spalte gibt sal_Bool bMinDiff = sal_True; // OD 28.03.2003 #108446# - check for all column content and all columns @@ -3640,7 +3566,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs, { bFoundLower = sal_True; pLay = (SwLayoutFrm*)pLay->GetNext(); - ASSERT( pLay->IsFtnContFrm(),"FtnContainer exspected" ); + OSL_ENSURE( pLay->IsFtnContFrm(),"FtnContainer exspected" ); nInnerHeight += pLay->InnerHeight(); nInnerHeight += (pLay->Frm().*fnRect->fnGetHeight)() - (pLay->Prt().*fnRect->fnGetHeight)(); @@ -3823,9 +3749,6 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs, |* |* SwRootFrm::InvalidateAllCntnt() |* -|* Ersterstellung MA 13. Feb. 98 -|* Letzte Aenderung MA 12. Aug. 00 -|* |*************************************************************************/ SwCntntFrm* lcl_InvalidateSection( SwFrm *pCnt, sal_uInt8 nInv ) @@ -3882,9 +3805,9 @@ void lcl_InvalidateCntnt( SwCntntFrm *pCnt, sal_uInt8 nInv ) if( pLastSctCnt == pCnt ) pLastSctCnt = NULL; } -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 1 else - ASSERT( !pLastSctCnt, "Where's the last SctCntnt?" ); + OSL_ENSURE( !pLastSctCnt, "Where's the last SctCntnt?" ); #endif } if( nInv & INV_TABLE ) @@ -3910,9 +3833,9 @@ void lcl_InvalidateCntnt( SwCntntFrm *pCnt, sal_uInt8 nInv ) pLastSctCnt = NULL; } } -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 1 else - ASSERT( !pLastTabCnt, "Where's the last TabCntnt?" ); + OSL_ENSURE( !pLastTabCnt, "Where's the last TabCntnt?" ); #endif } @@ -4036,3 +3959,4 @@ void SwRootFrm::InvalidateAllObjPos() } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |