diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-05-09 09:10:24 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-05-09 13:51:29 +0200 |
commit | 3a9854a92923df8013ca832c48aa9f284bcb1adc (patch) | |
tree | 92ed195d12e40ba8b4ece1216eb878a0263853dd /sw/qa | |
parent | 5e062501eb6c3abe5219777fd9267702689785c7 (diff) |
tdf#107620 RTF export: handle DocumentSettingId::PARA_SPACE_MAX compat setting
As it turns out it has a dedicated RTF control word. With this, the
bugdoc is again kept as a one-page document during DOCX -> RTF
conversion.
If we are at it, also write the automatic before/after paragraph spacing
markup.
Change-Id: I78de644f0631e59ef507dfaa07c5a812d4ef10cd
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/rtfexport/data/tdf107620.docx | bin | 0 -> 12654 bytes | |||
-rw-r--r-- | sw/qa/extras/rtfexport/rtfexport.cxx | 11 |
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfexport/data/tdf107620.docx b/sw/qa/extras/rtfexport/data/tdf107620.docx Binary files differnew file mode 100644 index 000000000000..285bd92ae670 --- /dev/null +++ b/sw/qa/extras/rtfexport/data/tdf107620.docx diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx index 0eccf65dd748..87e86c198612 100644 --- a/sw/qa/extras/rtfexport/rtfexport.cxx +++ b/sw/qa/extras/rtfexport/rtfexport.cxx @@ -1193,6 +1193,17 @@ DECLARE_RTFEXPORT_TEST(testHyperlinkTarget, "hyperlink-target.rtf") CPPUNIT_ASSERT_EQUAL(OUString("_blank"), getProperty<OUString>(getRun(getParagraph(1), 1), "HyperLinkTarget")); } +DECLARE_RTFEXPORT_TEST(testTdf107620, "tdf107620.docx") +{ + // This failed, RTF export didn't write the \htmautsp compat flag, the + // original bugdoc resulting in 2 pages instead of 1. + uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xSettings(xFactory->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY); + bool bAddParaTableSpacing = true; + xSettings->getPropertyValue("AddParaTableSpacing") >>= bAddParaTableSpacing; + CPPUNIT_ASSERT(!bAddParaTableSpacing); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |