summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-04-17 10:44:47 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-04-17 11:35:27 +0200
commit4ee2a882dddb395a816cd54004b634d57cfb2446 (patch)
tree5214a7e75d9a185d56f22538af4317798778eeee /sw
parent7e5980ccf39b54240524f059a65497b766af91cc (diff)
tdf#86182 RTF import: fix handling of \rtlpar
Commit 558d5c25a0b1d6a937d33291a4b6cd7fca6cb15b (implement RTF_LTRPAR and RTF_RTLPAR, 2011-06-09) was just a guess, this one is the proper mapping. Change-Id: I1156ef5ddc34264d761d3e64dd0537bc6ec0ced7
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/rtfimport/data/tdf86182.rtf4
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx7
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/tdf86182.rtf b/sw/qa/extras/rtfimport/data/tdf86182.rtf
new file mode 100644
index 000000000000..d63c48934a97
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/tdf86182.rtf
@@ -0,0 +1,4 @@
+{\rtf1
+\rtlpar
+\u1662\'3f\u1587\'3f
+\par}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index c579403b7e78..f4c14c77b63a 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -46,6 +46,7 @@
#include <com/sun/star/text/WrapTextMode.hpp>
#include <com/sun/star/text/HoriOrientation.hpp>
#include <com/sun/star/text/VertOrientation.hpp>
+#include <com/sun/star/text/WritingMode2.hpp>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
#include <rtl/ustring.hxx>
@@ -2238,6 +2239,12 @@ DECLARE_RTFIMPORT_TEST(mathtype, "mathtype.rtf")
CPPUNIT_ASSERT(!aFormula.isEmpty());
}
+DECLARE_RTFIMPORT_TEST(testTdf86182, "tdf86182.rtf")
+{
+ // Writing mode was the default, i.e. text::WritingMode2::CONTEXT.
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::RL_TB, getProperty<sal_Int16>(getParagraph(1), "WritingMode"));
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */