tdf#164627 docx export: consolidate getWordCompatibilityMode()
[LibreOffice.git] / sc / qa / extras / scspreadsheetsettingsobj.cxx
blob64712bc58a44b16fa1917e5ad3dd5baf2cf9ae97
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/beans/xpropertyset.hxx>
12 #include <test/sheet/spreadsheetdocumentsettings.hxx>
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;
21 namespace sc_apitest
23 class ScSpreadsheetSettingsObj : public UnoApiTest,
24 public apitest::SpreadsheetDocumentSettings,
25 public apitest::XPropertySet
27 public:
28 ScSpreadsheetSettingsObj();
30 virtual uno::Reference<uno::XInterface> init() override;
31 virtual void setUp() override;
33 CPPUNIT_TEST_SUITE(ScSpreadsheetSettingsObj);
35 // SpreadsheetDocumentSettings
36 CPPUNIT_TEST(testSpreadsheetDocumentSettingsProperties);
38 // XPropertySet
39 CPPUNIT_TEST(testGetPropertySetInfo);
40 CPPUNIT_TEST(testGetPropertyValue);
41 CPPUNIT_TEST(testSetPropertyValue);
42 CPPUNIT_TEST(testPropertyChangeListener);
43 CPPUNIT_TEST(testVetoableChangeListener);
45 CPPUNIT_TEST_SUITE_END();
48 ScSpreadsheetSettingsObj::ScSpreadsheetSettingsObj()
49 : UnoApiTest(u"/sc/qa/extras/testdocuments"_ustr)
50 , XPropertySet({ u"AreaLinks"_ustr, u"CharLocale"_ustr, u"CharLocaleAsian"_ustr,
51 u"CharLocaleComplex"_ustr, u"ColumnLabelRanges"_ustr, u"DDELinks"_ustr,
52 u"DatabaseRanges"_ustr, u"ExternalDocLinks"_ustr, u"InteropGrabBag"_ustr,
53 u"NamedRanges"_ustr, u"NullDate"_ustr, u"RowLabelRanges"_ustr,
54 u"SheetLinks"_ustr, u"Theme"_ustr })
58 uno::Reference<uno::XInterface> ScSpreadsheetSettingsObj::init()
60 uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, uno::UNO_QUERY_THROW);
61 return xDoc;
64 void ScSpreadsheetSettingsObj::setUp()
66 UnoApiTest::setUp();
67 // create a calc document
68 loadFromURL(u"private:factory/scalc"_ustr);
71 CPPUNIT_TEST_SUITE_REGISTRATION(ScSpreadsheetSettingsObj);
73 } // namespace sc_apitest
75 CPPUNIT_PLUGIN_IMPLEMENT();
77 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */