summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/ww8export/ww8export2.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx6
2 files changed, 5 insertions, 3 deletions
diff --git a/sw/qa/extras/ww8export/ww8export2.cxx b/sw/qa/extras/ww8export/ww8export2.cxx
index 43c3252953f5..b2523b822370 100644
--- a/sw/qa/extras/ww8export/ww8export2.cxx
+++ b/sw/qa/extras/ww8export/ww8export2.cxx
@@ -312,7 +312,7 @@ DECLARE_WW8EXPORT_TEST(testTdf104334, "tdf104334.doc")
// This failed with a container::NoSuchElementException: STYLEREF was
// mapped to SwChapterField, and the field result was "This is a Heading 1"
// instead of just "1".
- CPPUNIT_ASSERT_EQUAL(OUString("1"), getRun(getParagraph(2), 3)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), getRun(getParagraph(2), 4)->getString());
}
DECLARE_WW8EXPORT_TEST(testTdf108072, "tdf108072.doc")
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