summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/rtfexport/data/tdf158409.rtf12
-rw-r--r--sw/qa/extras/rtfexport/rtfexport3.cxx9
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx4
3 files changed, 23 insertions, 2 deletions
diff --git a/sw/qa/extras/rtfexport/data/tdf158409.rtf b/sw/qa/extras/rtfexport/data/tdf158409.rtf
new file mode 100644
index 000000000000..a89a5ba95d8a
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/tdf158409.rtf
@@ -0,0 +1,12 @@
+{\rtf1
+{\info
+{\title DocTitle}
+}
+{\stylesheet
+{\ql\fs72 Normal;}
+}
+
+\pard\fs16 {\field{\*\fldinst TITLE}}\par
+\pard\fs72 {\rtfch\fs16{\field{\*\fldinst TITLE}}}\par
+
+}
diff --git a/sw/qa/extras/rtfexport/rtfexport3.cxx b/sw/qa/extras/rtfexport/rtfexport3.cxx
index 0c7365260b56..e88461102dfb 100644
--- a/sw/qa/extras/rtfexport/rtfexport3.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport3.cxx
@@ -709,6 +709,15 @@ CPPUNIT_TEST_FIXTURE(Test, testFloattableOverlapNeverRTFExport)
CPPUNIT_ASSERT(!pFly->GetAttrSet().GetWrapInfluenceOnObjPos().GetAllowOverlap());
}
+DECLARE_RTFEXPORT_TEST(testTdf158409, "tdf158409.rtf")
+{
+ uno::Reference<text::XTextRange> xRun = getRun(getParagraph(1), 1, "DocTitle");
+ CPPUNIT_ASSERT_EQUAL(8.0, getProperty<double>(xRun, "CharHeight"));
+
+ xRun = getRun(getParagraph(2), 1, "DocTitle");
+ CPPUNIT_ASSERT_EQUAL(8.0, getProperty<double>(xRun, "CharHeight"));
+}
+
} // end of anonymous namespace
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 2da578e181c4..0853cfa1b600 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2359,7 +2359,7 @@ RTFError RTFDocumentImpl::beforePopState(RTFParserState& rState)
if (m_aStates.top().isFieldLocked())
singleChar(cFieldLock);
- singleChar(cFieldSep);
+ singleChar(cFieldSep, true);
}
break;
case Destination::FIELDRESULT:
@@ -2586,7 +2586,7 @@ RTFError RTFDocumentImpl::beforePopState(RTFParserState& rState)
str = OUString::Concat(field) + " \"" + str.replaceAll("\"", "\\\"") + "\"";
singleChar(cFieldStart);
Mapper().utext(str.getStr(), str.getLength());
- singleChar(cFieldSep);
+ singleChar(cFieldSep, true);
// no result
singleChar(cFieldEnd);
}