diff options
author | Rahul Gurung <gurungrahul2@gmail.com> | 2018-08-31 15:52:59 +0530 |
---|---|---|
committer | Jens Carl <j.carl43@gmx.de> | 2018-09-06 07:43:04 +0200 |
commit | 53291ffee8e2a2186afbd2412881a18dded5a697 (patch) | |
tree | eb4d044852cc6eb5caab8b5cc5cf702ac69eb7aa | |
parent | d80b3235cc106e17a0c10dea44e8afa8db724400 (diff) |
tdf#45904 Move _XColumnRowRange Java tests to C++
Change-Id: I35b5fc2f18867c386c8c92d1d7a3a0823bd07b78
Reviewed-on: https://gerrit.libreoffice.org/59863
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
-rw-r--r-- | include/test/table/xcolumnrowrange.hxx | 35 | ||||
-rw-r--r-- | qadevOOo/Jar_OOoRunner.mk | 1 | ||||
-rw-r--r-- | qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellCursorObj.csv | 2 | ||||
-rw-r--r-- | qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellObj.csv | 2 | ||||
-rw-r--r-- | qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangeObj.csv | 2 | ||||
-rw-r--r-- | qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv | 2 | ||||
-rw-r--r-- | qadevOOo/tests/java/ifc/table/_XColumnRowRange.java | 57 | ||||
-rw-r--r-- | sc/qa/extras/sccellcursorobj.cxx | 6 | ||||
-rw-r--r-- | sc/qa/extras/sccellobj.cxx | 6 | ||||
-rw-r--r-- | sc/qa/extras/sccellrangeobj.cxx | 6 | ||||
-rw-r--r-- | sc/qa/extras/sctablesheetobj.cxx | 6 | ||||
-rw-r--r-- | test/Library_subsequenttest.mk | 1 | ||||
-rw-r--r-- | test/source/table/xcolumnrowrange.cxx | 37 |
13 files changed, 97 insertions, 66 deletions
diff --git a/include/test/table/xcolumnrowrange.hxx b/include/test/table/xcolumnrowrange.hxx new file mode 100644 index 000000000000..279a98847805 --- /dev/null +++ b/include/test/table/xcolumnrowrange.hxx @@ -0,0 +1,35 @@ +/* -*- 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/. +*/ + +#ifndef INCLUDED_TEST_TABLE_XCOLUMNROWRANGE_HXX +#define INCLUDED_TEST_TABLE_XCOLUMNROWRANGE_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 XColumnRowRange +{ +public: + virtual css::uno::Reference<css::uno::XInterface> init() = 0; + + void testGetColumns(); + void testGetRows(); + +protected: + ~XColumnRowRange() {} +}; +} + +#endif // INCLUDED_TEST_TABLE_XCOLUMNROWRANGE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk index c096f498c63a..e34817674a7e 100644 --- a/qadevOOo/Jar_OOoRunner.mk +++ b/qadevOOo/Jar_OOoRunner.mk @@ -588,7 +588,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\ qadevOOo/tests/java/ifc/table/_TableRow \ qadevOOo/tests/java/ifc/table/_XAutoFormattable \ qadevOOo/tests/java/ifc/table/_XCellRange \ - qadevOOo/tests/java/ifc/table/_XColumnRowRange \ qadevOOo/tests/java/ifc/table/_XTableChart \ qadevOOo/tests/java/ifc/table/_XTableCharts \ qadevOOo/tests/java/ifc/table/_XTableChartsSupplier \ 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 2dfea634963b..c68950d5a7f1 100644 --- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellCursorObj.csv +++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellCursorObj.csv @@ -27,8 +27,6 @@ "ScCellCursorObj";"com::sun::star::util::XSearchable";"findAll()" "ScCellCursorObj";"com::sun::star::util::XSearchable";"findFirst()" "ScCellCursorObj";"com::sun::star::util::XSearchable";"findNext()" -"ScCellCursorObj";"com::sun::star::table::XColumnRowRange";"getColumns()" -"ScCellCursorObj";"com::sun::star::table::XColumnRowRange";"getRows()" "ScCellCursorObj";"com::sun::star::style::CharacterPropertiesAsian";"CharHeightAsian" "ScCellCursorObj";"com::sun::star::style::CharacterPropertiesAsian";"CharWeightAsian" "ScCellCursorObj";"com::sun::star::style::CharacterPropertiesAsian";"CharFontNameAsian" diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellObj.csv index b936c50045d4..036c38dea7ef 100644 --- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellObj.csv +++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellObj.csv @@ -25,8 +25,6 @@ "ScCellObj";"com::sun::star::util::XSearchable";"findAll()" "ScCellObj";"com::sun::star::util::XSearchable";"findFirst()" "ScCellObj";"com::sun::star::util::XSearchable";"findNext()" -"ScCellObj";"com::sun::star::table::XColumnRowRange";"getColumns()" -"ScCellObj";"com::sun::star::table::XColumnRowRange";"getRows()" "ScCellObj";"com::sun::star::style::CharacterPropertiesAsian";"CharHeightAsian" "ScCellObj";"com::sun::star::style::CharacterPropertiesAsian";"CharWeightAsian" "ScCellObj";"com::sun::star::style::CharacterPropertiesAsian";"CharFontNameAsian" 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 eed12b69bc58..1c44171c7ee6 100644 --- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangeObj.csv +++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangeObj.csv @@ -27,8 +27,6 @@ "ScCellRangeObj";"com::sun::star::util::XSearchable";"findAll()" "ScCellRangeObj";"com::sun::star::util::XSearchable";"findFirst()" "ScCellRangeObj";"com::sun::star::util::XSearchable";"findNext()" -"ScCellRangeObj";"com::sun::star::table::XColumnRowRange";"getColumns()" -"ScCellRangeObj";"com::sun::star::table::XColumnRowRange";"getRows()" "ScCellRangeObj";"com::sun::star::style::CharacterPropertiesAsian";"CharHeightAsian" "ScCellRangeObj";"com::sun::star::style::CharacterPropertiesAsian";"CharWeightAsian" "ScCellRangeObj";"com::sun::star::style::CharacterPropertiesAsian";"CharFontNameAsian" 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 59f92107cde8..a195cb4bee9b 100644 --- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv +++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv @@ -27,8 +27,6 @@ "ScTableSheetObj";"com::sun::star::util::XSearchable";"findAll()" "ScTableSheetObj";"com::sun::star::util::XSearchable";"findFirst()" "ScTableSheetObj";"com::sun::star::util::XSearchable";"findNext()" -"ScTableSheetObj";"com::sun::star::table::XColumnRowRange";"getColumns()" -"ScTableSheetObj";"com::sun::star::table::XColumnRowRange";"getRows()" "ScTableSheetObj";"com::sun::star::style::CharacterPropertiesAsian";"CharHeightAsian" "ScTableSheetObj";"com::sun::star::style::CharacterPropertiesAsian";"CharWeightAsian" "ScTableSheetObj";"com::sun::star::style::CharacterPropertiesAsian";"CharFontNameAsian" diff --git a/qadevOOo/tests/java/ifc/table/_XColumnRowRange.java b/qadevOOo/tests/java/ifc/table/_XColumnRowRange.java deleted file mode 100644 index b89f716ac976..000000000000 --- a/qadevOOo/tests/java/ifc/table/_XColumnRowRange.java +++ /dev/null @@ -1,57 +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.table; - -import lib.MultiMethodTest; - -import com.sun.star.table.XColumnRowRange; - -/** -* Testing <code>com.sun.star.table.XColumnRowRange</code> -* interface methods : -* <ul> -* <li><code> getColumns()</code></li> -* <li><code> getRows()</code></li> -* </ul> <p> -* @see com.sun.star.table.XColumnRowRange -*/ -public class _XColumnRowRange extends MultiMethodTest { - - public XColumnRowRange oObj = null; - - /** - * Test calls the method. <p> - * Has <b> OK </b> status if the method returns not null value - * and no exceptions were thrown. <p> - */ - public void _getColumns() { - tRes.tested( "getColumns()", oObj.getColumns()!=null ); - } // getColumns() - - /** - * Test calls the method. <p> - * Has <b> OK </b> status if the method returns not null value - * and no exceptions were thrown. <p> - */ - public void _getRows() { - tRes.tested( "getRows()", oObj.getRows()!=null ); - } // getRows() - -} // finish class _XColumnRowRange - diff --git a/sc/qa/extras/sccellcursorobj.cxx b/sc/qa/extras/sccellcursorobj.cxx index 08c9931324af..ed1fd270f980 100644 --- a/sc/qa/extras/sccellcursorobj.cxx +++ b/sc/qa/extras/sccellcursorobj.cxx @@ -26,6 +26,7 @@ #include <test/sheet/xuniquecellformatrangessupplier.hxx> #include <test/sheet/xusedareacursor.hxx> #include <test/table/xcellcursor.hxx> +#include <test/table/xcolumnrowrange.hxx> #include <com/sun/star/sheet/XSpreadsheetDocument.hpp> #include <com/sun/star/sheet/XSpreadsheet.hpp> @@ -44,6 +45,7 @@ class ScCellCursorObj : public CalcUnoApiTest, public apitest::SheetCellRange, public apitest::XCellRangeData, public apitest::XCellRangeFormula, public apitest::XCellSeries, + public apitest::XColumnRowRange, public apitest::XFormulaQuery, public apitest::XMultipleOperation, public apitest::XSheetCellCursor, @@ -96,6 +98,10 @@ public: CPPUNIT_TEST(testFillAuto); CPPUNIT_TEST(testFillSeries); + // XColumnRowRange + CPPUNIT_TEST(testGetColumns); + CPPUNIT_TEST(testGetRows); + // XFormulaQuery CPPUNIT_TEST(testQueryDependents); CPPUNIT_TEST(testQueryPrecedents); diff --git a/sc/qa/extras/sccellobj.cxx b/sc/qa/extras/sccellobj.cxx index 2361b3c5d208..1a3ffb2ec66c 100644 --- a/sc/qa/extras/sccellobj.cxx +++ b/sc/qa/extras/sccellobj.cxx @@ -13,6 +13,7 @@ #include <test/sheet/xcelladdressable.hxx> #include <test/sheet/xformulaquery.hxx> #include <test/sheet/xsheetannotationanchor.hxx> +#include <test/table/xcolumnrowrange.hxx> #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/sheet/XSheetAnnotationsSupplier.hpp> @@ -32,6 +33,7 @@ namespace sc_apitest { class ScCellObj : public CalcUnoApiTest, public apitest::SheetCell, public apitest::XCell, public apitest::XCellAddressable, + public apitest::XColumnRowRange, public apitest::XFormulaQuery, public apitest::XSheetAnnotationAnchor { @@ -57,6 +59,10 @@ public: // XCellAddressable CPPUNIT_TEST(testGetCellAddress); + // XColumnRowRange + CPPUNIT_TEST(testGetColumns); + CPPUNIT_TEST(testGetRows); + // XFormulaQuery CPPUNIT_TEST(testQueryDependents); CPPUNIT_TEST(testQueryPrecedents); diff --git a/sc/qa/extras/sccellrangeobj.cxx b/sc/qa/extras/sccellrangeobj.cxx index 57093eee6f92..2cb241c81cb2 100644 --- a/sc/qa/extras/sccellrangeobj.cxx +++ b/sc/qa/extras/sccellrangeobj.cxx @@ -25,6 +25,7 @@ #include <test/sheet/xsheetoperation.hxx> #include <test/sheet/xsubtotalcalculatable.hxx> #include <test/sheet/xuniquecellformatrangessupplier.hxx> +#include <test/table/xcolumnrowrange.hxx> #include <test/util/xreplaceable.hxx> #include <test/util/xsearchable.hxx> @@ -59,6 +60,7 @@ class ScCellRangeObj : public CalcUnoApiTest, public apitest::CellProperties, public apitest::XCellRangeFormula, public apitest::XCellRangesQuery, public apitest::XCellSeries, + public apitest::XColumnRowRange, public apitest::XFormulaQuery, public apitest::XMultipleOperation, public apitest::XReplaceable, @@ -118,6 +120,10 @@ public: CPPUNIT_TEST(testFillAuto); CPPUNIT_TEST(testFillSeries); + // XColumnRowRange + CPPUNIT_TEST(testGetColumns); + CPPUNIT_TEST(testGetRows); + // XFormulaQuery CPPUNIT_TEST(testQueryDependents); CPPUNIT_TEST(testQueryPrecedents); diff --git a/sc/qa/extras/sctablesheetobj.cxx b/sc/qa/extras/sctablesheetobj.cxx index 5006bbe98dd2..f7eadb1e048a 100644 --- a/sc/qa/extras/sctablesheetobj.cxx +++ b/sc/qa/extras/sctablesheetobj.cxx @@ -36,6 +36,7 @@ #include <test/sheet/xspreadsheet.hxx> #include <test/sheet/xsubtotalcalculatable.hxx> #include <test/sheet/xuniquecellformatrangessupplier.hxx> +#include <test/table/xcolumnrowrange.hxx> #include <test/util/xreplaceable.hxx> #include <test/util/xsearchable.hxx> @@ -60,6 +61,7 @@ class ScTableSheetObj : public CalcUnoApiTest, public apitest::Scenario, public apitest::XCellRangeFormula, public apitest::XCellRangeMovement, public apitest::XCellSeries, + public apitest::XColumnRowRange, public apitest::XDataPilotTablesSupplier, public apitest::XFormulaQuery, public apitest::XMultipleOperation, @@ -136,6 +138,10 @@ public: CPPUNIT_TEST(testFillAuto); CPPUNIT_TEST(testFillSeries); + // XColumnRowRange + CPPUNIT_TEST(testGetColumns); + CPPUNIT_TEST(testGetRows); + // XDataPilotTablesSupplier CPPUNIT_TEST(testGetDataPilotTables); diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk index 604800a73cb2..fce5a9033314 100644 --- a/test/Library_subsequenttest.mk +++ b/test/Library_subsequenttest.mk @@ -148,6 +148,7 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\ test/source/sheet/xsubtotaldescriptor \ test/source/table/xcell \ test/source/table/xcellcursor \ + test/source/table/xcolumnrowrange \ test/source/text/xtext \ test/source/text/xtextfield \ test/source/text/xtextcontent \ diff --git a/test/source/table/xcolumnrowrange.cxx b/test/source/table/xcolumnrowrange.cxx new file mode 100644 index 000000000000..4f2777affeee --- /dev/null +++ b/test/source/table/xcolumnrowrange.cxx @@ -0,0 +1,37 @@ +/* -*- 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/cppunitasserthelper.hxx> +#include <test/table/xcolumnrowrange.hxx> + +#include <com/sun/star/table/XColumnRowRange.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 XColumnRowRange::testGetColumns() +{ + uno::Reference<table::XColumnRowRange> xColumnRowRange(init(), UNO_QUERY_THROW); + CPPUNIT_ASSERT(xColumnRowRange->getColumns()); +} + +void XColumnRowRange::testGetRows() +{ + uno::Reference<table::XColumnRowRange> xColumnRowRange(init(), UNO_QUERY_THROW); + CPPUNIT_ASSERT(xColumnRowRange->getRows()); +} +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |