summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2018-07-23 11:54:51 +0300
committerJustin Luth <justin_luth@sil.org>2018-07-24 06:11:45 +0200
commit3aaa81ff68c6597381f58f2bd257190d70bd58a3 (patch)
tree26dcc113208d18439e1381359f114560ed2e9c0f
parent0fbf627a4beca383c25cc50cfa9d555f18fade53 (diff)
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@sil.org>
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo72560d.docxbin0 -> 8116 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport10.cxx7
2 files changed, 7 insertions, 0 deletions
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
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo72560d.docx
Binary files 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.