summaryrefslogtreecommitdiff
path: root/sw/qa/extras/rtfexport
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-08-01 19:28:07 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-08-02 08:45:48 +0200
commit8f36d40426fa83bf7923a818377cc50048199dfd (patch)
tree1ce95e4719367386c87368dc7b65ce49c8d6bd88 /sw/qa/extras/rtfexport
parent73f1cb6b64bd295e37af5c50b88b472c6d40b8e4 (diff)
sw btlr writing mode: RTF filter of Writer tbrl textframes
Fix both import and export. Values 1 and 3 seems to be the same. Accept both on import, but write 3, as DOCX only has a single value and Word uses 3 when doing DOCX->RTF conversion. Change-Id: Ic5420091ffee9eb20c6aaac61a127e93289aa9fe Reviewed-on: https://gerrit.libreoffice.org/76823 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/qa/extras/rtfexport')
-rw-r--r--sw/qa/extras/rtfexport/data/tbrl-frame.odtbin0 -> 8666 bytes
-rw-r--r--sw/qa/extras/rtfexport/rtfexport4.cxx11
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfexport/data/tbrl-frame.odt b/sw/qa/extras/rtfexport/data/tbrl-frame.odt
new file mode 100644
index 000000000000..3cc79deb66e5
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/tbrl-frame.odt
Binary files differ
diff --git a/sw/qa/extras/rtfexport/rtfexport4.cxx b/sw/qa/extras/rtfexport/rtfexport4.cxx
index 6b75eda278fd..59ce2b0b3bb5 100644
--- a/sw/qa/extras/rtfexport/rtfexport4.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport4.cxx
@@ -152,6 +152,17 @@ DECLARE_RTFEXPORT_TEST(testBtlrCell, "btlr-cell.rtf")
CPPUNIT_ASSERT_EQUAL(text::WritingMode2::TB_RL, getProperty<sal_Int16>(xC1, "WritingMode"));
}
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTbrlFrame, "tbrl-frame.odt")
+{
+ uno::Reference<beans::XPropertySet> xShape(getShape(1), uno::UNO_QUERY);
+ auto nActual = getProperty<sal_Int16>(xShape, "WritingMode");
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 2
+ // - Actual : 0
+ // i.e. custom wrting mode was lost.
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::TB_RL, nActual);
+}
+
DECLARE_RTFIMPORT_TEST(testPageBorder, "page-border.rtf")
{
uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"),