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/calc_unoapi_test.hxx>
11 #include <test/sheet/documentsettings.hxx>
13 #include <com/sun/star/lang/XComponent.hpp>
14 #include <com/sun/star/lang/XMultiServiceFactory.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>
21 using namespace css::uno
;
22 using namespace com::sun::star
;
26 class ScDocumentConfigurationObj
: public CalcUnoApiTest
, public apitest::DocumentSettings
29 ScDocumentConfigurationObj();
31 virtual uno::Reference
<uno::XInterface
> init() override
;
33 virtual void setUp() override
;
34 virtual void tearDown() override
;
36 CPPUNIT_TEST_SUITE(ScDocumentConfigurationObj
);
39 CPPUNIT_TEST(testDocumentSettingsProperties
);
41 CPPUNIT_TEST_SUITE_END();
44 uno::Reference
<lang::XComponent
> mxComponent
;
47 ScDocumentConfigurationObj::ScDocumentConfigurationObj()
48 : CalcUnoApiTest("/sc/qa/extras/testdocuments")
52 uno::Reference
<uno::XInterface
> ScDocumentConfigurationObj::init()
54 uno::Reference
<sheet::XSpreadsheetDocument
> xDoc(mxComponent
, UNO_QUERY_THROW
);
55 uno::Reference
<lang::XMultiServiceFactory
> xMSF(xDoc
, UNO_QUERY_THROW
);
56 return xMSF
->createInstance("com.sun.star.sheet.DocumentSettings");
59 void ScDocumentConfigurationObj::setUp()
61 CalcUnoApiTest::setUp();
62 // create a calc document
63 mxComponent
= loadFromDesktop("private:factory/scalc");
66 void ScDocumentConfigurationObj::tearDown()
68 closeDocument(mxComponent
);
69 CalcUnoApiTest::tearDown();
72 CPPUNIT_TEST_SUITE_REGISTRATION(ScDocumentConfigurationObj
);
76 CPPUNIT_PLUGIN_IMPLEMENT();
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */