nss: upgrade to release 3.73
[LibreOffice.git] / sc / qa / extras / scspreadsheetsettingsobj.cxx
blobfaf0b56055bf0d32f1d3a4498ec87fada1352729
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/calc_unoapi_test.hxx>
11 #include <test/beans/xpropertyset.hxx>
12 #include <test/sheet/spreadsheetdocumentsettings.hxx>
14 #include <com/sun/star/lang/XComponent.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>
20 using namespace css;
22 namespace sc_apitest
24 class ScSpreadsheetSettingsObj : public CalcUnoApiTest,
25 public apitest::SpreadsheetDocumentSettings,
26 public apitest::XPropertySet
28 public:
29 ScSpreadsheetSettingsObj();
31 virtual uno::Reference<uno::XInterface> init() override;
32 virtual void setUp() override;
33 virtual void tearDown() override;
35 CPPUNIT_TEST_SUITE(ScSpreadsheetSettingsObj);
37 // SpreadsheetDocumentSettings
38 CPPUNIT_TEST(testSpreadsheetDocumentSettingsProperties);
40 // XPropertySet
41 CPPUNIT_TEST(testGetPropertySetInfo);
42 CPPUNIT_TEST(testGetPropertyValue);
43 CPPUNIT_TEST(testSetPropertyValue);
44 CPPUNIT_TEST(testPropertyChangeListener);
45 CPPUNIT_TEST(testVetoableChangeListener);
47 CPPUNIT_TEST_SUITE_END();
49 private:
50 uno::Reference<lang::XComponent> mxComponent;
53 ScSpreadsheetSettingsObj::ScSpreadsheetSettingsObj()
54 : CalcUnoApiTest("/sc/qa/extras/testdocuments")
55 , XPropertySet({
56 "AreaLinks",
57 "CharLocale",
58 "CharLocaleAsian",
59 "CharLocaleComplex",
60 "ColumnLabelRanges",
61 "DDELinks",
62 "DatabaseRanges",
63 "ExternalDocLinks",
64 "InteropGrabBag",
65 "NamedRanges",
66 "NullDate",
67 "RowLabelRanges",
68 "SheetLinks",
73 uno::Reference<uno::XInterface> ScSpreadsheetSettingsObj::init()
75 uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, uno::UNO_QUERY_THROW);
76 return xDoc;
79 void ScSpreadsheetSettingsObj::setUp()
81 CalcUnoApiTest::setUp();
82 // create a calc document
83 mxComponent = loadFromDesktop("private:factory/scalc");
86 void ScSpreadsheetSettingsObj::tearDown()
88 closeDocument(mxComponent);
89 CalcUnoApiTest::tearDown();
92 CPPUNIT_TEST_SUITE_REGISTRATION(ScSpreadsheetSettingsObj);
94 } // namespace sc_apitest
96 CPPUNIT_PLUGIN_IMPLEMENT();
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */