[Libreoffice-commits] core.git: qadevOOo/objdsc sc/qa

Jens Carl (via logerrit) logerrit at kemper.freedesktop.org
Thu Feb 27 21:27:08 UTC 2020


 qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetsObj.csv |    2 --
 sc/qa/extras/sctablesheetsobj.cxx                                |    9 +++++++++
 2 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit b9b553f17404ff24aae2be4cda65fa3c0f380985
Author:     Jens Carl <j.carl43 at gmx.de>
AuthorDate: Wed Feb 26 22:29:01 2020 -0800
Commit:     Jens Carl <j.carl43 at gmx.de>
CommitDate: Thu Feb 27 22:26:31 2020 +0100

    tdf#45904 Move XElementAccess Java tests to C++
    
    Move XElementAccess Java tests to C++ for ScTableSheetsObj.
    
    Change-Id: Ibc9d7e164e82387159a51568157c1d3b0756bf05
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89610
    Tested-by: Jenkins
    Reviewed-by: Jens Carl <j.carl43 at gmx.de>

diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetsObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetsObj.csv
index f88b5527bbe4..18c378322001 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetsObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetsObj.csv
@@ -1,4 +1,2 @@
 "ScTableSheetsObj";"com::sun::star::container::XNameContainer";"insertByName()"
 "ScTableSheetsObj";"com::sun::star::container::XNameContainer";"removeByName()"
-"ScTableSheetsObj";"com::sun::star::container::XElementAccess";"getElementType()"
-"ScTableSheetsObj";"com::sun::star::container::XElementAccess";"hasElements()"
diff --git a/sc/qa/extras/sctablesheetsobj.cxx b/sc/qa/extras/sctablesheetsobj.cxx
index 8b61d3825639..b995a03a78ab 100644
--- a/sc/qa/extras/sctablesheetsobj.cxx
+++ b/sc/qa/extras/sctablesheetsobj.cxx
@@ -8,6 +8,7 @@
  */
 
 #include <test/calc_unoapi_test.hxx>
+#include <test/container/xelementaccess.hxx>
 #include <test/container/xenumerationaccess.hxx>
 #include <test/container/xindexaccess.hxx>
 #include <test/container/xnameaccess.hxx>
@@ -15,7 +16,9 @@
 #include <test/container/xnamereplace.hxx>
 #include <test/sheet/xspreadsheets.hxx>
 #include <test/sheet/xspreadsheets2.hxx>
+#include <cppu/unotype.hxx>
 
+#include <com/sun/star/sheet/XSpreadsheet.hpp>
 #include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
 
 using namespace css;
@@ -23,6 +26,7 @@ using namespace css::uno;
 
 namespace sc_apitest {
 class ScTableSheetsObj : public CalcUnoApiTest,
+                         public ::apitest::XElementAccess,
                          public ::apitest::XEnumerationAccess,
                          public ::apitest::XIndexAccess,
                          public ::apitest::XNameAccess,
@@ -39,6 +43,10 @@ public:
 
     CPPUNIT_TEST_SUITE(ScTableSheetsObj);
 
+    // XElementAccess
+    CPPUNIT_TEST(testGetElementType);
+    CPPUNIT_TEST(testHasElements);
+
     // XEnumerationAccess
     CPPUNIT_TEST(testCreateEnumeration);
 
@@ -89,6 +97,7 @@ protected:
 
 ScTableSheetsObj::ScTableSheetsObj()
     : CalcUnoApiTest("/sc/qa/extras/testdocuments")
+    , ::apitest::XElementAccess(cppu::UnoType<sheet::XSpreadsheet>::get())
     , ::apitest::XIndexAccess(3)
     , ::apitest::XNameAccess("Sheet1")
     , ::apitest::XNameContainer("Sheet2")


More information about the Libreoffice-commits mailing list