[Libreoffice-commits] core.git: include/test qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests sc/qa test/Library_subsequenttest.mk test/source

Jens Carl j.carl43 at gmx.de
Sat Dec 16 00:48:29 UTC 2017


 include/test/sheet/xcellrangeaddressable.hxx                    |   34 +++++++
 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/_XCellRangeAddressable.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/xcellrangeaddressable.cxx                     |   33 ++++++
 11 files changed, 86 insertions(+), 55 deletions(-)

New commits:
commit b92af3c7b4f8ad91891c2159b35070fe4a1bf2db
Author: Jens Carl <j.carl43 at gmx.de>
Date:   Fri Dec 15 21:38:49 2017 +0000

    tdf#45904 Move _XCellRangeAddressable Java test to C++
    
    Change-Id: Ic3c1e6d793d4405c2dc4b8e7d1d7b87ed94fc6c3
    Reviewed-on: https://gerrit.libreoffice.org/46579
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Jens Carl <j.carl43 at gmx.de>

diff --git a/include/test/sheet/xcellrangeaddressable.hxx b/include/test/sheet/xcellrangeaddressable.hxx
new file mode 100644
index 000000000000..0819b34c155d
--- /dev/null
+++ b/include/test/sheet/xcellrangeaddressable.hxx
@@ -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/.
+ */
+
+#ifndef INCLUDED_TEST_SHEET_XCELLRANGEADDRESSABLE_HXX
+#define INCLUDED_TEST_SHEET_XCELLRANGEADDRESSABLE_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 XCellRangeAddressable
+{
+public:
+    virtual css::uno::Reference<css::uno::XInterface> init() = 0;
+
+    void testGetRangeAddress();
+
+protected:
+    ~XCellRangeAddressable() {}
+};
+}
+
+#endif // INCLUDED_TEST_SHEET_XCELLRANGEADDRESSABLE_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 5a4f7a7ae293..1fa333cd889b 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -586,7 +586,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
     qadevOOo/tests/java/ifc/sheet/_XActivationBroadcaster \
     qadevOOo/tests/java/ifc/sheet/_XArrayFormulaRange \
     qadevOOo/tests/java/ifc/sheet/_XCalculatable \
-    qadevOOo/tests/java/ifc/sheet/_XCellRangeAddressable \
     qadevOOo/tests/java/ifc/sheet/_XCellRangeData \
     qadevOOo/tests/java/ifc/sheet/_XCellRangeFormula \
     qadevOOo/tests/java/ifc/sheet/_XCellRangeMovement \
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 81bda88aa988..d95c2f6d4327 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellCursorObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellCursorObj.csv
@@ -41,7 +41,6 @@
 "ScCellCursorObj";"com::sun::star::style::CharacterPropertiesAsian";"ParaIsCharacterDistance"
 "ScCellCursorObj";"com::sun::star::style::CharacterPropertiesAsian";"ParaIsForbiddenRules"
 "ScCellCursorObj";"com::sun::star::style::CharacterPropertiesAsian";"ParaIsHangingPunctuation"
-"ScCellCursorObj";"com::sun::star::sheet::XCellRangeAddressable";"getRangeAddress()"
 "ScCellCursorObj";"com::sun::star::table::XCellCursor";"gotoStart()"
 "ScCellCursorObj";"com::sun::star::table::XCellCursor";"gotoEnd()"
 "ScCellCursorObj";"com::sun::star::table::XCellCursor";"gotoNext()"
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 e018f5e09ef8..7be5d04df577 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangeObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangeObj.csv
@@ -41,7 +41,6 @@
 "ScCellRangeObj";"com::sun::star::style::CharacterPropertiesAsian";"ParaIsCharacterDistance"
 "ScCellRangeObj";"com::sun::star::style::CharacterPropertiesAsian";"ParaIsForbiddenRules"
 "ScCellRangeObj";"com::sun::star::style::CharacterPropertiesAsian";"ParaIsHangingPunctuation"
