include/test/sheet/xsheetcellrange.hxx | 36 +++++++ qadevOOo/Jar_OOoRunner.mk | 1 qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellCursorObj.csv | 1 qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangeObj.csv | 1 qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv | 1 qadevOOo/tests/java/ifc/sheet/_XSheetCellRange.java | 48 ---------- sc/qa/extras/sccellcursorobj.cxx | 7 + sc/qa/extras/sccellrangeobj.cxx | 7 + sc/qa/extras/sctablesheetobj.cxx | 7 + test/Library_subsequenttest.mk | 1 test/source/sheet/xsheetcellrange.cxx | 34 +++++++ 11 files changed, 89 insertions(+), 55 deletions(-)
New commits: commit c3965b1ce4428a97a8050a7bc53d60b642062502 Author: Jens Carl <j.car...@gmx.de> Date: Fri Nov 3 05:16:30 2017 +0000 tdf#45904 Move Java _XSheetCellRange tests to C++ Change-Id: Ia4534f083a804d450ac8fdd31759f1554b684e15 Reviewed-on: https://gerrit.libreoffice.org/44245 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Jens Carl <j.car...@gmx.de> diff --git a/include/test/sheet/xsheetcellrange.hxx b/include/test/sheet/xsheetcellrange.hxx new file mode 100644 index 000000000000..80fd064b7832 --- /dev/null +++ b/include/test/sheet/xsheetcellrange.hxx @@ -0,0 +1,36 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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/. + */ + +#ifndef INCLUDED_TEST_SHEET_XSHEETCELLRANGE_HXX +#define INCLUDED_TEST_SHEET_XSHEETCELLRANGE_HXX + + +#include <com/sun/star/uno/XInterface.hpp> +#include <com/sun/star/uno/Reference.hxx> + +#include <test/testdllapi.hxx> + +namespace apitest { + +class OOO_DLLPUBLIC_TEST XSheetCellRange +{ +public: + virtual css::uno::Reference< css::uno::XInterface > init() =0; + + void testGetSpreadsheet(); + +protected: + ~XSheetCellRange() {} +}; + +} + +#endif // INCLUDED_TEST_SHEET_XSHEETCELLRANGE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk index 94b198cf34d2..16ebecb84344 100644 --- a/qadevOOo/Jar_OOoRunner.mk +++ b/qadevOOo/Jar_OOoRunner.mk @@ -618,7 +618,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\ qadevOOo/tests/java/ifc/sheet/_XSheetAnnotationsSupplier \ qadevOOo/tests/java/ifc/sheet/_XSheetAuditing \ qadevOOo/tests/java/ifc/sheet/_XSheetCellCursor \ - qadevOOo/tests/java/ifc/sheet/_XSheetCellRange \ qadevOOo/tests/java/ifc/sheet/_XSheetCellRangeContainer \ qadevOOo/tests/java/ifc/sheet/_XSheetFilterableEx \ qadevOOo/tests/java/ifc/sheet/_XSpreadsheetView \ diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellCursorObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellCursorObj.csv index 3b19776b3b04..4e672f8418af 100644 --- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellCursorObj.csv +++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellCursorObj.csv @@ -126,7 +126,6 @@ "ScCellCursorObj";"com::sun::star::util::XIndent";"incrementIndent()" "ScCellCursorObj";"com::sun::star::sheet::XMultipleOperation";"setTableOperation()" "ScCellCursorObj";"com::sun::star::table::XAutoFormattable";"autoFormat()" -"ScCellCursorObj";"com::sun::star::sheet::XSheetCellRange";"getSpreadsheet()" "ScCellCursorObj";"com::sun::star::sheet::XCellRangesQuery";"queryVisibleCells()" "ScCellCursorObj";"com::sun::star::sheet::XCellRangesQuery";"queryEmptyCells()" "ScCellCursorObj";"com::sun::star::sheet::XCellRangesQuery";"queryContentCells()" diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangeObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangeObj.csv index 9f539f5bbf10..cd2e335c7834 100644 --- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangeObj.csv +++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangeObj.csv @@ -121,7 +121,6 @@ "ScCellRangeObj";"com::sun::star::util::XIndent";"incrementIndent()" "ScCellRangeObj";"com::sun::star::sheet::XMultipleOperation";"setTableOperation()" "ScCellRangeObj";"com::sun::star::table::XAutoFormattable";"autoFormat()" -"ScCellRangeObj";"com::sun::star::sheet::XSheetCellRange";"getSpreadsheet()" "ScCellRangeObj";"com::sun::star::sheet::XCellRangesQuery";"queryVisibleCells()" "ScCellRangeObj";"com::sun::star::sheet::XCellRangesQuery";"queryEmptyCells()" "ScCellRangeObj";"com::sun::star::sheet::XCellRangesQuery";"queryContentCells()" diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv index b3ea64aca54d..1fd3970c58dd 100644 --- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv +++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv @@ -133,7 +133,6 @@ "ScTableSheetObj";"com::sun::star::util::XIndent";"incrementIndent()" "ScTableSheetObj";"com::sun::star::sheet::XMultipleOperation";"setTableOperation()" "ScTableSheetObj";"com::sun::star::table::XAutoFormattable";"autoFormat()" -"ScTableSheetObj";"com::sun::star::sheet::XSheetCellRange";"getSpreadsheet()" "ScTableSheetObj";"com::sun::star::sheet::Spreadsheet";"IsVisible" "ScTableSheetObj";"com::sun::star::sheet::Spreadsheet";"PageStyle" "ScTableSheetObj";"com::sun::star::sheet::Spreadsheet";"AutomaticPrintArea#optional" diff --git a/qadevOOo/tests/java/ifc/sheet/_XSheetCellRange.java b/qadevOOo/tests/java/ifc/sheet/_XSheetCellRange.java deleted file mode 100644 index 0553f032574a..000000000000 --- a/qadevOOo/tests/java/ifc/sheet/_XSheetCellRange.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package ifc.sheet; - -import lib.MultiMethodTest; - -import com.sun.star.sheet.XSheetCellRange; -import com.sun.star.sheet.XSpreadsheet; - -/** -* Testing <code>com.sun.star.sheet.XSheetCellRange</code> -* interface methods : -* <ul> -* <li><code> getSpreadsheet()</code></li> -* </ul> <p> -* @see com.sun.star.sheet.XSheetCellRange -*/ -public class _XSheetCellRange extends MultiMethodTest { - - public XSheetCellRange oObj = null; - - /** - * Test calls the method and checks returned value. <p> - * Has <b> OK </b> status if returned value isn't null. <p> - */ - public void _getSpreadsheet(){ - XSpreadsheet oSheet = oObj.getSpreadsheet(); - tRes.tested("getSpreadsheet()", oSheet != null); - } - -} // EOC _XSheetCellRange - diff --git a/sc/qa/extras/sccellcursorobj.cxx b/sc/qa/extras/sccellcursorobj.cxx index 7bfd2dcc3060..f5663714b7be 100644 --- a/sc/qa/extras/sccellcursorobj.cxx +++ b/sc/qa/extras/sccellcursorobj.cxx @@ -9,6 +9,7 @@ #include <test/calc_unoapi_test.hxx> #include <test/sheet/xcellseries.hxx> +#include <test/sheet/xsheetcellrange.hxx> #include <test/sheet/xsheetfilterable.hxx> #include <test/sheet/xsheetoperation.hxx> #include <test/sheet/xsubtotalcalculatable.hxx> @@ -24,9 +25,10 @@ using namespace css::uno; namespace sc_apitest { -#define NUMBER_OF_TESTS 11 +#define NUMBER_OF_TESTS 12 class ScCellCursorObj : public CalcUnoApiTest, public apitest::XCellSeries, + public apitest::XSheetCellRange, public apitest::XSheetFilterable, public apitest::XSheetOperation, public apitest::XSubTotalCalculatable, @@ -51,6 +53,9 @@ public: CPPUNIT_TEST(testFillAuto); CPPUNIT_TEST(testFillSeries); + // XSheetCellRange + CPPUNIT_TEST(testGetSpreadsheet); + // XSheetFilterable CPPUNIT_TEST(testCreateFilterDescriptor); CPPUNIT_TEST(testFilter); diff --git a/sc/qa/extras/sccellrangeobj.cxx b/sc/qa/extras/sccellrangeobj.cxx index 6a65aa3f0760..49477e137e4c 100644 --- a/sc/qa/extras/sccellrangeobj.cxx +++ b/sc/qa/extras/sccellrangeobj.cxx @@ -12,6 +12,7 @@ #include <test/sheet/xcellrangedata.hxx> #include <test/sheet/xcellrangesquery.hxx> #include <test/sheet/xcellseries.hxx> +#include <test/sheet/xsheetcellrange.hxx> #include <test/sheet/xsheetfilterable.hxx> #include <test/sheet/xsheetoperation.hxx> #include <test/sheet/xsubtotalcalculatable.hxx> @@ -40,7 +41,7 @@ using namespace css::uno; namespace sc_apitest { -#define NUMBER_OF_TESTS 24 +#define NUMBER_OF_TESTS 25 class ScCellRangeObj : public CalcUnoApiTest, public apitest::CellProperties, public apitest::XCellRangeData, @@ -48,6 +49,7 @@ class ScCellRangeObj : public CalcUnoApiTest, public apitest::CellProperties, public apitest::XCellSeries, public apitest::XReplaceable, public apitest::XSearchable, + public apitest::XSheetCellRange, public apitest::XSheetFilterable, public apitest::XSheetOperation, public apitest::XSubTotalCalculatable, @@ -83,6 +85,9 @@ public: CPPUNIT_TEST(testFindAll); CPPUNIT_TEST(testFindFirst); + // XSheetCellRange + CPPUNIT_TEST(testGetSpreadsheet); + // XReplaceable CPPUNIT_TEST(testReplaceAll); CPPUNIT_TEST(testCreateReplaceDescriptor); diff --git a/sc/qa/extras/sctablesheetobj.cxx b/sc/qa/extras/sctablesheetobj.cxx index d13564d137c3..5f954cc5e66d 100644 --- a/sc/qa/extras/sctablesheetobj.cxx +++ b/sc/qa/extras/sctablesheetobj.cxx @@ -10,6 +10,7 @@ #include <test/calc_unoapi_test.hxx> #include <test/sheet/xcellseries.hxx> #include <test/sheet/xprintareas.hxx> +#include <test/sheet/xsheetcellrange.hxx> #include <test/sheet/xsheetfilterable.hxx> #include <test/sheet/xsheetlinkable.hxx> #include <test/sheet/xsheetoperation.hxx> @@ -29,12 +30,13 @@ using namespace css::uno; namespace sc_apitest { -#define NUMBER_OF_TESTS 22 +#define NUMBER_OF_TESTS 23 class ScTableSheetObj : public CalcUnoApiTest, public apitest::XCellSeries, public apitest::XPrintAreas, public apitest::XReplaceable, public apitest::XSearchable, + public apitest::XSheetCellRange, public apitest::XSheetFilterable, public apitest::XSheetLinkable, public apitest::XSheetOperation, @@ -73,6 +75,9 @@ public: CPPUNIT_TEST(testFindNext); CPPUNIT_TEST(testFindFirst); + // XSheetCellRange + CPPUNIT_TEST(testGetSpreadsheet); + // XSheetFilterable CPPUNIT_TEST(testCreateFilterDescriptor); CPPUNIT_TEST(testFilter); diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk index 0435b967dd5d..2139e05a0311 100644 --- a/test/Library_subsequenttest.mk +++ b/test/Library_subsequenttest.mk @@ -70,6 +70,7 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\ test/source/sheet/xsheetannotation \ test/source/sheet/xsheetannotations \ test/source/sheet/xsheetannotationshapesupplier \ + test/source/sheet/xsheetcellrange \ test/source/sheet/xsheetcellranges \ test/source/sheet/xsheetconditionalentries \ test/source/sheet/xsheetconditionalentry \ diff --git a/test/source/sheet/xsheetcellrange.cxx b/test/source/sheet/xsheetcellrange.cxx new file mode 100644 index 000000000000..c3adc74e32ce --- /dev/null +++ b/test/source/sheet/xsheetcellrange.cxx @@ -0,0 +1,34 @@ +/* -*- 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 <test/sheet/xsheetcellrange.hxx> + +#include <com/sun/star/sheet/XSheetCellRange.hpp> +#include <com/sun/star/sheet/XSpreadsheet.hpp> + +#include <com/sun/star/uno/Reference.hxx> + +#include <cppunit/extensions/HelperMacros.h> + +using namespace com::sun::star; +using namespace com::sun::star::uno; + +namespace apitest { + +void XSheetCellRange::testGetSpreadsheet() +{ + uno::Reference< sheet::XSheetCellRange > xSheetCellRange(init(), UNO_QUERY_THROW); + uno::Reference< sheet::XSpreadsheet > xSheet = xSheetCellRange->getSpreadsheet(); + + CPPUNIT_ASSERT_MESSAGE("Unable to get spreadsheet", xSheet.is()); +} + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits