tdf#45904 Move XElementAccess Java tests to C++

Move XElementAccess Java tests to C++ for ScTableRowsObj.

Change-Id: Iefe5024cbde5f1583a560d8569e9aa460b68e42e
Reviewed-on: https://gerrit.libreoffice.org/65372
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableRowsObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableRowsObj.csv
index c73b20a..ac73e23 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableRowsObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableRowsObj.csv
@@ -1,5 +1,3 @@
"ScTableRowsObj";"com::sun::star::container::XElementAccess";"getElementType()"
"ScTableRowsObj";"com::sun::star::container::XElementAccess";"hasElements()"
"ScTableRowsObj";"com::sun::star::table::XTableRows";"insertByIndex()"
"ScTableRowsObj";"com::sun::star::table::XTableRows";"removeByIndex()"
"ScTableRowsObj";"com::sun::star::container::XEnumerationAccess";"createEnumeration()"
diff --git a/sc/qa/extras/sctablerowsobj.cxx b/sc/qa/extras/sctablerowsobj.cxx
index 67c1f86..6814900 100644
--- a/sc/qa/extras/sctablerowsobj.cxx
+++ b/sc/qa/extras/sctablerowsobj.cxx
@@ -8,6 +8,7 @@
 */

#include <test/calc_unoapi_test.hxx>
#include <test/container/xelementaccess.hxx>
#include <test/container/xindexaccess.hxx>

#include <com/sun/star/container/XNameAccess.hpp>
@@ -15,18 +16,23 @@
#include <com/sun/star/sheet/XSpreadsheet.hpp>
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/sheet/XSpreadsheets.hpp>
#include <com/sun/star/table/XCellRange.hpp>
#include <com/sun/star/table/XColumnRowRange.hpp>
#include <com/sun/star/table/XTableRows.hpp>
#include <com/sun/star/uno/XInterface.hpp>

#include <com/sun/star/uno/Reference.hxx>

#include <cppu/unotype.hxx>

using namespace css;
using namespace css::uno;

namespace sc_apitest
{
class ScTableRowsObj : public CalcUnoApiTest, public apitest::XIndexAccess
class ScTableRowsObj : public CalcUnoApiTest,
                       public apitest::XElementAccess,
                       public apitest::XIndexAccess
{
public:
    ScTableRowsObj();
@@ -37,6 +43,10 @@

    CPPUNIT_TEST_SUITE(ScTableRowsObj);

    // XElementAccess
    CPPUNIT_TEST(testGetElementType);
    CPPUNIT_TEST(testHasElements);

    // XIndexAccess
    CPPUNIT_TEST(testGetByIndex);
    CPPUNIT_TEST(testGetCount);
@@ -49,6 +59,7 @@

ScTableRowsObj::ScTableRowsObj()
    : CalcUnoApiTest("/sc/qa/extras/testdocuemts")
    , XElementAccess(cppu::UnoType<table::XCellRange>::get())
    , XIndexAccess(1048576)
{
}