summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Carl <j.carl43@gmx.de>2020-02-26 22:29:01 -0800
committerJens Carl <j.carl43@gmx.de>2020-02-27 22:26:31 +0100
commitb9b553f17404ff24aae2be4cda65fa3c0f380985 (patch)
treef95619ab765238baad7712c92b7fc32f3280dd9e
parentb6546c0cbd00357f6c815e8349a12b872700c3f8 (diff)
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@gmx.de>
-rw-r--r--qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetsObj.csv2
-rw-r--r--sc/qa/extras/sctablesheetsobj.cxx9
2 files changed, 9 insertions, 2 deletions
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")