summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/atrfrm.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-05-13 18:13:33 +0200
committerMichael Stahl <mstahl@redhat.com>2015-05-13 18:25:25 +0200
commitc2fac48373cab503c19aad00d1136053f82f3ae2 (patch)
tree430db77cb9a8153818e62517f6833d7dcb6f4c7f /sw/source/core/layout/atrfrm.cxx
parenta4dee94afed9ade6ac50237c8d99a6e49d3bebc1 (diff)
sw: fix wrong assert for broken documents like abi11860-2.odt
... that have page anchor type without text:anchor-page-number, so the import stores a temporary anchor position that MakeFrms() cleans up. Change-Id: I440d3a138659933e54f671d87bc418d5ba1059fb
Diffstat (limited to 'sw/source/core/layout/atrfrm.cxx')
-rw-r--r--sw/source/core/layout/atrfrm.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index d5611befded9..2a885f54c28a 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -3516,7 +3516,10 @@ void CheckAnchoredFlyConsistency(SwDoc const& rDoc)
SwFmtAnchor const& rAnchor((**it).GetAnchor(false));
if (FLY_AT_PAGE == rAnchor.GetAnchorId())
{
- assert(!rAnchor.GetCntntAnchor());
+ assert(!rAnchor.GetCntntAnchor()
+ // for invalid documents that lack text:anchor-page-number
+ // it may have an anchor before MakeFrms() is called
+ || (!SwIterator<SwFrm, SwFrmFmt>(**it).First()));
}
else
{