1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
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
19 Test() : SwModelTestBase(DATA_DIRECTORY
, "Office Open XML Text") {}
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: */