From fd911a32505331174787403e6260202e29ea82b8 Mon Sep 17 00:00:00 2001 From: Jens Carl Date: Thu, 22 Mar 2018 05:46:16 +0000 Subject: tdf#45904 Rename test object for GlobalSheetSettings Rename test object ScSpreadsheetSettingsObj to ScSpreadsheetSettings. Change-Id: Ia70cc82e0ee20571ad029590db735f932e5c7958 Reviewed-on: https://gerrit.libreoffice.org/51723 Tested-by: Jenkins Reviewed-by: Jens Carl --- sc/qa/extras/scspreadsheetsettings.cxx | 79 +++++++++++++++++++++++++++++++ sc/qa/extras/scspreadsheetsettingsobj.cxx | 79 ------------------------------- 2 files changed, 79 insertions(+), 79 deletions(-) create mode 100644 sc/qa/extras/scspreadsheetsettings.cxx delete mode 100644 sc/qa/extras/scspreadsheetsettingsobj.cxx (limited to 'sc/qa') diff --git a/sc/qa/extras/scspreadsheetsettings.cxx b/sc/qa/extras/scspreadsheetsettings.cxx new file mode 100644 index 000000000000..48dfb48beb16 --- /dev/null +++ b/sc/qa/extras/scspreadsheetsettings.cxx @@ -0,0 +1,79 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include +#include + +#include +#include +#include +#include + +#include + +using namespace css; +using namespace css::uno; +using namespace com::sun::star; + +namespace sc_apitest +{ +class ScSpreadsheetSettings : public CalcUnoApiTest, public apitest::GlobalSheetSettings +{ +public: + ScSpreadsheetSettings(); + + virtual uno::Reference init() override; + virtual void setUp() override; + virtual void tearDown() override; + + CPPUNIT_TEST_SUITE(ScSpreadsheetSettings); + + // GlobalSheetSettings + CPPUNIT_TEST(testGlobalSheetSettingsProperties); + + CPPUNIT_TEST_SUITE_END(); + +private: + uno::Reference mxComponent; +}; + +ScSpreadsheetSettings::ScSpreadsheetSettings() + : CalcUnoApiTest("/sc/qa/extras/testdocuments") +{ +} + +uno::Reference ScSpreadsheetSettings::init() +{ + uno::Reference xDoc(mxComponent, UNO_QUERY_THROW); + CPPUNIT_ASSERT_MESSAGE("no calc document", xDoc.is()); + + uno::Reference xMSF(xDoc, UNO_QUERY_THROW); + return xMSF->createInstance("com.sun.star.sheet.GlobalSheetSettings"); +} + +void ScSpreadsheetSettings::setUp() +{ + CalcUnoApiTest::setUp(); + // create a calc document + mxComponent = loadFromDesktop("private:factory/scalc"); +} + +void ScSpreadsheetSettings::tearDown() +{ + closeDocument(mxComponent); + CalcUnoApiTest::tearDown(); +} + +CPPUNIT_TEST_SUITE_REGISTRATION(ScSpreadsheetSettings); + +} // end namespace + +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/sc/qa/extras/scspreadsheetsettingsobj.cxx b/sc/qa/extras/scspreadsheetsettingsobj.cxx deleted file mode 100644 index 34edd4cc916f..000000000000 --- a/sc/qa/extras/scspreadsheetsettingsobj.cxx +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#include -#include - -#include -#include -#include -#include - -#include - -using namespace css; -using namespace css::uno; -using namespace com::sun::star; - -namespace sc_apitest -{ -class ScSpreadsheetSettingsObj : public CalcUnoApiTest, public apitest::GlobalSheetSettings -{ -public: - ScSpreadsheetSettingsObj(); - - virtual uno::Reference init() override; - virtual void setUp() override; - virtual void tearDown() override; - - CPPUNIT_TEST_SUITE(ScSpreadsheetSettingsObj); - - // GlobalSheetSettings - CPPUNIT_TEST(testGlobalSheetSettingsProperties); - - CPPUNIT_TEST_SUITE_END(); - -private: - uno::Reference mxComponent; -}; - -ScSpreadsheetSettingsObj::ScSpreadsheetSettingsObj() - : CalcUnoApiTest("/sc/qa/extras/testdocuments") -{ -} - -uno::Reference ScSpreadsheetSettingsObj::init() -{ - uno::Reference xDoc(mxComponent, UNO_QUERY_THROW); - CPPUNIT_ASSERT_MESSAGE("no calc document", xDoc.is()); - - uno::Reference xMSF(xDoc, UNO_QUERY_THROW); - return xMSF->createInstance("com.sun.star.sheet.GlobalSheetSettings"); -} - -void ScSpreadsheetSettingsObj::setUp() -{ - CalcUnoApiTest::setUp(); - // create a calc document - mxComponent = loadFromDesktop("private:factory/scalc"); -} - -void ScSpreadsheetSettingsObj::tearDown() -{ - closeDocument(mxComponent); - CalcUnoApiTest::tearDown(); -} - -CPPUNIT_TEST_SUITE_REGISTRATION(ScSpreadsheetSettingsObj); - -} // end namespace - -CPPUNIT_PLUGIN_IMPLEMENT(); - -/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ -- cgit