[Libreoffice-commits] core.git: sw/qa

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Jul 24 04:12:06 UTC 2018


 sw/qa/extras/ooxmlexport/data/fdo72560d.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport10.cxx   |    7 +++++++
 2 files changed, 7 insertions(+)

New commits:
commit 3aaa81ff68c6597381f58f2bd257190d70bd58a3
Author:     Justin Luth <justin_luth at sil.org>
AuthorDate: Mon Jul 23 11:54:51 2018 +0300
Commit:     Justin Luth <justin_luth at sil.org>
CommitDate: Tue Jul 24 06:11:45 2018 +0200

    tdf#72560 ExchangeLeftRight shouldn't use DefaultParaStyle
    
    MS Word's UI is a bit confusing for RTL because the only place you
    can set it (at least in Word 2003) is on the Normal paragraph
    style - everywhere else the control is grayed out.
    
    Add a test that very specifically tests the impact of Normal style.
    The document does not use the "default" style at all, because
    the style used is based on -none-. Normal is set to RTL - does
    that mean that the whole document should be RTL or that
    Left/Right should swap?
    
    No. Parentless style provides LTR in MSWord, and thus the LO code
    that ExchangeLeftRight() based on DefaultStyle's bidi setting was
    wrong. Yes, it is determined by style/DocDefault settings, but
    not by DefaultStyle in particular.
    
    Change-Id: I000953e51d3d919f73aa1e97df63f266d15447b2
    Reviewed-on: https://gerrit.libreoffice.org/57859
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <justin_luth at sil.org>

diff --git a/sw/qa/extras/ooxmlexport/data/fdo72560d.docx b/sw/qa/extras/ooxmlexport/data/fdo72560d.docx
new file mode 100644
index 000000000000..000ae73d8ad3
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo72560d.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index bd90c27c4a7f..9e8d8c9d5df5 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -306,6 +306,13 @@ DECLARE_OOXMLEXPORT_TEST(testFdo72560c, "fdo72560c.docx")
     CPPUNIT_ASSERT_EQUAL( sal_Int32(style::ParagraphAdjust_LEFT), getProperty< sal_Int32 >( xParaEndRTL, "ParaAdjust" ));
 }
 
+DECLARE_OOXMLEXPORT_TEST(testFdo72560d, "fdo72560d.docx")
+{
+    // The problem was libreoffice confuse when RTL was specified in "Normal" when not using Normal at all
+    CPPUNIT_ASSERT_EQUAL( sal_Int32(style::ParagraphAdjust_RIGHT), getProperty< sal_Int32 >( getParagraph(1), "ParaAdjust" ));
+    CPPUNIT_ASSERT_EQUAL( sal_Int32(style::ParagraphAdjust_RIGHT), getProperty< sal_Int32 >( getParagraph(1), "ParaAdjust" ));
+}
+
 DECLARE_OOXMLEXPORT_TEST(testRPrChangeClosed, "rprchange_closed.docx")
 {
     // Redline defined by rPrChanged wasn't removed.


More information about the Libreoffice-commits mailing list