From f0d001a378c64ea457e722266e60c96522c72e9b Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Wed, 9 May 2012 12:51:10 +0000 Subject: Resolves: #i119292# remove misusage of ...for the adjustments of certain AT_PAGE anchored objects Addresses the underlying problem of fdo#37024 fixed by 9d32497c01475f2b5e5bec756e4dd0ca9f9d4928 (cherry picked from commit b41eec25c2c6bc44eef55ae1c4ef57b9012fc8e6) Conflicts: sw/inc/doc.hxx sw/source/core/doc/doclay.cxx sw/source/core/doc/docnew.cxx sw/source/core/layout/frmtool.cxx Change-Id: I786eabdf84677e14c6f4b67d79e1e210e0532a21 --- sw/source/core/doc/doclay.cxx | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'sw/source/core/doc/doclay.cxx') diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index 251ff0ee34fe..3759b6eb6207 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -2068,7 +2068,7 @@ void SwDoc::SetAllUniqueFlyNames() SwFrmFmts aArr; aArr.reserve( n ); SwFrmFmt* pFlyFmt; - bool bLoadedFlag = true; // something for the Layout + bool bContainsAtPageObjWithContentAnchor = false; for( n = GetSpzFrmFmts()->size(); n; ) { @@ -2094,22 +2094,17 @@ void SwDoc::SetAllUniqueFlyNames() aArr.push_back( pFlyFmt ); } - if( bLoadedFlag ) + if ( !bContainsAtPageObjWithContentAnchor ) { const SwFmtAnchor& rAnchor = pFlyFmt->GetAnchor(); - if (((FLY_AT_PAGE == rAnchor.GetAnchorId()) && - rAnchor.GetCntntAnchor()) || - // Or are DrawObjects adjusted relatively to something? - ( RES_DRAWFRMFMT == pFlyFmt->Which() && ( - SFX_ITEM_SET == pFlyFmt->GetItemState( - RES_VERT_ORIENT )|| - SFX_ITEM_SET == pFlyFmt->GetItemState( - RES_HORI_ORIENT ))) ) + if ( (FLY_AT_PAGE == rAnchor.GetAnchorId()) && + rAnchor.GetCntntAnchor() ) { - bLoadedFlag = false; + bContainsAtPageObjWithContentAnchor = true; } } } + SetContainsAtPageObjWithContentAnchor( bContainsAtPageObjWithContentAnchor ); const SwNodeIndex* pIdx; @@ -2154,11 +2149,6 @@ void SwDoc::SetAllUniqueFlyNames() GetFtnIdxs().UpdateFtn( aTmp ); } } - - // Found a new document, but not a page anchored Frame/DrawObjects - // that are anchored to another Node. - if( bLoadedFlag ) - SetLoaded( sal_True ); } bool SwDoc::IsInHeaderFooter( const SwNodeIndex& rIdx ) const -- cgit v1.2.3