1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
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/.
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>
20 using namespace css::uno
;
21 using namespace com::sun::star
;
25 class ScConsolidationDescriptorObj
: public UnoApiTest
, public apitest::XConsolidationDescriptor
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()
68 // create a calc document
69 loadFromURL(u
"private:factory/scalc"_ustr
);
72 CPPUNIT_TEST_SUITE_REGISTRATION(ScConsolidationDescriptorObj
);
76 CPPUNIT_PLUGIN_IMPLEMENT();
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */