diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-02-21 09:06:20 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-02-23 12:23:07 +0000 |
commit | af9d9f274ff26b462048746069a5bb38493ff115 (patch) | |
tree | 23ea6af9f36ae63490ab71a00642face067ce29e /sw | |
parent | ed8b8f59e1a85b455a2f8daebd2c1f6fb59faeaa (diff) |
tdf#104081 RTF import: handle \htmautsp
It's the opposite of OOXML's <w:doNotUseHTMLParagraphAutoSpacing/>, so
the default is different.
Also adapt the fdo82006 bugdoc where the original bugdoc contained this
flag, but the testcase did not.
(cherry picked from commit 291c9122b23ce7aa619e828b895b08dcd21bf025)
Change-Id: I2fd757a8f95be9b1bee63570c9f587c17d3b22bc
Reviewed-on: https://gerrit.libreoffice.org/34568
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/rtfexport/data/fdo82006.rtf | 2 | ||||
-rw-r--r-- | sw/qa/extras/rtfexport/data/tdf104081.rtf | 4 | ||||
-rw-r--r-- | sw/qa/extras/rtfexport/rtfexport.cxx | 7 |
3 files changed, 12 insertions, 1 deletions
diff --git a/sw/qa/extras/rtfexport/data/fdo82006.rtf b/sw/qa/extras/rtfexport/data/fdo82006.rtf index 0f5ee43ad2d5..e108d4ceb189 100644 --- a/sw/qa/extras/rtfexport/data/fdo82006.rtf +++ b/sw/qa/extras/rtfexport/data/fdo82006.rtf @@ -1,4 +1,4 @@ -{\rtf1 +{\rtf1\htmautsp \pard\plain \ql \sb100\sa100\sbauto1\saauto1 hello\par } diff --git a/sw/qa/extras/rtfexport/data/tdf104081.rtf b/sw/qa/extras/rtfexport/data/tdf104081.rtf new file mode 100644 index 000000000000..0f5ee43ad2d5 --- /dev/null +++ b/sw/qa/extras/rtfexport/data/tdf104081.rtf @@ -0,0 +1,4 @@ +{\rtf1 +\pard\plain +\ql \sb100\sa100\sbauto1\saauto1 hello\par +} diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx index 18a2a0ef7c04..19b3235a4cdc 100644 --- a/sw/qa/extras/rtfexport/rtfexport.cxx +++ b/sw/qa/extras/rtfexport/rtfexport.cxx @@ -891,6 +891,13 @@ DECLARE_RTFEXPORT_TEST(testFdo82006, "fdo82006.rtf") CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(280)), getProperty<sal_Int32>(getParagraph(1), "ParaBottomMargin")); } +DECLARE_RTFEXPORT_TEST(testTdf104081, "tdf104081.rtf") +{ + // These were 494 (280 twips), as \htmautsp was ignored. + CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(100)), getProperty<sal_Int32>(getParagraph(1), "ParaTopMargin")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(100)), getProperty<sal_Int32>(getParagraph(1), "ParaBottomMargin")); +} + DECLARE_RTFEXPORT_TEST(testTdf88583, "tdf88583.odt") { // This was FillStyle_NONE, as background color was missing from the color table during export. |