summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorFaisal M. Al-Otaibi <fmalotaibi@kacst.edu.sa>2013-12-12 08:20:00 +0300
committerFaisal M. Al-Otaibi <fmalotaibi@kacst.edu.sa>2013-12-12 08:37:28 +0300
commitb0db93d00e1dd208baa96eb3e10df12950cdcb49 (patch)
tree30ce1344e4a9b151207e6084223eb81c8b264817 /sw
parent4f94e6c20b2fee11429d7cbaef6b6fd1880317b2 (diff)
DOCX: fdo#72560 better solution for exchange alignment for RTL
Change-Id: I39462fc722a58b32e8829a9f2005a411871f255d
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlimport/data/fdo72560.docxbin0 -> 15144 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx14
2 files changed, 14 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/fdo72560.docx b/sw/qa/extras/ooxmlimport/data/fdo72560.docx
new file mode 100644
index 000000000000..b21535bfd453
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/fdo72560.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 5da974f35081..db722f62e67d 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1638,6 +1638,20 @@ DECLARE_OOXMLIMPORT_TEST(testLOCrash,"file_crash.docx")
//The problem was libreoffice crash while opening the file.
getParagraph(1,"Contents");
}
+
+DECLARE_OOXMLIMPORT_TEST(testFdo72560, "fdo72560.docx")
+{
+ // The problem was libreoffice confuse when there RTL default style for paragraph
+ uno::Reference<uno::XInterface> xParaLeftRTL(getParagraph( 1, "RTL LEFT"));
+ uno::Reference<uno::XInterface> xParaRightLTR(getParagraph( 2, "LTR RIGHT"));
+
+ // this will test the text direction and alignment for paragraphs
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::RL_TB, getProperty<sal_Int16>( xParaLeftRTL, "WritingMode" ));
+ CPPUNIT_ASSERT_EQUAL( sal_Int32 (style::ParagraphAdjust_LEFT), getProperty< sal_Int32 >( xParaLeftRTL, "ParaAdjust" ));
+
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::LR_TB, getProperty<sal_Int16>( xParaRightLTR, "WritingMode" ));
+ CPPUNIT_ASSERT_EQUAL( sal_Int32 (style::ParagraphAdjust_RIGHT), getProperty< sal_Int32 >( xParaRightLTR, "ParaAdjust" ));
+}
#endif
CPPUNIT_PLUGIN_IMPLEMENT();