[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
Thu Dec 7 05:50:14 UTC 2017


 include/test/sheet/xdatapilottablessupplier.hxx                 |   34 ++++++
 qadevOOo/Jar_OOoRunner.mk                                       |    1 
 qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv |    1 
 qadevOOo/tests/java/ifc/sheet/_XDataPilotTablesSupplier.java    |   50 ----------
 sc/qa/extras/sctablesheetobj.cxx                                |    7 +
 test/Library_subsequenttest.mk                                  |    1 
 test/source/sheet/xdatapilottablessupplier.cxx                  |   32 ++++++
 7 files changed, 73 insertions(+), 53 deletions(-)

New commits:
commit c7e5c7da98d40852d18bd7683e40c9679836ba49
Author: Jens Carl <j.carl43 at gmx.de>
Date:   Wed Dec 6 22:48:01 2017 +0000

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

diff --git a/include/test/sheet/xdatapilottablessupplier.hxx b/include/test/sheet/xdatapilottablessupplier.hxx
new file mode 100644
index 000000000000..ca1e623b3b96
--- /dev/null
+++ b/include/test/sheet/xdatapilottablessupplier.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_XDATAPILOTTABLESSUPPLIER_HXX
+#define INCLUDED_TEST_SHEET_XDATAPILOTTABLESSUPPLIER_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 XDataPilotTablesSupplier
+{
+public:
+    virtual css::uno::Reference<css::uno::XInterface> init() = 0;
+
+    void testGetDataPilotTables();
+
+protected:
+    ~XDataPilotTablesSupplier() {}
+};
+}
+
+#endif // INCLUDED_TEST_SHEET_XDATAPILOTTABLESSUPPLIER_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 24dd5cd7f8a9..5751f1cb8ef9 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -598,7 +598,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
     qadevOOo/tests/java/ifc/sheet/_XDatabaseRanges \
     qadevOOo/tests/java/ifc/sheet/_XDataPilotField \
     qadevOOo/tests/java/ifc/sheet/_XDataPilotTables \
-    qadevOOo/tests/java/ifc/sheet/_XDataPilotTablesSupplier \
     qadevOOo/tests/java/ifc/sheet/_XDDELink \
     qadevOOo/tests/java/ifc/sheet/_XDocumentAuditing \
     qadevOOo/tests/java/ifc/sheet/_XEnhancedMouseClickBroadcaster \
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 5356fe01fc80..48032b0f4309 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv
@@ -231,7 +231,6 @@
 "ScTableSheetObj";"com::sun::star::chart::XChartDataArray";"setRowDescriptions()"
 "ScTableSheetObj";"com::sun::star::chart::XChartDataArray";"getColumnDescriptions()"
 "ScTableSheetObj";"com::sun::star::chart::XChartDataArray";"setColumnDescriptions()"
-"ScTableSheetObj";"com::sun::star::sheet::XDataPilotTablesSupplier";"getDataPilotTables()"
 "ScTableSheetObj";"com::sun::star::sheet::XCellFormatRangesSupplier";"getCellFormatRanges()"
 "ScTableSheetObj";"com::sun::star::util::XModifyBroadcaster#optional";"addModifyListener()"
 "ScTableSheetObj";"com::sun::star::util::XModifyBroadcaster#optional";"removeModifyListener()"
