summaryrefslogtreecommitdiffstats
path: root/writerperfect/qa/unit/WpftImpressFilterTest.cxx
blob: f6f7608f7dad6a7e5175dbbc7517c7bdcc7c84a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/* -*- 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 "WpftFilterTestBase.hxx"

namespace
{
class WpftImpressFilterTest : public writerperfect::test::WpftFilterTestBase
{
public:
    WpftImpressFilterTest();

    void test();

    CPPUNIT_TEST_SUITE(WpftImpressFilterTest);
    CPPUNIT_TEST(test);
    CPPUNIT_TEST_SUITE_END();
};

WpftImpressFilterTest::WpftImpressFilterTest()
    : writerperfect::test::WpftFilterTestBase("private:factory/simpress")
{
}

void WpftImpressFilterTest::test()
{
    const writerperfect::test::WpftOptionalMap_t aEtonyekOptional{
        { "Keynote_1.key", REQUIRE_ETONYEK_VERSION(0, 1, 8) },
        { "Keynote_2.key", REQUIRE_ETONYEK_VERSION(0, 1, 1) },
        { "Keynote_3.key", REQUIRE_ETONYEK_VERSION(0, 1, 1) },
        { "Keynote_6.key", REQUIRE_ETONYEK_VERSION(0, 1, 4) },
    };
    const writerperfect::test::WpftOptionalMap_t aMWAWOptional{
        { "ClarisWorks_6.0.cwk", REQUIRE_MWAW_VERSION(0, 3, 3) },
        { "PowerPoint_Mac_1", REQUIRE_MWAW_VERSION(0, 3, 9) },
        { "PowerPoint_Mac_2", REQUIRE_MWAW_VERSION(0, 3, 9) },
        { "PowerPoint_Mac_3", REQUIRE_MWAW_VERSION(0, 3, 9) },
        { "PowerPoint_Mac_4.ppt", REQUIRE_MWAW_VERSION(0, 3, 10) },
        { "PowerPoint_2.ppt", REQUIRE_MWAW_VERSION(0, 3, 10) },
        { "PowerPoint_3.ppt", REQUIRE_MWAW_VERSION(0, 3, 9) },
        { "PowerPoint_4.ppt", REQUIRE_MWAW_VERSION(0, 3, 10) },
        { "PowerPoint_7.ppt", REQUIRE_MWAW_VERSION(0, 3, 11) },
    };

    doTest("org.libreoffice.comp.Impress.KeynoteImportFilter",
           "/writerperfect/qa/unit/data/impress/libetonyek/", aEtonyekOptional);
    doTest("com.sun.star.comp.Impress.MWAWPresentationImportFilter",
           "/writerperfect/qa/unit/data/impress/libmwaw/", aMWAWOptional);
}

CPPUNIT_TEST_SUITE_REGISTRATION(WpftImpressFilterTest);
}

CPPUNIT_PLUGIN_IMPLEMENT();

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */