Revert "Revert "Revert "stronger typing for SwClient::GetRegisteredIn"" and fix SwIte...
[LibreOffice.git] / sc / qa / extras / scconsolidationdescriptorobj.cxx
blob99a008d2698db1252b981b9456ebb34bf14e6a17
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/unoapi_test.hxx>
11 #include <test/sheet/xconsolidationdescriptor.hxx>
13 #include <com/sun/star/sheet/XConsolidatable.hpp>
14 #include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
15 #include <com/sun/star/uno/XInterface.hpp>
17 #include <com/sun/star/uno/Reference.hxx>
19 using namespace css;
20 using namespace css::uno;
21 using namespace com::sun::star;
23 namespace sc_apitest
25 class ScConsolidationDescriptorObj : public UnoApiTest, public apitest::XConsolidationDescriptor
27 public:
28 ScConsolidationDescriptorObj();
30 virtual uno::Reference<uno::XInterface> init() override;
31 virtual void setUp() override;
33 CPPUNIT_TEST_SUITE(ScConsolidationDescriptorObj);
35 // XConsolidationDescriptor
36 CPPUNIT_TEST(testGetFunction);
37 CPPUNIT_TEST(testSetFunction);
38 CPPUNIT_TEST(testGetSources);
39 CPPUNIT_TEST(testSetSources);
40 CPPUNIT_TEST(testGetStartOutputPosition);
41 CPPUNIT_TEST(testSetStartOutputPosition);
42 CPPUNIT_TEST(testGetUseColumnHeaders);
43 CPPUNIT_TEST(testSetUseColumnHeaders);
44 CPPUNIT_TEST(testGetUseRowHeaders);
45 CPPUNIT_TEST(testSetUseRowHeaders);
46 CPPUNIT_TEST(testGetInsertLinks);
47 CPPUNIT_TEST(testSetInsertLinks);
49 CPPUNIT_TEST_SUITE_END();
52 ScConsolidationDescriptorObj::ScConsolidationDescriptorObj()
53 : UnoApiTest(u"/sc/qa/extras/testdocuments"_ustr)
57 uno::Reference<uno::XInterface> ScConsolidationDescriptorObj::init()
59 uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, UNO_QUERY_THROW);
61 uno::Reference<sheet::XConsolidatable> xConsolidatable(xDoc, UNO_QUERY_THROW);
62 return xConsolidatable->createConsolidationDescriptor(true);
65 void ScConsolidationDescriptorObj::setUp()
67 UnoApiTest::setUp();
68 // create a calc document
69 loadFromURL(u"private:factory/scalc"_ustr);
72 CPPUNIT_TEST_SUITE_REGISTRATION(ScConsolidationDescriptorObj);
74 } // end namespace
76 CPPUNIT_PLUGIN_IMPLEMENT();
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */