1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/calc_unoapi_test.hxx>
11 #include <test/sheet/xsheetoutline.hxx>
13 #include <com/sun/star/lang/XComponent.hpp>
14 #include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
15 #include <com/sun/star/sheet/XSpreadsheet.hpp>
18 using namespace css::uno
;
22 class ScOutlineObj
: public CalcUnoApiTest
, public apitest::XSheetOutline
27 virtual void setUp() override
;
28 virtual void tearDown() override
;
30 virtual uno::Reference
<uno::XInterface
> init() override
;
32 CPPUNIT_TEST_SUITE(ScOutlineObj
);
35 CPPUNIT_TEST(testHideDetail
);
36 CPPUNIT_TEST(testShowDetail
);
37 CPPUNIT_TEST(testShowLevel
);
38 CPPUNIT_TEST(testUngroup
);
39 CPPUNIT_TEST(testGroup
);
40 //CPPUNIT_TEST(testAutoOutline);
41 CPPUNIT_TEST(testClearOutline
);
43 CPPUNIT_TEST_SUITE_END();
46 uno::Reference
<lang::XComponent
> mxComponent
;
49 ScOutlineObj::ScOutlineObj()
50 : CalcUnoApiTest("/sc/qa/extras/testdocuments")
54 uno::Reference
<uno::XInterface
> ScOutlineObj::init()
56 // get the first sheet
57 uno::Reference
<sheet::XSpreadsheetDocument
> xDoc(mxComponent
, UNO_QUERY_THROW
);
59 uno::Reference
<container::XIndexAccess
> xIndex(xDoc
->getSheets(), UNO_QUERY_THROW
);
60 uno::Reference
<sheet::XSpreadsheet
> xSheet(xIndex
->getByIndex(0), UNO_QUERY_THROW
);
65 void ScOutlineObj::setUp()
67 CalcUnoApiTest::setUp();
68 // create a calc document
70 createFileURL("ScOutlineObj.ods", aFileURL
);
71 mxComponent
= loadFromDesktop(aFileURL
);
74 void ScOutlineObj::tearDown()
76 closeDocument(mxComponent
);
77 CalcUnoApiTest::tearDown();
80 CPPUNIT_TEST_SUITE_REGISTRATION(ScOutlineObj
);
83 CPPUNIT_PLUGIN_IMPLEMENT();
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */