From c071e5f6858661881065cbb4e644c37c8e94ccc6 Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Thu, 24 Aug 2017 22:17:18 -0400 Subject: tdf#108765 DOCX: after import, allow default styles again During import, we don't want LO's style defaults to intermingle with those of MSO [1]. However, if any styles are NOT defined by the document itself, then we want to use that new style with appropriate defaults. For example, if footnotes were never used, that style might not be defined in the .docx file. Later, if a user inserts a footnote for the first time, we certainly don't want the "default paragraph" settings. Instead, we want the default "Footnote" settings. [1]: see commit b95d203bc17c83ec0fe5139f519d53ed1d842d3a Change-Id: Ia71490e795885d3c16f764d0f716f6499765cb67 Reviewed-on: https://gerrit.libreoffice.org/41546 Tested-by: Jenkins Reviewed-by: Justin Luth --- sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sw/qa/extras') diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 686b4d2a506d..57b41c224b84 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -359,6 +359,10 @@ DECLARE_OOXMLEXPORT_TEST(testTdf104713_undefinedStyles, "tdf104713_undefinedStyl // Normal paragraph style was not defined, so don't replace conflicting styles uno::Reference xStyle(getStyles("ParagraphStyles")->getByName("Heading 1"), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(static_cast(212), getProperty(xStyle, "ParaBottomMargin")); + + // tdf108765: once importing is finished, use default values for any styles not yet defined. + xStyle.set( getStyles("ParagraphStyles")->getByName("Footnote"), uno::UNO_QUERY ); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Font size", 10.f, getProperty(xStyle, "CharHeight")); } DECLARE_OOXMLEXPORT_TEST(testDrawingmlFlipv, "drawingml-flipv.docx") -- cgit