diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2019-10-29 13:44:07 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2019-10-29 16:30:01 +0100 |
commit | 58a86af36295b4fc1e07c0bd38f74530a2ce0f08 (patch) | |
tree | c396e8053ac395f916abc441d97d58eb9c8d3518 /writerfilter | |
parent | cca1bacd4648a85895e956da850e97462dd5438b (diff) |
writerfilter: use insert position in PushFieldContext()
Don't hardcode end of text; see mangled nested fields in e.g.
sw/qa/core/data/ooxml/pass/fdo79838.docx
Change-Id: I1b77e7a0c0d2a7d52b5facbb43a0ed0747d74cea
Reviewed-on: https://gerrit.libreoffice.org/81668
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Tested-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 31971d21c2c5..869c6fa2ac74 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -3349,7 +3349,10 @@ void DomainMapper_Impl::PushFieldContext() { uno::Reference<text::XTextAppend> xTextAppend = m_aTextAppendStack.top().xTextAppend; if (xTextAppend.is()) - xCrsr = xTextAppend->createTextCursorByRange(xTextAppend->getEnd()); + xCrsr = xTextAppend->createTextCursorByRange( + m_aTextAppendStack.top().xInsertPosition.is() + ? m_aTextAppendStack.top().xInsertPosition + : xTextAppend->getEnd()); } uno::Reference< text::XTextRange > xStart; |