summaryrefslogtreecommitdiff
path: root/sw/source/core/doc
diff options
context:
space:
mode:
authorOliver-Rainer Wittmann <orw@apache.org>2012-05-09 12:51:10 +0000
committerOliver-Rainer Wittmann <orw@apache.org>2012-05-09 12:51:10 +0000
commitb41eec25c2c6bc44eef55ae1c4ef57b9012fc8e6 (patch)
treece8265e34ab472460cfa2f0836d7a96b2cad8a0d /sw/source/core/doc
parentfcea3ced92c290ac215bb0392d4d3b507dce245b (diff)
119292 - remove misusage of <SwDoc::Set|IsLoaded()> for the adjustments of certain AT_PAGE anchored objects
Notes
Diffstat (limited to 'sw/source/core/doc')
-rw-r--r--sw/source/core/doc/doclay.cxx22
-rw-r--r--sw/source/core/doc/docnew.cxx1
2 files changed, 7 insertions, 16 deletions
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 2054e0027b9c..c292b5d83390 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -2146,7 +2146,7 @@ void SwDoc::SetAllUniqueFlyNames()
n = 255;
SwSpzFrmFmts aArr( (sal_Int8)n, 10 );
SwFrmFmtPtr pFlyFmt;
- sal_Bool bLoadedFlag = sal_True; // noch etwas fuers Layout
+ bool bContainsAtPageObjWithContentAnchor = false;
for( n = GetSpzFrmFmts()->Count(); n; )
{
@@ -2172,22 +2172,17 @@ void SwDoc::SetAllUniqueFlyNames()
aArr.Insert( pFlyFmt, aArr.Count() );
}
- if( bLoadedFlag )
+ if ( !bContainsAtPageObjWithContentAnchor )
{
const SwFmtAnchor& rAnchor = pFlyFmt->GetAnchor();
- if (((FLY_AT_PAGE == rAnchor.GetAnchorId()) &&
- rAnchor.GetCntntAnchor()) ||
- // oder werden DrawObjecte rel. zu irgendetwas ausgerichtet?
- ( 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 = sal_False;
+ bContainsAtPageObjWithContentAnchor = true;
}
}
}
+ SetContainsAtPageObjWithContentAnchor( bContainsAtPageObjWithContentAnchor );
const SwNodeIndex* pIdx;
@@ -2234,11 +2229,6 @@ void SwDoc::SetAllUniqueFlyNames()
GetFtnIdxs().UpdateFtn( aTmp );
}
}
-
- // neues Document und keine seitengebundenen Rahmen/DrawObjecte gefunden,
- // die an einem Node verankert sind.
- if( bLoadedFlag )
- SetLoaded( sal_True );
}
sal_Bool SwDoc::IsInHeaderFooter( const SwNodeIndex& rIdx ) const
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 35c390765e09..740299b848aa 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -292,6 +292,7 @@ SwDoc::SwDoc()
mbLinksUpdated( sal_False ),
mbClipBoard( false ),
mbColumnSelection( false ),
+ mbContainsAtPageObjWithContentAnchor( false ),
// i#78591#
mbProtectForm(false),
mbLastBrowseMode( false ),