summaryrefslogtreecommitdiff
path: root/sw/qa/extras/rtfexport/rtfexport.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/rtfexport/rtfexport.cxx')
-rw-r--r--sw/qa/extras/rtfexport/rtfexport.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx
index de2753705a58..593f01e0d236 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -22,6 +22,7 @@
#include <com/sun/star/text/XFootnotesSupplier.hpp>
#include <com/sun/star/text/XPageCursor.hpp>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include <com/sun/star/text/WritingMode2.hpp>
#include <com/sun/star/view/XViewSettingsSupplier.hpp>
#include <vcl/svapp.hxx>
@@ -826,6 +827,15 @@ DECLARE_RTFEXPORT_TEST(testCjklist38, "cjklist38.rtf")
CPPUNIT_ASSERT_EQUAL(style::NumberingType::NUMBER_UPPER_ZH, numFormat);
}
+DECLARE_RTFEXPORT_TEST(testTableRtl, "table-rtl.rtf")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ // This was text::WritingMode2::LR_TB, i.e. direction of the table was ignored.
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::RL_TB, getProperty<sal_Int16>(xTable, "WritingMode"));
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */