summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/objectformattertxtfrm.cxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-11-09 12:47:58 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-11-09 12:47:58 +0000
commit17fccbb367683e3016c63722592f4ba992351055 (patch)
tree4dd0669bc6cdf34a63be10ed482693afd7d69592 /sw/source/core/layout/objectformattertxtfrm.cxx
parent796961f8e4671d7c0ade2b3f5195e83d8ceefe8d (diff)
INTEGRATION: CWS swqbugfixes08 (1.3.4); FILE MERGED
2004/09/24 07:15:35 od 1.3.4.2: #i34569# <SwObjectFormatterTxtFrm::DoFormatObjs()> - perform no action, if due to the object positioning an anchor frame is moved forward and the anchor frame has had no previous frame. 2004/09/23 09:23:58 od 1.3.4.1: #i33751# method <SwPageFrm& SwAnchoredObject::GetPageFrmOfAnchor()> is replaced by method <SwPageFrm* SwAnchoredObject::FindPageFrmOfAnchor()>
Diffstat (limited to 'sw/source/core/layout/objectformattertxtfrm.cxx')
-rw-r--r--sw/source/core/layout/objectformattertxtfrm.cxx44
1 files changed, 26 insertions, 18 deletions
diff --git a/sw/source/core/layout/objectformattertxtfrm.cxx b/sw/source/core/layout/objectformattertxtfrm.cxx
index 01805007a908..d04d4d390873 100644
--- a/sw/source/core/layout/objectformattertxtfrm.cxx
+++ b/sw/source/core/layout/objectformattertxtfrm.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: objectformattertxtfrm.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: obo $ $Date: 2004-09-09 10:58:18 $
+ * last change: $Author: hr $ $Date: 2004-11-09 13:47:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -265,19 +265,18 @@ bool SwObjectFormatterTxtFrm::DoFormatObjs()
text::WrapInfluenceOnPosition::NONE_CONCURRENT_POSITIONED,
nToPageNum );
}
- if ( pObj )
+ // --> OD 2004-09-24 #i34569# - if anchor frame didn't have a previous,
+ // no action can be performed.
+ if ( pObj && bDoesAnchorHadPrev )
{
// Object found, whose anchor is moved forward
- if ( bDoesAnchorHadPrev )
- {
- // Indicate that anchor text frame has to move forward and
- // invalidate its position to force a re-format.
- SwLayouter::InsertMovedFwdFrm( *(GetPageFrm().GetFmt()->GetDoc()),
- mrAnchorTxtFrm,
- nToPageNum );
- mrAnchorTxtFrm.InvalidatePos();
- }
+ // Indicate that anchor text frame has to move forward and
+ // invalidate its position to force a re-format.
+ SwLayouter::InsertMovedFwdFrm( *(GetPageFrm().GetFmt()->GetDoc()),
+ mrAnchorTxtFrm,
+ nToPageNum );
+ mrAnchorTxtFrm.InvalidatePos();
// Indicate restart of the layout process
bSuccess = false;
@@ -290,6 +289,7 @@ bool SwObjectFormatterTxtFrm::DoFormatObjs()
// layout process
_InvalidateFollowObjs( *pObj, true );
}
+ // <--
}
return bSuccess;
@@ -362,14 +362,22 @@ SwAnchoredObject* SwObjectFormatterTxtFrm::_GetFirstObjWithMovedFwdAnchor(
pAnchoredObj->GetFrmFmt().GetWrapInfluenceOnObjPos().
GetWrapInfluenceOnObjPos() == _nWrapInfluenceOnPosition )
{
- sal_uInt32 nFromPageNum = GetPgNumOfCollected(i);
- sal_uInt32 nPageNum = pAnchoredObj->GetPageFrmOfAnchor().GetPhyPageNum();
- if ( nPageNum > nFromPageNum )
+ const sal_uInt32 nFromPageNum = GetPgNumOfCollected(i);
+ // --> OD 2004-09-23 #i33751#, #i34060# - method <GetPageFrmOfAnchor()>
+ // is replaced by method <FindPageFrmOfAnchor()>. It's return value
+ // have to be checked.
+ SwPageFrm* pPageFrmOfAnchor = pAnchoredObj->FindPageFrmOfAnchor();
+ if ( pPageFrmOfAnchor )
{
- _noToPageNum = nPageNum;
- pRetAnchoredObj = pAnchoredObj;
- break;
+ const sal_uInt32 nPageNum = pPageFrmOfAnchor->GetPhyPageNum();
+ if ( nPageNum > nFromPageNum )
+ {
+ _noToPageNum = nPageNum;
+ pRetAnchoredObj = pAnchoredObj;
+ break;
+ }
}
+ // <--
}
}