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/documentsettings.hxx>
13 #include <com/sun/star/lang/XMultiServiceFactory.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 ScDocumentConfigurationObj
: public UnoApiTest
, public apitest::DocumentSettings
28 ScDocumentConfigurationObj();
30 virtual uno::Reference
<uno::XInterface
> init() override
;
32 virtual void setUp() override
;
34 CPPUNIT_TEST_SUITE(ScDocumentConfigurationObj
);
37 CPPUNIT_TEST(testDocumentSettingsProperties
);
39 CPPUNIT_TEST_SUITE_END();
42 ScDocumentConfigurationObj::ScDocumentConfigurationObj()
43 : UnoApiTest(u
"/sc/qa/extras/testdocuments"_ustr
)
47 uno::Reference
<uno::XInterface
> ScDocumentConfigurationObj::init()
49 uno::Reference
<sheet::XSpreadsheetDocument
> xDoc(mxComponent
, UNO_QUERY_THROW
);
50 uno::Reference
<lang::XMultiServiceFactory
> xMSF(xDoc
, UNO_QUERY_THROW
);
51 return xMSF
->createInstance(u
"com.sun.star.sheet.DocumentSettings"_ustr
);
54 void ScDocumentConfigurationObj::setUp()
57 // create a calc document
58 loadFromURL(u
"private:factory/scalc"_ustr
);
61 CPPUNIT_TEST_SUITE_REGISTRATION(ScDocumentConfigurationObj
);
65 CPPUNIT_PLUGIN_IMPLEMENT();
67 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */