tdf#164627 docx export: consolidate getWordCompatibilityMode()
[LibreOffice.git] / sc / qa / extras / scdocumentconfigurationobj.cxx
blob8161daee6e86990df97c9ad90ca762b3c42f3dc7
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/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>
19 using namespace css;
20 using namespace css::uno;
21 using namespace com::sun::star;
23 namespace sc_apitest
25 class ScDocumentConfigurationObj : public UnoApiTest, public apitest::DocumentSettings
27 public:
28 ScDocumentConfigurationObj();
30 virtual uno::Reference<uno::XInterface> init() override;
32 virtual void setUp() override;
34 CPPUNIT_TEST_SUITE(ScDocumentConfigurationObj);
36 // DocumentSettings
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()
56 UnoApiTest::setUp();
57 // create a calc document
58 loadFromURL(u"private:factory/scalc"_ustr);
61 CPPUNIT_TEST_SUITE_REGISTRATION(ScDocumentConfigurationObj);
63 } // end namespace
65 CPPUNIT_PLUGIN_IMPLEMENT();
67 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */