include/test/table/tablerow.hxx | 36 ++++++++ qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableRowObj.csv | 4 sc/qa/extras/sctablerowobj.cxx | 6 + test/Library_subsequenttest.mk | 1 test/source/table/tablerow.cxx | 43 ++++++++++ 5 files changed, 85 insertions(+), 5 deletions(-)
New commits: commit cc9a8c13dad6f3d82a2386554bd6113b486a1752 Author: Jens Carl <j.car...@gmx.de> AuthorDate: Tue Apr 2 21:14:33 2019 +0000 Commit: Jens Carl <j.car...@gmx.de> CommitDate: Wed Apr 3 00:39:08 2019 +0200 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.car...@gmx.de> diff --git a/include/test/table/tablerow.hxx b/include/test/table/tablerow.hxx new file mode 100644 index 000000000000..150534bb2227 --- /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 59f7efd6554a..3b6fe9714ae4 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 381c4dc3a78c..d264d24ca69f 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 @@ using namespace css; 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 @@ public: 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 c636235913bf..796fbcef122c 100644 --- a/test/Library_subsequenttest.mk +++ b/test/Library_subsequenttest.mk @@ -162,6 +162,7 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\ 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 000000000000..f07f6e2f67a7 --- /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: */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits