diff options
author | Justin Luth <justin_luth@sil.org> | 2018-07-17 09:24:58 +0300 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2018-07-24 06:09:20 +0200 |
commit | 0fbf627a4beca383c25cc50cfa9d555f18fade53 (patch) | |
tree | 29c17cea5a2f2d2734dda9d8dec59e509b854ead /sw/qa/extras/ooxmlexport | |
parent | ea96a4815e456295ca7454475e54cd8b0ba5c388 (diff) |
tdf#72560 writerfilter: StyleProperty - also check DocDefaults
Styles without parents still have inheritance - from the DocDefaults.
So, make sure to check those properties too in
GetPropertyFromStyleSheet() (and therefore also in GetAnyProperty).
Currently, this should only impact when InStyleSheetImport(),
but if the docDefaults ever find a way to naturally migrate
into LO as doc defaults and not into the style itself, then
this will also be useful to check for paragraph properties etc.
Change-Id: Ic02cd10c104c0330684308f1380a77009206a664
Reviewed-on: https://gerrit.libreoffice.org/57805
Reviewed-by: Justin Luth <justin_luth@sil.org>
Tested-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw/qa/extras/ooxmlexport')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/fdo72560c.docx | bin | 0 -> 9969 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport10.cxx | 8 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/fdo72560c.docx b/sw/qa/extras/ooxmlexport/data/fdo72560c.docx Binary files differnew file mode 100644 index 000000000000..ed0b88822066 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/fdo72560c.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx index 381262a85d33..bd90c27c4a7f 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx @@ -298,6 +298,14 @@ DECLARE_OOXMLEXPORT_TEST(testFdo72560b, "fdo72560b.docx") CPPUNIT_ASSERT_EQUAL( sal_Int32(style::ParagraphAdjust_LEFT), getProperty< sal_Int32 >( xParaEndRTL, "ParaAdjust" )); } +DECLARE_OOXMLEXPORT_TEST(testFdo72560c, "fdo72560c.docx") +{ + // The problem was libreoffice confuse when RTL was specified in DocDefaults + uno::Reference<uno::XInterface> xParaEndRTL(getParagraph( 2, "RTL END")); + CPPUNIT_ASSERT_EQUAL(text::WritingMode2::RL_TB, getProperty<sal_Int16>( xParaEndRTL, "WritingMode" )); + CPPUNIT_ASSERT_EQUAL( sal_Int32(style::ParagraphAdjust_LEFT), getProperty< sal_Int32 >( xParaEndRTL, "ParaAdjust" )); +} + DECLARE_OOXMLEXPORT_TEST(testRPrChangeClosed, "rprchange_closed.docx") { // Redline defined by rPrChanged wasn't removed. |