diff --git a/qadevOOo/tests/java/ifc/sheet/_XDataPilotTablesSupplier.java b/qadevOOo/tests/java/ifc/sheet/_XDataPilotTablesSupplier.java
deleted file mode 100644
index 312c3db253ac..000000000000
--- a/qadevOOo/tests/java/ifc/sheet/_XDataPilotTablesSupplier.java
+++ /dev/null
@@ -1,50 +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.XDataPilotTables;
-import com.sun.star.sheet.XDataPilotTablesSupplier;
-
-/**
-* Testing <code>com.sun.star.sheet.XDataPilotTablesSupplier</code>
-* interface methods :
-* <ul>
-*  <li><code> getDataPilotTables()</code></li>
-* </ul> <p>
-* @see com.sun.star.sheet.XDataPilotTablesSupplier
-*/
-public class _XDataPilotTablesSupplier extends MultiMethodTest {
-
-    public XDataPilotTablesSupplier oObj = null;
-
-    /**
-    * Test calls the method and checks returned value. <p>
-    * Has <b> OK </b> status if returned value isn't null
-    * and no exceptions were thrown. <p>
-    */
-    public void _getDataPilotTables() {
-        XDataPilotTables DPTables = oObj.getDataPilotTables();
-        tRes.tested("getDataPilotTables()", DPTables != null);
-    }
-
-
-} // EOC _XDataPilotTablesSupplier
-
diff --git a/sc/qa/extras/sctablesheetobj.cxx b/sc/qa/extras/sctablesheetobj.cxx
index b0839a691f55..2ecd583ee5e9 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/xcellseries.hxx>
+#include <test/sheet/xdatapilottablessupplier.hxx>
 #include <test/sheet/xmultipleoperation.hxx>
 #include <test/sheet/xprintareas.hxx>
 #include <test/sheet/xscenarioenhanced.hxx>
@@ -38,9 +39,10 @@ using namespace css::uno;
 namespace sc_apitest
 {
 
-#define NUMBER_OF_TESTS 31
+#define NUMBER_OF_TESTS 32
 
 class ScTableSheetObj : public CalcUnoApiTest, public apitest::XCellSeries,
+                                               public apitest::XDataPilotTablesSupplier,
                                                public apitest::XMultipleOperation,
                                                public apitest::XPrintAreas,
                                                public apitest::XReplaceable,
@@ -77,6 +79,9 @@ public:
     CPPUNIT_TEST(testFillAuto);
     CPPUNIT_TEST(testFillSeries);
 
+    // XDataPilotTablesSupplier
+    CPPUNIT_TEST(testGetDataPilotTables);
+
     // XSearchable
     CPPUNIT_TEST(testFindAll);
     CPPUNIT_TEST(testFindNext);
diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk
index ff19a72912b6..ec2cfb06020f 100644
--- a/test/Library_subsequenttest.mk
+++ b/test/Library_subsequenttest.mk
@@ -60,6 +60,7 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\
 	test/source/sheet/xdatapilotfieldgrouping \
 	test/source/sheet/xdatapilottable \
 	test/source/sheet/xdatapilottable2 \
+	test/source/sheet/xdatapilottablessupplier \
 	test/source/sheet/xfunctiondescriptions \
 	test/source/sheet/xheaderfootercontent \
 	test/source/sheet/xlabelrange \
diff --git a/test/source/sheet/xdatapilottablessupplier.cxx b/test/source/sheet/xdatapilottablessupplier.cxx
new file mode 100644
index 000000000000..5a761d98d65c
--- /dev/null
+++ b/test/source/sheet/xdatapilottablessupplier.cxx
@@ -0,0 +1,32 @@
+/* -*- 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/xdatapilottablessupplier.hxx>
+
+#include <com/sun/star/sheet/XDataPilotTables.hpp>
+#include <com/sun/star/sheet/XDataPilotTablesSupplier.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+
+#include <cppunit/extensions/HelperMacros.h>
+
+using namespace css;
+using namespace css::uno;
+
+namespace apitest
+{
+void XDataPilotTablesSupplier::testGetDataPilotTables()
+{
+    uno::Reference<sheet::XDataPilotTablesSupplier> xDPTS(init(), UNO_QUERY_THROW);
+
+    uno::Reference<sheet::XDataPilotTables> xDPT(xDPTS->getDataPilotTables(), UNO_QUERY_THROW);
+    CPPUNIT_ASSERT_MESSAGE("Unable to get XDataPilotTables", xDPT.is());
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */


More information about the Libreoffice-commits mailing list