diff options
-rw-r--r-- | sw/qa/extras/rtfexport/data/tdf122455.rtf | 21 | ||||
-rw-r--r-- | sw/qa/extras/rtfexport/rtfexport3.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfattributeoutput.cxx | 1 |
3 files changed, 30 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfexport/data/tdf122455.rtf b/sw/qa/extras/rtfexport/data/tdf122455.rtf new file mode 100644 index 000000000000..12e0948a0ba5 --- /dev/null +++ b/sw/qa/extras/rtfexport/data/tdf122455.rtf @@ -0,0 +1,21 @@ +{\rtf1 +{\stylesheet +{\s1\fs32 Intestazione 1;} +} +{\*\listtable +{\list\listtemplateid1 +{\listlevel\levelnfc0\leveljc0\levelstartat1\levelfollow0 +\fi-432\li432} +\listid1} +{\list\listtemplateid4 +{\listlevel\levelnfc23\leveljc0\levelstartat1\levelfollow0 +\dbch\af3\fi-360\li720} +\listid4} +} +{\listoverridetable +{\listoverride\listid1\listoverridecount0\ls1} +{\listoverride\listid4\listoverridecount0\ls4} +} +\pard\plain\s1\fs32\ls1 first\par +\pard\plain\ls4\fs64 second\par +} diff --git a/sw/qa/extras/rtfexport/rtfexport3.cxx b/sw/qa/extras/rtfexport/rtfexport3.cxx index e1ca5c9b709b..e4a069464335 100644 --- a/sw/qa/extras/rtfexport/rtfexport3.cxx +++ b/sw/qa/extras/rtfexport/rtfexport3.cxx @@ -211,6 +211,14 @@ DECLARE_RTFEXPORT_TEST(testTdf121623, "tdf121623.rtf") CPPUNIT_ASSERT_EQUAL(1, getPages()); } +DECLARE_RTFEXPORT_TEST(testTdf122455, "tdf122455.rtf") +{ + // Without the accompanying fix in place, this test would have failed with + // 'Expected: 16; Actual : 32', the font size from a list definition + // leaked into the first run's character properties. + CPPUNIT_ASSERT_EQUAL(16.0, getProperty<double>(getRun(getParagraph(1), 1), "CharHeight")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 0d06d47368aa..aad9b6a9e21d 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -1525,6 +1525,7 @@ void RtfAttributeOutput::NumberingLevel(sal_uInt8 nLevel, sal_uInt16 nStart, } m_rExport.OutputItemSet(*pOutSet, false, true, i18n::ScriptType::LATIN, m_rExport.m_bExportModeRTF); + m_aStyles.append(m_aStylesEnd.makeStringAndClear()); m_rExport.Strm().WriteCharPtr(m_aStyles.makeStringAndClear().getStr()); } |