diff options
author | Justin Luth <justin.luth@collabora.com> | 2020-12-15 10:01:03 +0300 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2020-12-16 06:04:18 +0100 |
commit | bfcd952dc7820c4cf8761c4222d29ede039391dc (patch) | |
tree | f58cfdecbf29ad46c8ad8af9be027e8319c5a94a /sw/qa | |
parent | 59301a1cadd87a63276650975252d14e8477e632 (diff) |
tdf#138892 writerfilter: cancel style list if bNoNumbering
This fixes 6.1 regression e24e2d2fb02239753c1520a0458b44683ea4cc2e.
Starting in 7.0 (tdf#131321), paragraph styles kept their
numbering property. But even before that, non-paragraphs
marked by bNoNumbering we having their direct numbering
removed, and then finishParagraph applied para-style
numbering since there was no direct numbering.
So, we need to pass the bNoNumbering to finishParagraph
so that it can cancel out a style-assigned numbering.
Change-Id: I0c24af4e9bd0ea3712179a47ed3550f91c8f44b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107738
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf138892_noNumbering.docx | bin | 0 -> 18468 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport16.cxx | 43 |
2 files changed, 43 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf138892_noNumbering.docx b/sw/qa/extras/ooxmlexport/data/tdf138892_noNumbering.docx Binary files differnew file mode 100644 index 000000000000..5c0a0176e37c --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf138892_noNumbering.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx new file mode 100644 index 000000000000..174f2f0f7330 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx @@ -0,0 +1,43 @@ +/* -*- 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/text/XTextViewCursorSupplier.hpp> +#include <com/sun/star/text/XTextTable.hpp> +#include <com/sun/star/text/XTextTablesSupplier.hpp> + +char const DATA_DIRECTORY[] = "/sw/qa/extras/ooxmlexport/data/"; + +class Test : public SwModelTestBase +{ +public: + Test() : SwModelTestBase(DATA_DIRECTORY, "Office Open XML Text") {} + +protected: + /** + * Denylist 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(testTdf138892_noNumbering, "tdf138892_noNumbering.docx") +{ + CPPUNIT_ASSERT_MESSAGE("Para1: Bullet point", !getProperty<OUString>(getParagraph(1), "NumberingStyleName").isEmpty()); + CPPUNIT_ASSERT_MESSAGE("Para2: <blank line>", getProperty<OUString>(getParagraph(2), "NumberingStyleName").isEmpty()); + CPPUNIT_ASSERT_MESSAGE("Para3: <blank line>", getProperty<OUString>(getParagraph(3), "NumberingStyleName").isEmpty()); +} + +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |