diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-08-23 08:34:29 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-08-23 09:18:50 +0200 |
commit | 1aed241deb816b2a6b9f3f97978443939f61d076 (patch) | |
tree | 37df75437b6069294d0a503c26d3af6d8cab9a2c /sw/qa/extras/rtfexport | |
parent | 9d5b9bf881606e83a051cc192d08c4690f98a8ba (diff) |
RTF filter: handle tbrl section text direction
Makes no sense to support btlr, Word can't handle it. (UI is disabled.)
Change-Id: I036a1e98e8b1ac07e688eedf45b4a2c21c4a8859
Reviewed-on: https://gerrit.libreoffice.org/77986
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/qa/extras/rtfexport')
-rw-r--r-- | sw/qa/extras/rtfexport/data/tbrl-page.rtf | 3 | ||||
-rw-r--r-- | sw/qa/extras/rtfexport/rtfexport4.cxx | 12 |
2 files changed, 15 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfexport/data/tbrl-page.rtf b/sw/qa/extras/rtfexport/data/tbrl-page.rtf new file mode 100644 index 000000000000..ecaa2b3e05ff --- /dev/null +++ b/sw/qa/extras/rtfexport/data/tbrl-page.rtf @@ -0,0 +1,3 @@ +{\rtf1\sectd\stextflow1 +\pard\plain asdf\par +} diff --git a/sw/qa/extras/rtfexport/rtfexport4.cxx b/sw/qa/extras/rtfexport/rtfexport4.cxx index 6e4458efb600..bcac3b291cb7 100644 --- a/sw/qa/extras/rtfexport/rtfexport4.cxx +++ b/sw/qa/extras/rtfexport/rtfexport4.cxx @@ -224,6 +224,18 @@ DECLARE_RTFIMPORT_TEST(testPageBorder, "page-border.rtf") CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(71), aRightBorder.LineWidth); } +DECLARE_RTFEXPORT_TEST(testTbrlPage, "tbrl-page.rtf") +{ + uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), + uno::UNO_QUERY); + auto nActual = getProperty<sal_Int16>(xPageStyle, "WritingMode"); + // Without the accompanying fix in place, this test would have failed with: + // - Expected: 2 + // - Actual : 0 + // i.e. custom writing mode was lost. + CPPUNIT_ASSERT_EQUAL(text::WritingMode2::TB_RL, nActual); +} + DECLARE_RTFIMPORT_TEST(testTdf126309, "tdf126309.rtf") { // Without the accompanying fix in place, this test would have failed, as |