From ea6aef691cbc663b423c2075297581eb21e93031 Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Mon, 30 Jul 2018 12:34:17 +0300 Subject: cleanup tdf#72560 writerfilter: set in defaults, not styles These "unspecified" defaults are best set in document defaults, not in the style itself. Otherwise things like table styles don't know whether they can override that property. Most of the existing logic was no longer necessary, since a more generic fix ensured that all parentless styles inherited all docDefaults. Change-Id: I0ae0ccc4d69c784611fd762b5aed6e924196caf1 Reviewed-on: https://gerrit.libreoffice.org/58829 Tested-by: Jenkins Reviewed-by: Justin Luth Reviewed-by: Miklos Vajna --- sw/qa/extras/ooxmlexport/ooxmlexport10.cxx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'sw/qa/extras/ooxmlexport/ooxmlexport10.cxx') diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx index 9e8d8c9d5df5..4db28720e0fa 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx @@ -310,7 +310,18 @@ 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" )); + CPPUNIT_ASSERT_EQUAL( sal_Int32(style::ParagraphAdjust_RIGHT), getProperty< sal_Int32 >( getParagraph(2), "ParaAdjust" )); +} + +DECLARE_OOXMLEXPORT_TEST(testFdo72560e, "fdo72560e.docx") +{ + // The problem was libreoffice confuse when *locale* is RTL, but w:bidi / w:jc are never defined. + // This unit test would only be noticed if the testing environment is set to something like an Arabic locale. + CPPUNIT_ASSERT_EQUAL(text::WritingMode2::LR_TB, getProperty( getParagraph(2), "WritingMode" )); + CPPUNIT_ASSERT_EQUAL(sal_Int32(style::ParagraphAdjust_LEFT), getProperty( getParagraph(2), "ParaAdjust" )); + + // widow/orphan control is on when never specified. + CPPUNIT_ASSERT_EQUAL(sal_Int8(2), getProperty( getParagraph(2), "ParaWidows" )); } DECLARE_OOXMLEXPORT_TEST(testRPrChangeClosed, "rprchange_closed.docx") -- cgit v1.2.3