-"ScCellRangeObj";"com::sun::star::sheet::XCellRangeAddressable";"getRangeAddress()"
 "ScCellRangeObj";"com::sun::star::util::XReplaceable";"createReplaceDescriptor()"
 "ScCellRangeObj";"com::sun::star::util::XReplaceable";"replaceAll()"
 "ScCellRangeObj";"com::sun::star::chart::XChartData";"addChartDataChangeEventListener()"
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 d62b814567ff..fcebef99d308 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv
@@ -41,7 +41,6 @@
 "ScTableSheetObj";"com::sun::star::style::CharacterPropertiesAsian";"ParaIsCharacterDistance"
 "ScTableSheetObj";"com::sun::star::style::CharacterPropertiesAsian";"ParaIsForbiddenRules"
 "ScTableSheetObj";"com::sun::star::style::CharacterPropertiesAsian";"ParaIsHangingPunctuation"
-"ScTableSheetObj";"com::sun::star::sheet::XCellRangeAddressable";"getRangeAddress()"
 "ScTableSheetObj";"com::sun::star::util::XReplaceable";"createReplaceDescriptor()"
 "ScTableSheetObj";"com::sun::star::util::XReplaceable";"replaceAll()"
 "ScTableSheetObj";"com::sun::star::chart::XChartData";"addChartDataChangeEventListener()"
diff --git a/qadevOOo/tests/java/ifc/sheet/_XCellRangeAddressable.java b/qadevOOo/tests/java/ifc/sheet/_XCellRangeAddressable.java
deleted file mode 100644
index f98161227607..000000000000
--- a/qadevOOo/tests/java/ifc/sheet/_XCellRangeAddressable.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.XCellRangeAddressable;
-import com.sun.star.table.CellRangeAddress;
-
-/**
-* Testing <code>com.sun.star.sheet.XCellRangeAddressable</code>
-* interface methods :
-* <ul>
-*  <li><code> getRangeAddress()</code></li>
-* </ul> <p>
-* @see com.sun.star.sheet.XCellRangeAddressable
-*/
-public class _XCellRangeAddressable extends MultiMethodTest {
-
-    public XCellRangeAddressable oObj = null;
-
-    /**
-     * Test calls the method and checks returned value.
-     * Has <b> OK </b> status if returned value isn't null. <p>
-     */
-    public void _getRangeAddress() {
-        CellRangeAddress oAddr = oObj.getRangeAddress();
-        tRes.tested("getRangeAddress()", oAddr != null);
-    }
-
-} // EOC _XCellRangeAddressable
-
diff --git a/sc/qa/extras/sccellcursorobj.cxx b/sc/qa/extras/sccellcursorobj.cxx
index da8ddc988f67..45726eb38435 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/xcellformatrangessupplier.hxx>
+#include <test/sheet/xcellrangeaddressable.hxx>
 #include <test/sheet/xcellseries.hxx>
 #include <test/sheet/xmultipleoperation.hxx>
 #include <test/sheet/xsheetcellrange.hxx>
