tdf#45904 Move TableRow Java tests to C++

Move TableRow Java tests to C++ for ScTableRowObj.

Change-Id: I72cd8006b8ad932bab56681de9aac66fb40542fe
Reviewed-on: https://gerrit.libreoffice.org/70159
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
diff --git a/include/test/table/tablerow.hxx b/include/test/table/tablerow.hxx
new file mode 100644
index 0000000..150534b
--- /dev/null
+++ b/include/test/table/tablerow.hxx
@@ -0,0 +1,36 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

#ifndef INCLUDED_TEST_TABLE_TABLEROW_HXX
#define INCLUDED_TEST_TABLE_TABLEROW_HXX

#include <test/testdllapi.hxx>

#include <com/sun/star/uno/XInterface.hpp>

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

namespace apitest
{
class OOO_DLLPUBLIC_TEST TableRow
{
public:
    virtual css::uno::Reference<css::uno::XInterface> init() = 0;

    void testTableRowProperties();

protected:
    ~TableRow() {}
};

} // namespace apitest

#endif // INCLUDED_TEST_TABLE_TABLEROW_HXX

/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableRowObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableRowObj.csv
index 59f7efd..3b6fe97 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableRowObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableRowObj.csv
@@ -1,7 +1,3 @@
"ScTableRowObj";"com::sun::star::table::TableRow";"Height"
"ScTableRowObj";"com::sun::star::table::TableRow";"OptimalHeight"
"ScTableRowObj";"com::sun::star::table::TableRow";"IsVisible"
"ScTableRowObj";"com::sun::star::table::TableRow";"IsStartOfNewPage"
"ScTableRowObj";"com::sun::star::table::XCellRange";"getCellByPosition()"
"ScTableRowObj";"com::sun::star::table::XCellRange";"getCellRangeByPosition()"
"ScTableRowObj";"com::sun::star::table::XCellRange";"getCellRangeByName()"
diff --git a/sc/qa/extras/sctablerowobj.cxx b/sc/qa/extras/sctablerowobj.cxx
index 381c4dc..d264d24 100644
--- a/sc/qa/extras/sctablerowobj.cxx
+++ b/sc/qa/extras/sctablerowobj.cxx
@@ -9,6 +9,7 @@

#include <test/calc_unoapi_test.hxx>
#include <test/beans/xpropertyset.hxx>
#include <test/table/tablerow.hxx>

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

namespace sc_apitest
{
class ScTableRowObj : public CalcUnoApiTest, public apitest::XPropertySet
class ScTableRowObj : public CalcUnoApiTest, public apitest::TableRow, public apitest::XPropertySet
{
public:
    ScTableRowObj();
@@ -36,6 +37,9 @@

    CPPUNIT_TEST_SUITE(ScTableRowObj);

    // TableRow
    CPPUNIT_TEST(testTableRowProperties);

    // XPropertySet
    CPPUNIT_TEST(testGetPropertySetInfo);
    CPPUNIT_TEST(testGetPropertyValue);
diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk
index c636235..796fbce 100644
--- a/test/Library_subsequenttest.mk
+++ b/test/Library_subsequenttest.mk
@@ -162,6 +162,7 @@
	test/source/sheet/xviewpane \
	test/source/sheet/xviewsplitable \
	test/source/style/xstyleloader \
	test/source/table/tablerow \
	test/source/table/xcell \
	test/source/table/xcellcursor \
	test/source/table/xcolumnrowrange \
diff --git a/test/source/table/tablerow.cxx b/test/source/table/tablerow.cxx
new file mode 100644
index 0000000..f07f6e2
--- /dev/null
+++ b/test/source/table/tablerow.cxx
@@ -0,0 +1,43 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

#include <test/table/tablerow.hxx>
#include <test/unoapi_property_testers.hxx>
#include <rtl/ustring.h>

#include <com/sun/star/beans/XPropertySet.hpp>

#include <cppunit/extensions/HelperMacros.h>

using namespace css;

namespace apitest
{
void TableRow::testTableRowProperties()
{
    uno::Reference<beans::XPropertySet> xPS(init(), uno::UNO_QUERY_THROW);

    OUString aPropName;

    aPropName = "Height";
    testLongProperty(xPS, aPropName);

    aPropName = "OptimalHeight";
    testBooleanProperty(xPS, aPropName);

    aPropName = "IsVisible";
    testBooleanProperty(xPS, aPropName);

    aPropName = "IsStartOfNewPage";
    testBooleanProperty(xPS, aPropName);
}

} // namespace apitest

/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */