summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/CppunitTest_sw_ww8export4.mk14
-rw-r--r--sw/Module_sw.mk1
-rw-r--r--sw/qa/extras/ww8export/data/tdf148360.docbin0 -> 10240 bytes
-rw-r--r--sw/qa/extras/ww8export/ww8export4.cxx55
-rw-r--r--sw/source/filter/ww8/ww8par.cxx1
5 files changed, 71 insertions, 0 deletions
diff --git a/sw/CppunitTest_sw_ww8export4.mk b/sw/CppunitTest_sw_ww8export4.mk
new file mode 100644
index 000000000000..47ac483ba688
--- /dev/null
+++ b/sw/CppunitTest_sw_ww8export4.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_ww8export_test,4))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index 146b6c7bf138..e93ae26ceb42 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -100,6 +100,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\
CppunitTest_sw_ww8export \
CppunitTest_sw_ww8export2 \
CppunitTest_sw_ww8export3 \
+ CppunitTest_sw_ww8export4 \
CppunitTest_sw_ww8import \
CppunitTest_sw_rtfimport \
CppunitTest_sw_odfexport \
diff --git a/sw/qa/extras/ww8export/data/tdf148360.doc b/sw/qa/extras/ww8export/data/tdf148360.doc
new file mode 100644
index 000000000000..3969a560999f
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/tdf148360.doc
Binary files differ
diff --git a/sw/qa/extras/ww8export/ww8export4.cxx b/sw/qa/extras/ww8export/ww8export4.cxx
new file mode 100644
index 000000000000..91b9477a996f
--- /dev/null
+++ b/sw/qa/extras/ww8export/ww8export4.cxx
@@ -0,0 +1,55 @@
+/* -*- 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>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
+
+#include <comphelper/sequenceashashmap.hxx>
+#include <o3tl/string_view.hxx>
+
+#include <docsh.hxx>
+#include <IDocumentSettingAccess.hxx>
+#include <unotxdoc.hxx>
+
+class Test : public SwModelTestBase
+{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/extras/ww8export/data/", "MS Word 97")
+ {
+ }
+
+ bool mustTestImportOf(const char* filename) const override
+ {
+ // If the testcase is stored in some other format, it's pointless to test.
+ return o3tl::ends_with(filename, ".doc");
+ }
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf148360)
+{
+ loadAndReload("tdf148360.doc");
+ const auto& pLayout = parseLayoutDump();
+
+ // Ensure first element is a tab
+ assertXPath(pLayout, "/root/page[1]/body/txt[1]/Text[1]", "nType", "PortionType::TabLeft");
+ // and only then goes content
+ assertXPath(pLayout, "/root/page[1]/body/txt[1]/Text[2]", "nType", "PortionType::Text");
+}
+
+
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 548726482993..1da871b4c9d1 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1887,6 +1887,7 @@ void SwWW8ImplReader::ImportDop()
m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::SURROUND_TEXT_WRAP_SMALL, true);
m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::PROP_LINE_SPACING_SHRINKS_FIRST_LINE, true);
m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::CONTINUOUS_ENDNOTES, true);
+ m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::NO_NUMBERING_SHOW_FOLLOWBY, true);
// COMPATIBILITY FLAGS END