diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-01-14 20:27:23 +0100 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2019-02-11 14:54:44 +0100 |
commit | b22e65d4b44f9a778c372929a7461ba5b17f7314 (patch) | |
tree | fd2f9dbd57db66973caec3e7e84ffc96f90a6658 /sw/qa/extras/rtfexport/rtfexport3.cxx | |
parent | ad32ff8f41e452156a2d16119b60542de11b42c8 (diff) |
tdf#122455 RTF export: fix font style from list def leaking into first para
This was a problem since RtfAttributeOutput::NumberingLevel() started to
use OutputItemSet() or when m_aStyles and m_aStylesEnd was separated,
but both were already like this in commit
5bbc027d5dae3472223538b13933ff821e027737 (cws-vmiklos01.diff: Better RTF
export filter, 2010-09-17).
If m_aStylesEnd is not consumed by NumberingLevel(), then the first run
will include its contents, which is incorrect.
Change-Id: Ifc93ae5f0057102fab636febae5ee2462361878e
Reviewed-on: https://gerrit.libreoffice.org/66332
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 57d3c927eff495702cd12f2a15ef0763f51977a7)
Reviewed-on: https://gerrit.libreoffice.org/66398
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'sw/qa/extras/rtfexport/rtfexport3.cxx')
-rw-r--r-- | sw/qa/extras/rtfexport/rtfexport3.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
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: */ |