summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/ww8par5.cxx
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2019-10-10 17:23:52 +0200
committerMichael Stahl <michael.stahl@cib.de>2019-10-11 10:17:49 +0200
commit954c158acb87eb0385c51fdfff38fff84f154051 (patch)
tree88a5408db9ba46e325d3ce9803896d1c3360e6be /sw/source/filter/ww8/ww8par5.cxx
parentc11d96f0b521ee7df77576963b60178d2c40431b (diff)
sw: WW8: fix crashtesting asserts on fdo45983-1.doc export to ODT
The problem is that a redline is created that contains the CH_TXT_ATR_FIELDSTART but not the corresponding CH_TXT_ATR_FIELDEND: (rr) p aRegion $39 = SwPaM = { point = SwPosition (node 443, offset 185), mark = SwPosition (node 442, offset 0) } (rr) p aRegion.GetText() $40 = "\aDie Studierendenvertiefen ihre Fertigkeit bei einfachen Handverletzungen, einen Befund zu stellen, Therapieziele zu formulieren, einen ergotherapeutischen Behandlungsplan zu erstellen und durchzuführen" This is because commit d195a3e5f4ec5c616ae83f99d48f5d4eefe5f22e only adapted one place in SwWW8ImplReader::End_Field() where a fieldmark is inserted, but there's a second one ... Change-Id: Ib931c6b0d55f42e4f6bc170216f495f1f6e931e1 Reviewed-on: https://gerrit.libreoffice.org/80622 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'sw/source/filter/ww8/ww8par5.cxx')
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 9dfb5261a263..3cd069d56dba 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -544,6 +544,9 @@ sal_uInt16 SwWW8ImplReader::End_Field()
aFieldPam, m_aFieldStack.back().GetBookmarkName(), ODF_FORMTEXT );
OSL_ENSURE(pFieldmark!=nullptr, "hmmm; why was the bookmark not created?");
if (pFieldmark!=nullptr) {
+ // adapt redline positions to inserted field mark start
+ // dummy char (assume not necessary for end dummy char)
+ m_xRedlineStack->MoveAttrs(*aFieldPam.Start());
const IFieldmark::parameter_map_t& rParametersToAdd = m_aFieldStack.back().getParameters();
pFieldmark->GetParameters()->insert(rParametersToAdd.begin(), rParametersToAdd.end());
}