@@ -28,9 +29,10 @@ using namespace css::uno;
 
 namespace sc_apitest {
 
-#define NUMBER_OF_TESTS 15
+#define NUMBER_OF_TESTS 16
 
 class ScCellCursorObj : public CalcUnoApiTest, public apitest::XCellFormatRangesSupplier,
+                                               public apitest::XCellRangeAddressable,
                                                public apitest::XCellSeries,
                                                public apitest::XMultipleOperation,
                                                public apitest::XSheetCellRange,
@@ -61,6 +63,9 @@ public:
     // XCellFormatRangesSupplier
     CPPUNIT_TEST(testGetCellFormatRanges);
 
+    // XCellRangeAddressable
+    CPPUNIT_TEST(testGetRangeAddress);
+
     // XCellSeries
     CPPUNIT_TEST(testFillAuto);
     CPPUNIT_TEST(testFillSeries);
diff --git a/sc/qa/extras/sccellrangeobj.cxx b/sc/qa/extras/sccellrangeobj.cxx
index ff92190a6e77..02cdf20e4948 100644
--- a/sc/qa/extras/sccellrangeobj.cxx
+++ b/sc/qa/extras/sccellrangeobj.cxx
@@ -10,6 +10,7 @@
 #include <test/calc_unoapi_test.hxx>
 #include <test/sheet/cellproperties.hxx>
 #include <test/sheet/xcellformatrangessupplier.hxx>
+#include <test/sheet/xcellrangeaddressable.hxx>
 #include <test/sheet/xcellrangedata.hxx>
 #include <test/sheet/xcellrangesquery.hxx>
 #include <test/sheet/xcellseries.hxx>
@@ -45,10 +46,11 @@ using namespace css::uno;
 
 namespace sc_apitest {
 
-#define NUMBER_OF_TESTS 28
+#define NUMBER_OF_TESTS 29
 
 class ScCellRangeObj : public CalcUnoApiTest, public apitest::CellProperties,
                                               public apitest::XCellFormatRangesSupplier,
+                                              public apitest::XCellRangeAddressable,
                                               public apitest::XCellRangeData,
                                               public apitest::XCellRangesQuery,
                                               public apitest::XCellSeries,
@@ -85,6 +87,9 @@ public:
     CPPUNIT_TEST(testFillAuto);
     CPPUNIT_TEST(testFillSeries);
 
+    // XCellRangeAddressable
+    CPPUNIT_TEST(testGetRangeAddress);
+
     // XCellRangeData
     CPPUNIT_TEST(testGetDataArray);
     CPPUNIT_TEST(testSetDataArray);
diff --git a/sc/qa/extras/sctablesheetobj.cxx b/sc/qa/extras/sctablesheetobj.cxx
index c0fe3f3a48e3..9345c3f32a7f 100644
--- a/sc/qa/extras/sctablesheetobj.cxx
+++ b/sc/qa/extras/sctablesheetobj.cxx
@@ -9,6 +9,7 @@
 
 #include <test/calc_unoapi_test.hxx>
 #include <test/sheet/xcellformatrangessupplier.hxx>
+#include <test/sheet/xcellrangeaddressable.hxx>
 #include <test/sheet/xcellseries.hxx>
 #include <test/sheet/xdatapilottablessupplier.hxx>
 #include <test/sheet/xmultipleoperation.hxx>
@@ -40,9 +41,10 @@ using namespace css::uno;
 namespace sc_apitest
 {
 
-#define NUMBER_OF_TESTS 33
+#define NUMBER_OF_TESTS 34
 
 class ScTableSheetObj : public CalcUnoApiTest, public apitest::XCellFormatRangesSupplier,
+                                               public apitest::XCellRangeAddressable,
                                                public apitest::XCellSeries,
                                                public apitest::XDataPilotTablesSupplier,
                                                public apitest::XMultipleOperation,
@@ -80,6 +82,9 @@ public:
     // XCellFormatRangesSupplier
     CPPUNIT_TEST(testGetCellFormatRanges);
 
+    // XCellRangeAddressable
+    CPPUNIT_TEST(testGetRangeAddress);
+
     // XCellSeries
     CPPUNIT_TEST(testFillAuto);
     CPPUNIT_TEST(testFillSeries);
diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk
index 8cb91296260b..0cb66492db9f 100644
--- a/test/Library_subsequenttest.mk
+++ b/test/Library_subsequenttest.mk
@@ -51,6 +51,7 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\
 	test/source/sheet/xarealinks \
 	test/source/sheet/xcelladdressable \
 	test/source/sheet/xcellformatrangessupplier \
+	test/source/sheet/xcellrangeaddressable \
 	test/source/sheet/xcellrangedata \
 	test/source/sheet/xcellrangereferrer \
 	test/source/sheet/xcellrangesquery \
diff --git a/test/source/sheet/xcellrangeaddressable.cxx b/test/source/sheet/xcellrangeaddressable.cxx
new file mode 100644
index 000000000000..0e46b10c5bd3
--- /dev/null
+++ b/test/source/sheet/xcellrangeaddressable.cxx
@@ -0,0 +1,33 @@
+/* -*- 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/xcellrangeaddressable.hxx>
+
+#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
+#include <com/sun/star/table/CellRangeAddress.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+
+#include <cppunit/extensions/HelperMacros.h>
+
+using namespace css;
+using namespace css::uno;
+
+namespace apitest
+{
+void XCellRangeAddressable::testGetRangeAddress()
+{
+    uno::Reference<sheet::XCellRangeAddressable> xCRA(init(), UNO_QUERY_THROW);
+
+    table::CellRangeAddress aCellRangeAddr = xCRA->getRangeAddress();
+    CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to get CellRangeAddress", sal_Int16(0),
+                                 aCellRangeAddr.Sheet);
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */


More information about the Libreoffice-commits mailing list