summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/ww8par5.cxx
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2019-10-11 14:55:53 +0200
committerMichael Stahl <michael.stahl@cib.de>2019-10-23 13:00:23 +0200
commit7f2e61f884949ab27bcb7e1a02ece9a5cb4354b9 (patch)
tree9e95c5b657140edf6b38bedecb6024dccfa87802 /sw/source/filter/ww8/ww8par5.cxx
parent1332cf210803215857b81e8ca9c029aa3d6c49c2 (diff)
sw: WW8: fix the separator position
WW8 inserts the fieldmark at the end of the result, so separator should be at the start; writerfilter inserts fieldmark at the end of command so separator should be at the end. Change-Id: I44c9811139a34f529c553dd2fd46fdaccd554732 Reviewed-on: https://gerrit.libreoffice.org/80674 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.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 1c27d73c3021..1ddbb49c3823 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -541,7 +541,8 @@ sal_uInt16 SwWW8ImplReader::End_Field()
SwPaM aFieldPam( m_aFieldStack.back().GetPtNode(), m_aFieldStack.back().GetPtContent(), aEndPos.nNode, aEndPos.nContent.GetIndex());
IDocumentMarkAccess* pMarksAccess = m_rDoc.getIDocumentMarkAccess( );
IFieldmark *pFieldmark = pMarksAccess->makeFieldBookmark(
- aFieldPam, m_aFieldStack.back().GetBookmarkName(), ODF_FORMTEXT );
+ aFieldPam, m_aFieldStack.back().GetBookmarkName(), ODF_FORMTEXT,
+ aFieldPam.Start() /*same pos as start!*/ );
OSL_ENSURE(pFieldmark!=nullptr, "hmmm; why was the bookmark not created?");
if (pFieldmark!=nullptr) {
// adapt redline positions to inserted field mark start
@@ -640,7 +641,8 @@ sal_uInt16 SwWW8ImplReader::End_Field()
IFieldmark* pFieldmark = pMarksAccess->makeFieldBookmark(
aFieldPam,
m_aFieldStack.back().GetBookmarkName(),
- ODF_UNHANDLED );
+ ODF_UNHANDLED,
+ aFieldPam.Start() /*same pos as start!*/ );
if ( pFieldmark )
{
// adapt redline positions to inserted field mark start