Avoid potential negative array index access to cached text.
[LibreOffice.git] / writerperfect / qa / unit / WpftCalcFilterTest.cxx
blob22d1d4f95dd2cbcd12c572af30a8d2967fc9091e
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 "WpftFilterTestBase.hxx"
12 namespace
14 class WpftCalcFilterTest : public writerperfect::test::WpftFilterTestBase
16 public:
17 WpftCalcFilterTest();
19 void test();
21 CPPUNIT_TEST_SUITE(WpftCalcFilterTest);
22 CPPUNIT_TEST(test);
23 CPPUNIT_TEST_SUITE_END();
26 WpftCalcFilterTest::WpftCalcFilterTest()
27 : writerperfect::test::WpftFilterTestBase("private:factory/scalc")
31 void WpftCalcFilterTest::test()
33 const writerperfect::test::WpftOptionalMap_t aEtonyekOptional{
34 { "Numbers_2.numbers", REQUIRE_ETONYEK_VERSION(0, 1, 2) },
36 const writerperfect::test::WpftOptionalMap_t aMWAWOptional{
37 { "JazzLotus.hqx", REQUIRE_MWAW_VERSION(0, 3, 17) },
38 { "Multiplan_1.hqx", REQUIRE_MWAW_VERSION(0, 3, 14) },
40 const writerperfect::test::WpftOptionalMap_t aWpsOptional{
41 { "Lotus123_3.123", REQUIRE_WPS_VERSION(0, 4, 5) },
42 { "Lotus123_98.123", REQUIRE_WPS_VERSION(0, 4, 6) },
43 { "Multiplan_3", REQUIRE_WPS_VERSION(0, 4, 9) },
44 { "QuattroPro.wb1", REQUIRE_WPS_VERSION(0, 4, 8) },
47 doTest("com.sun.star.comp.Calc.MWAWCalcImportFilter",
48 u"/writerperfect/qa/unit/data/calc/libmwaw/", aMWAWOptional);
49 doTest("com.sun.star.comp.Calc.MSWorksCalcImportFilter",
50 u"/writerperfect/qa/unit/data/calc/libwps/", aWpsOptional);
51 doTest("org.libreoffice.comp.Calc.NumbersImportFilter",
52 u"/writerperfect/qa/unit/data/calc/libetonyek/", aEtonyekOptional);
53 doTest("org.libreoffice.comp.Calc.StarOfficeCalcImportFilter",
54 u"/writerperfect/qa/unit/data/calc/libstaroffice/");
57 CPPUNIT_TEST_SUITE_REGISTRATION(WpftCalcFilterTest);
60 CPPUNIT_PLUGIN_IMPLEMENT();
62 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */