[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - solenv/clang-format sw/CppunitTest_sw_ooxmlexport15.mk sw/Module_sw.mk sw/qa sw/source

Justin Luth (via logerrit) logerrit at kemper.freedesktop.org
Tue May 26 07:10:32 UTC 2020


 dev/null                                                  |binary
 solenv/clang-format/blacklist                             |    1 
 sw/CppunitTest_sw_ooxmlexport15.mk                        |   14 +++++
 sw/Module_sw.mk                                           |    1 
 sw/qa/extras/ooxmlexport/data/tdf133334_followPgStyle.odt |binary
 sw/qa/extras/ooxmlexport/ooxmlexport15.cxx                |   38 ++++++++++++++
 sw/qa/extras/ww8export/ww8export3.cxx                     |    9 ---
 sw/source/filter/ww8/ww8atr.cxx                           |    2 
 8 files changed, 55 insertions(+), 10 deletions(-)

New commits:
commit 70a2071ce91b71326659e645dd97996262ea309a
Author:     Justin Luth <justin.luth at collabora.com>
AuthorDate: Mon May 25 13:40:09 2020 +0300
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Tue May 26 09:09:56 2020 +0200

    Revert "tdf#104017 DOC export: be less aggressive with merging page styles"
    
    This reverts LO 6.3.4 commit 5d1709a7c4184eb31cfc4c2d3acadff3a4a68189,
    which tdf#133334 shows is wrong. How this made it past QA
    is a mystery to me. There should be lots of examples.
    
    Change-Id: I17be6e4bab44057f4535d4728825e12d068b65d2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94782
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    (cherry picked from commit 42a37f8ce27ad8fca222f50b712a8fed52dbda95)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94683

diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 6f092e83d27b..92dbb233e9d4 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -14840,6 +14840,7 @@ sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
 sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
 sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
 sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
 sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
 sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
diff --git a/sw/CppunitTest_sw_ooxmlexport15.mk b/sw/CppunitTest_sw_ooxmlexport15.mk
new file mode 100644
index 000000000000..ede4d05e4c38
--- /dev/null
+++ b/sw/CppunitTest_sw_ooxmlexport15.mk
@@ -0,0 +1,14 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*************************************************************************
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#*************************************************************************
+
+$(eval $(call sw_ooxmlexport_test,15))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index dc4f303d7a3b..445bbf61c15a 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -80,6 +80,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\
     CppunitTest_sw_ooxmlexport12 \
     CppunitTest_sw_ooxmlexport13 \
     CppunitTest_sw_ooxmlexport14 \
+    CppunitTest_sw_ooxmlexport15 \
     CppunitTest_sw_ooxmlexport_template \
     CppunitTest_sw_ooxmlfieldexport \
     CppunitTest_sw_ooxmllinks \
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133334_followPgStyle.odt b/sw/qa/extras/ooxmlexport/data/tdf133334_followPgStyle.odt
new file mode 100644
index 000000000000..56f21545a095
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf133334_followPgStyle.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
new file mode 100644
index 000000000000..dedad4d00eab
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
@@ -0,0 +1,38 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+
+char const DATA_DIRECTORY[] = "/sw/qa/extras/ooxmlexport/data/";
+
+class Test : public SwModelTestBase
+{
+public:
+    Test() : SwModelTestBase(DATA_DIRECTORY, "Office Open XML Text") {}
+
+protected:
+    /**
+     * Blacklist handling
+     */
+    bool mustTestImportOf(const char* filename) const override {
+        // If the testcase is stored in some other format, it's pointless to test.
+        return OString(filename).endsWith(".docx");
+    }
+};
+
+DECLARE_OOXMLEXPORT_TEST(testTdf133334_followPgStyle, "tdf133334_followPgStyle.odt")
+{
+    CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ww8export/data/tdf104017.doc b/sw/qa/extras/ww8export/data/tdf104017.doc
deleted file mode 100644
index 878cbe25f863..000000000000
Binary files a/sw/qa/extras/ww8export/data/tdf104017.doc and /dev/null differ
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx
index d4a65e685f4a..764ae66a20fa 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -410,15 +410,6 @@ DECLARE_WW8EXPORT_TEST(testPresetDash, "tdf127166_prstDash_Word97.doc")
     }
 }
 
-DECLARE_WW8EXPORT_TEST(testTdf104017, "tdf104017.doc")
-{
-    // Without the accompanying fix in place, this test would have failed with:
-    // - Expected: 2
-    // - Actual  : 1
-    // i.e. the tables on the two pages were merged together to a single one on export.
-    CPPUNIT_ASSERT_EQUAL(2, getPages());
-}
-
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 0aad9bd083ef..0ccb31c3dbb0 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -510,7 +510,7 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode
                 }
             }
         }
-        else if (m_pCurrentPageDesc->GetPoolFormatId() != RES_POOLPAGE_FIRST || !sw::util::IsPlausableSingleWordSection(m_pCurrentPageDesc->GetFirstMaster(), pPageDesc->GetMaster()))
+        else if (!sw::util::IsPlausableSingleWordSection(m_pCurrentPageDesc->GetFirstMaster(), pPageDesc->GetMaster()))
         {
             bBreakSet = true;
             bNewPageDesc = true;


More information about the Libreoffice-commits mailing list