summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/doclay.cxx
diff options
context:
space:
mode:
authorOliver-Rainer Wittmann <orw@apache.org>2012-05-09 12:51:10 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-04-02 10:39:13 +0100
commitf0d001a378c64ea457e722266e60c96522c72e9b (patch)
treea3f6890b6c130d7fa02841c45ff3aadd4249147f /sw/source/core/doc/doclay.cxx
parent641d8eaa980c00802964e07b0397ba3c2884bd7d (diff)
Resolves: #i119292# remove misusage of <SwDoc::Set|IsLoaded()>
...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
Diffstat (limited to 'sw/source/core/doc/doclay.cxx')
-rw-r--r--sw/source/core/doc/doclay.cxx22
1 files changed, 6 insertions, 16 deletions
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