nss: upgrade to release 3.73
[LibreOffice.git] / sc / qa / extras / scconsolidationdescriptorobj.cxx
blobe229ade7e5a82dd0731363c26511e94d25c326ba
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
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/calc_unoapi_test.hxx>
11 #include <test/sheet/xconsolidationdescriptor.hxx>
13 #include <com/sun/star/lang/XComponent.hpp>
14 #include <com/sun/star/sheet/XConsolidatable.hpp>
15 #include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
16 #include <com/sun/star/uno/XInterface.hpp>
18 #include <com/sun/star/uno/Reference.hxx>
20 using namespace css;
21 using namespace css::uno;
22 using namespace com::sun::star;
24 namespace sc_apitest
26 class ScConsolidationDescriptorObj : public CalcUnoApiTest, public apitest::XConsolidationDescriptor
28 public:
29 ScConsolidationDescriptorObj();
31 virtual uno::Reference<uno::XInterface> init() override;
32 virtual void setUp() override;
33 virtual void tearDown() override;
35 CPPUNIT_TEST_SUITE(ScConsolidationDescriptorObj);
37 // XConsolidationDescriptor
38 CPPUNIT_TEST(testGetFunction);
39 CPPUNIT_TEST(testSetFunction);
40 CPPUNIT_TEST(testGetSources);
41 CPPUNIT_TEST(testSetSources);
42 CPPUNIT_TEST(testGetStartOutputPosition);
43 CPPUNIT_TEST(testSetStartOutputPosition);
44 CPPUNIT_TEST(testGetUseColumnHeaders);
45 CPPUNIT_TEST(testSetUseColumnHeaders);
46 CPPUNIT_TEST(testGetUseRowHeaders);
47 CPPUNIT_TEST(testSetUseRowHeaders);
48 CPPUNIT_TEST(testGetInsertLinks);
49 CPPUNIT_TEST(testSetInsertLinks);
51 CPPUNIT_TEST_SUITE_END();
53 private:
54 uno::Reference<lang::XComponent> mxComponent;
57 ScConsolidationDescriptorObj::ScConsolidationDescriptorObj()
58 : CalcUnoApiTest("/sc/qa/extras/testdocuments")
62 uno::Reference<uno::XInterface> ScConsolidationDescriptorObj::init()
64 uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, UNO_QUERY_THROW);
66 uno::Reference<sheet::XConsolidatable> xConsolidatable(xDoc, UNO_QUERY_THROW);
67 return xConsolidatable->createConsolidationDescriptor(true);
70 void ScConsolidationDescriptorObj::setUp()
72 CalcUnoApiTest::setUp();
73 // create a calc document
74 mxComponent = loadFromDesktop("private:factory/scalc");
77 void ScConsolidationDescriptorObj::tearDown()
79 closeDocument(mxComponent);
80 CalcUnoApiTest::tearDown();
83 CPPUNIT_TEST_SUITE_REGISTRATION(ScConsolidationDescriptorObj);
85 } // end namespace
87 CPPUNIT_PLUGIN_IMPLEMENT();
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */