From 9a8126262a8afba46efbfac5160b5f8cf13c9bd6 Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Sat, 8 Aug 2020 16:05:07 +0300 Subject: tdf#135329 revert sw MS export: prevent skipping at-char anchors ...because Step 2 solved the problem, and I don't want to mask any future issues that miss an anchor position. This reverts LO 7.1 commit d4045509e58180768368db7a77479fc027ff7c42 tdf#135329 sw MS export: prevent skipping at-char anchors This patch is step 1 - write out bypassed flies. Step 2 - don't bypass fly positions. Change-Id: I5246ea531897de493eb050625cebcdcc2488605b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100390 Tested-by: Justin Luth Reviewed-by: Justin Luth --- sw/source/filter/ww8/wrtw8nds.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 407c5182e997..fc75ac5ff02a 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -708,7 +708,8 @@ FlyProcessingState SwWW8AttrIter::OutFlys(sal_Int32 nSwPos) const SwPosition &rAnchor = maFlyIter->GetPosition(); const sal_Int32 nPos = rAnchor.nContent.GetIndex(); - if ( nPos > nSwPos ) + assert(nPos >= nSwPos && "a fly must get flagged as a nextAttr/CurrentPos"); + if ( nPos != nSwPos ) return FLY_NOT_PROCESSED ; // We haven't processed the fly const SdrObject* pSdrObj = maFlyIter->GetFrameFormat().FindRealSdrObject(); -- cgit