tdf#135973: DOCX export: improved list override support
[LibreOffice.git] / sw / qa / extras / ooxmlexport / ooxmlexport15.cxx
blob2942b74dd19473dfeae17b50af9129b7ec612e31
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 #include <swmodeltestbase.hxx>
12 #include <com/sun/star/beans/XPropertySet.hpp>
14 char const DATA_DIRECTORY[] = "/sw/qa/extras/ooxmlexport/data/";
16 class Test : public SwModelTestBase
18 public:
19 Test() : SwModelTestBase(DATA_DIRECTORY, "Office Open XML Text") {}
21 protected:
22 /**
23 * Blacklist handling
25 bool mustTestImportOf(const char* filename) const override {
26 // If the testcase is stored in some other format, it's pointless to test.
27 return OString(filename).endsWith(".docx");
31 DECLARE_OOXMLEXPORT_TEST(testTdf133334_followPgStyle, "tdf133334_followPgStyle.odt")
33 CPPUNIT_ASSERT_EQUAL(2, getPages());
36 DECLARE_OOXMLEXPORT_TEST(testTdf135973, "tdf135973.odt")
38 CPPUNIT_ASSERT_EQUAL(1, getPages());
40 uno::Reference<beans::XPropertySet> xPara(getParagraph(2), uno::UNO_QUERY);
41 CPPUNIT_ASSERT_EQUAL(OUString("1."), getProperty<OUString>(xPara, "ListLabelString"));
44 uno::Reference<beans::XPropertySet> xPara(getParagraph(3), uno::UNO_QUERY);
45 CPPUNIT_ASSERT_EQUAL(OUString("2."), getProperty<OUString>(xPara, "ListLabelString"));
48 uno::Reference<beans::XPropertySet> xPara(getParagraph(5), uno::UNO_QUERY);
49 CPPUNIT_ASSERT_EQUAL(OUString("1."), getProperty<OUString>(xPara, "ListLabelString"));
52 uno::Reference<beans::XPropertySet> xPara(getParagraph(6), uno::UNO_QUERY);
53 CPPUNIT_ASSERT_EQUAL(OUString("2."), getProperty<OUString>(xPara, "ListLabelString"));
57 CPPUNIT_PLUGIN_IMPLEMENT();
59 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */