tdf#45904 Move XElementAccess Java tests to C++

Move XElementAccess Java tests to C++ for ScAutoFormatObj.

Change-Id: I926052ed79d6639ef3898f6486b626ca6cc042c3
Reviewed-on: https://gerrit.libreoffice.org/70095
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScAutoFormatObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScAutoFormatObj.csv
index 694fd81..ac08c66f 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScAutoFormatObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScAutoFormatObj.csv
@@ -1,5 +1,3 @@
"ScAutoFormatObj";"com::sun::star::container::XElementAccess";"getElementType()"
"ScAutoFormatObj";"com::sun::star::container::XElementAccess";"hasElements()"
"ScAutoFormatObj";"com::sun::star::container::XNamed";"getName()"
"ScAutoFormatObj";"com::sun::star::container::XNamed";"setName()"
"ScAutoFormatObj";"com::sun::star::beans::XPropertySet";"getPropertySetInfo()"
diff --git a/sc/qa/extras/scautoformatobj.cxx b/sc/qa/extras/scautoformatobj.cxx
index 8f86f46..1f64c0b 100644
--- a/sc/qa/extras/scautoformatobj.cxx
+++ b/sc/qa/extras/scautoformatobj.cxx
@@ -8,9 +8,11 @@
 */

#include <test/calc_unoapi_test.hxx>
#include <test/container/xelementaccess.hxx>
#include <test/container/xenumerationaccess.hxx>
#include <test/container/xindexaccess.hxx>
#include <test/sheet/tableautoformat.hxx>
#include <cppu/unotype.hxx>

#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
@@ -27,6 +29,7 @@
{
class ScAutoFormatObj : public CalcUnoApiTest,
                        public apitest::TableAutoFormat,
                        public apitest::XElementAccess,
                        public apitest::XEnumerationAccess,
                        public apitest::XIndexAccess
{
@@ -42,6 +45,10 @@
    // TableAutoFormat
    CPPUNIT_TEST(testTableAutoFormatProperties);

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

    // XEnumerationAccess
    CPPUNIT_TEST(testCreateEnumeration);

@@ -57,6 +64,7 @@

ScAutoFormatObj::ScAutoFormatObj()
    : CalcUnoApiTest("/sc/qa/extras/testdocuments")
    , XElementAccess(cppu::UnoType<beans::XPropertySet>::get())
    , XIndexAccess(16)
{
}