diff options
author | Hans-Joachim Lankenau <hjs@openoffice.org> | 2003-09-25 09:49:24 +0000 |
---|---|---|
committer | Hans-Joachim Lankenau <hjs@openoffice.org> | 2003-09-25 09:49:24 +0000 |
commit | ba6505bac4cca740be13f15152134e2aeb39cf96 (patch) | |
tree | 48d65700753e857d981c7842bc1dc169c5ea7514 /sw | |
parent | 75b3f49d2d792ab027f11218c2bfb28252f22e42 (diff) |
INTEGRATION: CWS os20 (1.47.16); FILE MERGED
2003/09/12 13:39:31 fme 1.47.16.2: #111937# Keep attribute, widows and orphans in balanced sections - made fix safer
2003/09/12 12:27:16 fme 1.47.16.1: #111937# Keep attribute, widows and orphans in balanced sections
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/layout/fly.cxx | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index 1c7bb7d08501..c8cab5ff92d1 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -2,9 +2,9 @@ * * $RCSfile: fly.cxx,v $ * - * $Revision: 1.48 $ + * $Revision: 1.49 $ * - * last change: $Author: rt $ $Date: 2003-09-19 10:56:24 $ + * last change: $Author: hjs $ $Date: 2003-09-25 10:49:24 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -93,6 +93,9 @@ #ifndef _SVX_FRMDIRITEM_HXX #include <svx/frmdiritem.hxx> #endif +#ifndef _SVX_KEEPITEM_HXX //autogen +#include <svx/keepitem.hxx> +#endif #ifndef _FMTANCHR_HXX //autogen #include <fmtanchr.hxx> @@ -1426,16 +1429,26 @@ void CalcCntnt( SwLayoutFrm *pLay, // OD 14.03.2003 #i11760# - forbid format of follow, if requested. if ( bNoCalcFollow && pFrm->IsTxtFrm() ) static_cast<SwTxtFrm*>(pFrm)->ForbidFollowFormat(); + pFrm->Calc(); + // OD 14.03.2003 #i11760# - reset control flag for follow format. if ( pFrm->IsTxtFrm() ) { static_cast<SwTxtFrm*>(pFrm)->AllowFollowFormat(); } + // #111937# The keep-attribute can cause the position + // of the prev to be invalid: + SwFrm* pTmpPrev = pFrm->FindPrev(); + bool bPrevInvalid = pTmpPrev && + !pTmpPrev->GetValidPosFlag() && + pTmpPrev->GetAttrSet()->GetKeep().GetValue() && + pLay->IsAnLower( pTmpPrev ); + //Dumm aber wahr, die Flys muessen mitkalkuliert werden. BOOL bAgain = FALSE; - if ( pFrm->GetDrawObjs() && pLay->IsAnLower( pFrm ) ) + if ( !bPrevInvalid && pFrm->GetDrawObjs() && pLay->IsAnLower( pFrm ) ) { USHORT nCnt = pFrm->GetDrawObjs()->Count(); for ( USHORT i = 0; i < nCnt; ++i ) @@ -1505,8 +1518,8 @@ void CalcCntnt( SwLayoutFrm *pLay, ((SwTabFrm*)pFrm)->bLockBackMove = FALSE; } - pFrm = pFrm->FindNext(); - if( pFrm && pFrm->IsSctFrm() && pSect ) + pFrm = bPrevInvalid ? pTmpPrev : pFrm->FindNext(); + if( !bPrevInvalid && pFrm && pFrm->IsSctFrm() && pSect ) { // Es koennen hier leere SectionFrms herumspuken while( pFrm && pFrm->IsSctFrm() && !((SwSectionFrm*)pFrm)->GetSection() ) |