diff options
-rw-r--r-- | solenv/clang-format/excludelist | 1 | ||||
-rw-r--r-- | sw/CppunitTest_sw_ooxmlexport17.mk | 14 | ||||
-rw-r--r-- | sw/Module_sw.mk | 1 | ||||
-rwxr-xr-x | sw/qa/extras/ooxmlexport/data/tdf135164_cancelledNumbering.docx | bin | 0 -> 19962 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport17.cxx | 47 |
5 files changed, 63 insertions, 0 deletions
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist index 9e4985f4601c..4489b1991fbe 100644 --- a/solenv/clang-format/excludelist +++ b/solenv/clang-format/excludelist @@ -12314,6 +12314,7 @@ sw/qa/extras/ooxmlexport/ooxmlexport13.cxx sw/qa/extras/ooxmlexport/ooxmlexport14.cxx sw/qa/extras/ooxmlexport/ooxmlexport15.cxx sw/qa/extras/ooxmlexport/ooxmlexport16.cxx +sw/qa/extras/ooxmlexport/ooxmlexport17.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_ooxmlexport17.mk b/sw/CppunitTest_sw_ooxmlexport17.mk new file mode 100644 index 000000000000..80316e1c0ca4 --- /dev/null +++ b/sw/CppunitTest_sw_ooxmlexport17.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,17)) + +# vim: set noet sw=4 ts=4: diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk index f4530e2a139d..3f200348d0a3 100644 --- a/sw/Module_sw.mk +++ b/sw/Module_sw.mk @@ -88,6 +88,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\ CppunitTest_sw_ooxmlexport14 \ CppunitTest_sw_ooxmlexport15 \ CppunitTest_sw_ooxmlexport16 \ + CppunitTest_sw_ooxmlexport17 \ CppunitTest_sw_ooxmlexport_template \ CppunitTest_sw_ooxmlfieldexport \ CppunitTest_sw_ooxmllinks \ diff --git a/sw/qa/extras/ooxmlexport/data/tdf135164_cancelledNumbering.docx b/sw/qa/extras/ooxmlexport/data/tdf135164_cancelledNumbering.docx Binary files differnew file mode 100755 index 000000000000..47008b69d98f --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf135164_cancelledNumbering.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx new file mode 100644 index 000000000000..4eb9d0d6aa1b --- /dev/null +++ b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx @@ -0,0 +1,47 @@ +/* -*- 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 <sal/config.h> + +#include <string_view> + +#include <swmodeltestbase.hxx> + +constexpr OUStringLiteral DATA_DIRECTORY = u"/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(testTdf135164_cancelledNumbering, "tdf135164_cancelledNumbering.docx") +{ + uno::Reference<beans::XPropertySet> xPara(getParagraph(1, u"TBMM DÖNEMİ"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xPara, "ListLabelString")); + + xPara.set(getParagraph(2, "Numbering explicitly cancelled"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xPara, "ListLabelString")); + + xPara.set(getParagraph(6, "Default style has roman numbering"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("i"), getProperty<OUString>(xPara, "ListLabelString")); +} + +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |