diff options
author | Faisal M. Al-Otaibi <fmalotaibi@kacst.edu.sa> | 2013-11-15 18:09:21 +0300 |
---|---|---|
committer | Faisal M. Al-Otaibi <fmalotaibi@kacst.edu.sa> | 2013-11-15 18:16:36 +0300 |
commit | 84b3d6dc3a7d5ba52b00285e59e7aa6b5ca15837 (patch) | |
tree | b28b774d7b884c7a078ace34e1d96b4ec3781131 /sw/qa | |
parent | 9389cf78e304a5a99bcf1745b9388e14ac36281a (diff) |
DOCX:fdo#71646 fix wrong direction when save the file.
Change-Id: I6f3dcf1007e91551e1f3335f4c40424add1c45c3
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/fdo71646.docx | bin | 0 -> 22792 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 12 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/fdo71646.docx b/sw/qa/extras/ooxmlexport/data/fdo71646.docx Binary files differnew file mode 100644 index 000000000000..d49d88b67cec --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/fdo71646.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 13c0bf1cbd18..1bf422ff368c 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -1820,6 +1820,18 @@ DECLARE_OOXML_TEST(testCellGridSpan, "cell-grid-span.docx") assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:tcPr/w:gridSpan",0); assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[2]/w:tcPr/w:gridSpan",0); } +DECLARE_OOXML_TEST(testFdo71646, "fdo71646.docx") +{ + // The problem was after save file created by MS the direction changed to RTL. + uno::Reference<uno::XInterface> xParaLTRLeft(getParagraph( 1, "LTR LEFT")); + sal_Int32 nLTRLeft = getProperty< sal_Int32 >( xParaLTRLeft, "ParaAdjust" ); + // test the text Direction value for the pragraph + sal_Int16 nLRDir = getProperty< sal_Int32 >( xParaLTRLeft, "WritingMode" ); + + // this will test the both the text direction and alignment for paragraph + CPPUNIT_ASSERT_EQUAL( sal_Int32 (style::ParagraphAdjust_LEFT), nLTRLeft); + CPPUNIT_ASSERT_EQUAL(text::WritingMode2::LR_TB, nLRDir); +} #endif |