update emoji autocorrect entries from po-files
[LibreOffice.git] / sc / qa / extras / scmodelobj.cxx
blobbb04af931bfe5f6d268e46d69b9672075693eb3d
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 <test/unoapi_test.hxx>
11 #include <test/sheet/xgoalseek.hxx>
13 using namespace css;
14 using namespace css::uno;
16 namespace sc_apitest {
18 #define NUMBER_OF_TESTS 1
20 class ScModelObj : public UnoApiTest, apitest::XGoalSeek
22 public:
23 virtual void setUp() SAL_OVERRIDE;
24 virtual void tearDown() SAL_OVERRIDE;
26 virtual uno::Reference< uno::XInterface > init() SAL_OVERRIDE;
28 ScModelObj();
30 CPPUNIT_TEST_SUITE(ScModelObj);
31 CPPUNIT_TEST(testSeekGoal);
32 CPPUNIT_TEST_SUITE_END();
34 private:
35 static sal_Int32 nTest;
36 static uno::Reference< lang::XComponent > mxComponent;
39 ScModelObj::ScModelObj()
40 : UnoApiTest("/sc/qa/extras/testdocuments")
44 sal_Int32 ScModelObj::nTest = 0;
45 uno::Reference< lang::XComponent > ScModelObj::mxComponent;
47 uno::Reference< uno::XInterface > ScModelObj::init()
49 OUString aFileURL;
50 createFileURL(OUString("ScModelObj.ods"), aFileURL);
51 if(!mxComponent.is())
52 mxComponent = loadFromDesktop(aFileURL, "com.sun.star.sheet.SpreadsheetDocument");
53 CPPUNIT_ASSERT(mxComponent.is());
55 return mxComponent;
58 void ScModelObj::setUp()
60 nTest++;
61 UnoApiTest::setUp();
64 void ScModelObj::tearDown()
66 if (nTest == NUMBER_OF_TESTS)
68 closeDocument(mxComponent);
69 mxComponent.clear();
72 UnoApiTest::tearDown();
75 CPPUNIT_TEST_SUITE_REGISTRATION(ScModelObj);
79 CPPUNIT_PLUGIN_IMPLEMENT();
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */