tdf#45904 Move XNamed Java tests to C++

Move XNamed Java tests to C++ for ScTableColumnObj.

Change-Id: I6037db86d917a5a64f19dc799d80e175e971b90d
Reviewed-on: https://gerrit.libreoffice.org/71033
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableColumnObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableColumnObj.csv
index a20406e..70a50be 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableColumnObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableColumnObj.csv
@@ -1,5 +1,3 @@
"ScTableColumnObj";"com::sun::star::container::XNamed";"getName()"
"ScTableColumnObj";"com::sun::star::container::XNamed";"setName()"
"ScTableColumnObj";"com::sun::star::beans::XPropertySet";"getPropertySetInfo()"
"ScTableColumnObj";"com::sun::star::beans::XPropertySet";"setPropertyValue()"
"ScTableColumnObj";"com::sun::star::beans::XPropertySet";"getPropertyValue()"
diff --git a/sc/qa/extras/sctablecolumnobj.cxx b/sc/qa/extras/sctablecolumnobj.cxx
index 9a8b8c7..c65a868 100644
--- a/sc/qa/extras/sctablecolumnobj.cxx
+++ b/sc/qa/extras/sctablecolumnobj.cxx
@@ -8,6 +8,7 @@
 */

#include <test/calc_unoapi_test.hxx>
#include <test/container/xnamed.hxx>
#include <test/table/xcellrange.hxx>

#include <com/sun/star/container/XIndexAccess.hpp>
@@ -25,7 +26,7 @@

namespace sc_apitest
{
class ScTableColumnObj : public CalcUnoApiTest, public apitest::XCellRange
class ScTableColumnObj : public CalcUnoApiTest, public apitest::XCellRange, public apitest::XNamed
{
public:
    ScTableColumnObj();
@@ -41,6 +42,11 @@
    CPPUNIT_TEST(testGetCellRangeByName);
    CPPUNIT_TEST(testGetCellRangeByPosition);

    // XNamed
    CPPUNIT_TEST(testGetName);
    // because TableColumnNames are fixed, test for an exception
    CPPUNIT_TEST(testSetNameThrowsException);

    CPPUNIT_TEST_SUITE_END();

private:
@@ -50,6 +56,7 @@
ScTableColumnObj::ScTableColumnObj()
    : CalcUnoApiTest("/sc/qa/extras/testdocuments")
    , XCellRange("K1:K1")
    , XNamed("K")
{
}