tdf#45904 Move _XColumnRowRange Java tests to C++

Change-Id: I35b5fc2f18867c386c8c92d1d7a3a0823bd07b78
Reviewed-on: https://gerrit.libreoffice.org/59863
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
diff --git a/include/test/table/xcolumnrowrange.hxx b/include/test/table/xcolumnrowrange.hxx
new file mode 100644
index 0000000..279a988
--- /dev/null
+++ b/include/test/table/xcolumnrowrange.hxx
@@ -0,0 +1,35 @@
/* -*- 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_XCOLUMNROWRANGE_HXX
#define INCLUDED_TEST_TABLE_XCOLUMNROWRANGE_HXX

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

#include <test/testdllapi.hxx>

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

    void testGetColumns();
    void testGetRows();

protected:
    ~XColumnRowRange() {}
};
}

#endif // INCLUDED_TEST_TABLE_XCOLUMNROWRANGE_HXX

/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index c096f49..e348176 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -588,7 +588,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
    qadevOOo/tests/java/ifc/table/_TableRow \
    qadevOOo/tests/java/ifc/table/_XAutoFormattable \
    qadevOOo/tests/java/ifc/table/_XCellRange \
    qadevOOo/tests/java/ifc/table/_XColumnRowRange \
    qadevOOo/tests/java/ifc/table/_XTableChart \
    qadevOOo/tests/java/ifc/table/_XTableCharts \
    qadevOOo/tests/java/ifc/table/_XTableChartsSupplier \
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellCursorObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellCursorObj.csv
index 2dfea63..c68950d 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellCursorObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellCursorObj.csv
@@ -27,8 +27,6 @@
"ScCellCursorObj";"com::sun::star::util::XSearchable";"findAll()"
"ScCellCursorObj";"com::sun::star::util::XSearchable";"findFirst()"
"ScCellCursorObj";"com::sun::star::util::XSearchable";"findNext()"
"ScCellCursorObj";"com::sun::star::table::XColumnRowRange";"getColumns()"
"ScCellCursorObj";"com::sun::star::table::XColumnRowRange";"getRows()"
"ScCellCursorObj";"com::sun::star::style::CharacterPropertiesAsian";"CharHeightAsian"
"ScCellCursorObj";"com::sun::star::style::CharacterPropertiesAsian";"CharWeightAsian"
"ScCellCursorObj";"com::sun::star::style::CharacterPropertiesAsian";"CharFontNameAsian"
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellObj.csv
index b936c50..036c38d 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellObj.csv
@@ -25,8 +25,6 @@
"ScCellObj";"com::sun::star::util::XSearchable";"findAll()"
"ScCellObj";"com::sun::star::util::XSearchable";"findFirst()"
"ScCellObj";"com::sun::star::util::XSearchable";"findNext()"
"ScCellObj";"com::sun::star::table::XColumnRowRange";"getColumns()"
"ScCellObj";"com::sun::star::table::XColumnRowRange";"getRows()"
"ScCellObj";"com::sun::star::style::CharacterPropertiesAsian";"CharHeightAsian"
"ScCellObj";"com::sun::star::style::CharacterPropertiesAsian";"CharWeightAsian"
"ScCellObj";"com::sun::star::style::CharacterPropertiesAsian";"CharFontNameAsian"
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangeObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangeObj.csv
index eed12b6..1c44171 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangeObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangeObj.csv
@@ -27,8 +27,6 @@
"ScCellRangeObj";"com::sun::star::util::XSearchable";"findAll()"
"ScCellRangeObj";"com::sun::star::util::XSearchable";"findFirst()"
"ScCellRangeObj";"com::sun::star::util::XSearchable";"findNext()"
"ScCellRangeObj";"com::sun::star::table::XColumnRowRange";"getColumns()"
"ScCellRangeObj";"com::sun::star::table::XColumnRowRange";"getRows()"
"ScCellRangeObj";"com::sun::star::style::CharacterPropertiesAsian";"CharHeightAsian"
"ScCellRangeObj";"com::sun::star::style::CharacterPropertiesAsian";"CharWeightAsian"
"ScCellRangeObj";"com::sun::star::style::CharacterPropertiesAsian";"CharFontNameAsian"
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv
index 59f9210..a195cb4 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv
@@ -27,8 +27,6 @@
"ScTableSheetObj";"com::sun::star::util::XSearchable";"findAll()"
"ScTableSheetObj";"com::sun::star::util::XSearchable";"findFirst()"
"ScTableSheetObj";"com::sun::star::util::XSearchable";"findNext()"
"ScTableSheetObj";"com::sun::star::table::XColumnRowRange";"getColumns()"
"ScTableSheetObj";"com::sun::star::table::XColumnRowRange";"getRows()"
"ScTableSheetObj";"com::sun::star::style::CharacterPropertiesAsian";"CharHeightAsian"
"ScTableSheetObj";"com::sun::star::style::CharacterPropertiesAsian";"CharWeightAsian"
"ScTableSheetObj";"com::sun::star::style::CharacterPropertiesAsian";"CharFontNameAsian"
diff --git a/qadevOOo/tests/java/ifc/table/_XColumnRowRange.java b/qadevOOo/tests/java/ifc/table/_XColumnRowRange.java
deleted file mode 100644
index b89f716..0000000
--- a/qadevOOo/tests/java/ifc/table/_XColumnRowRange.java
+++ /dev/null
@@ -1,57 +0,0 @@
/*
 * 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/.
 *
 * This file incorporates work covered by the following license notice:
 *
 *   Licensed to the Apache Software Foundation (ASF) under one or more
 *   contributor license agreements. See the NOTICE file distributed
 *   with this work for additional information regarding copyright
 *   ownership. The ASF licenses this file to you under the Apache
 *   License, Version 2.0 (the "License"); you may not use this file
 *   except in compliance with the License. You may obtain a copy of
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */

package ifc.table;

import lib.MultiMethodTest;

import com.sun.star.table.XColumnRowRange;

/**
* Testing <code>com.sun.star.table.XColumnRowRange</code>
* interface methods :
* <ul>
*  <li><code> getColumns()</code></li>
*  <li><code> getRows()</code></li>
* </ul> <p>
* @see com.sun.star.table.XColumnRowRange
*/
public class _XColumnRowRange extends MultiMethodTest {

    public XColumnRowRange oObj = null;

    /**
     * Test calls the method. <p>
     * Has <b> OK </b> status if the method returns not null value
     * and no exceptions were thrown. <p>
     */
    public void _getColumns() {
        tRes.tested( "getColumns()", oObj.getColumns()!=null );
    } // getColumns()

    /**
     * Test calls the method. <p>
     * Has <b> OK </b> status if the method returns not null value
     * and no exceptions were thrown. <p>
     */
    public void _getRows() {
        tRes.tested( "getRows()", oObj.getRows()!=null );
    } // getRows()

} // finish class _XColumnRowRange

diff --git a/sc/qa/extras/sccellcursorobj.cxx b/sc/qa/extras/sccellcursorobj.cxx
index 08c9931..ed1fd27 100644
--- a/sc/qa/extras/sccellcursorobj.cxx
+++ b/sc/qa/extras/sccellcursorobj.cxx
@@ -26,6 +26,7 @@
#include <test/sheet/xuniquecellformatrangessupplier.hxx>
#include <test/sheet/xusedareacursor.hxx>
#include <test/table/xcellcursor.hxx>
#include <test/table/xcolumnrowrange.hxx>

#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/sheet/XSpreadsheet.hpp>
@@ -44,6 +45,7 @@ class ScCellCursorObj : public CalcUnoApiTest, public apitest::SheetCellRange,
                                               public apitest::XCellRangeData,
                                               public apitest::XCellRangeFormula,
                                               public apitest::XCellSeries,
                                               public apitest::XColumnRowRange,
                                               public apitest::XFormulaQuery,
                                               public apitest::XMultipleOperation,
                                               public apitest::XSheetCellCursor,
@@ -96,6 +98,10 @@ public:
    CPPUNIT_TEST(testFillAuto);
    CPPUNIT_TEST(testFillSeries);

    // XColumnRowRange
    CPPUNIT_TEST(testGetColumns);
    CPPUNIT_TEST(testGetRows);

    // XFormulaQuery
    CPPUNIT_TEST(testQueryDependents);
    CPPUNIT_TEST(testQueryPrecedents);
diff --git a/sc/qa/extras/sccellobj.cxx b/sc/qa/extras/sccellobj.cxx
index 2361b3c..1a3ffb2 100644
--- a/sc/qa/extras/sccellobj.cxx
+++ b/sc/qa/extras/sccellobj.cxx
@@ -13,6 +13,7 @@
#include <test/sheet/xcelladdressable.hxx>
#include <test/sheet/xformulaquery.hxx>
#include <test/sheet/xsheetannotationanchor.hxx>
#include <test/table/xcolumnrowrange.hxx>

#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/sheet/XSheetAnnotationsSupplier.hpp>
@@ -32,6 +33,7 @@ namespace sc_apitest {
class ScCellObj : public CalcUnoApiTest, public apitest::SheetCell,
                                         public apitest::XCell,
                                         public apitest::XCellAddressable,
                                         public apitest::XColumnRowRange,
                                         public apitest::XFormulaQuery,
                                         public apitest::XSheetAnnotationAnchor
{
@@ -57,6 +59,10 @@ public:
    // XCellAddressable
    CPPUNIT_TEST(testGetCellAddress);

    // XColumnRowRange
    CPPUNIT_TEST(testGetColumns);
    CPPUNIT_TEST(testGetRows);

    // XFormulaQuery
    CPPUNIT_TEST(testQueryDependents);
    CPPUNIT_TEST(testQueryPrecedents);
diff --git a/sc/qa/extras/sccellrangeobj.cxx b/sc/qa/extras/sccellrangeobj.cxx
index 57093ee..2cb241c 100644
--- a/sc/qa/extras/sccellrangeobj.cxx
+++ b/sc/qa/extras/sccellrangeobj.cxx
@@ -25,6 +25,7 @@
#include <test/sheet/xsheetoperation.hxx>
#include <test/sheet/xsubtotalcalculatable.hxx>
#include <test/sheet/xuniquecellformatrangessupplier.hxx>
#include <test/table/xcolumnrowrange.hxx>
#include <test/util/xreplaceable.hxx>
#include <test/util/xsearchable.hxx>

@@ -59,6 +60,7 @@ class ScCellRangeObj : public CalcUnoApiTest, public apitest::CellProperties,
                                              public apitest::XCellRangeFormula,
                                              public apitest::XCellRangesQuery,
                                              public apitest::XCellSeries,
                                              public apitest::XColumnRowRange,
                                              public apitest::XFormulaQuery,
                                              public apitest::XMultipleOperation,
                                              public apitest::XReplaceable,
@@ -118,6 +120,10 @@ public:
    CPPUNIT_TEST(testFillAuto);
    CPPUNIT_TEST(testFillSeries);

    // XColumnRowRange
    CPPUNIT_TEST(testGetColumns);
    CPPUNIT_TEST(testGetRows);

    // XFormulaQuery
    CPPUNIT_TEST(testQueryDependents);
    CPPUNIT_TEST(testQueryPrecedents);
diff --git a/sc/qa/extras/sctablesheetobj.cxx b/sc/qa/extras/sctablesheetobj.cxx
index 5006bbe..f7eadb1 100644
--- a/sc/qa/extras/sctablesheetobj.cxx
+++ b/sc/qa/extras/sctablesheetobj.cxx
@@ -36,6 +36,7 @@
#include <test/sheet/xspreadsheet.hxx>
#include <test/sheet/xsubtotalcalculatable.hxx>
#include <test/sheet/xuniquecellformatrangessupplier.hxx>
#include <test/table/xcolumnrowrange.hxx>
#include <test/util/xreplaceable.hxx>
#include <test/util/xsearchable.hxx>

@@ -60,6 +61,7 @@ class ScTableSheetObj : public CalcUnoApiTest, public apitest::Scenario,
                                               public apitest::XCellRangeFormula,
                                               public apitest::XCellRangeMovement,
                                               public apitest::XCellSeries,
                                               public apitest::XColumnRowRange,
                                               public apitest::XDataPilotTablesSupplier,
                                               public apitest::XFormulaQuery,
                                               public apitest::XMultipleOperation,
@@ -136,6 +138,10 @@ public:
    CPPUNIT_TEST(testFillAuto);
    CPPUNIT_TEST(testFillSeries);

    // XColumnRowRange
    CPPUNIT_TEST(testGetColumns);
    CPPUNIT_TEST(testGetRows);

    // XDataPilotTablesSupplier
    CPPUNIT_TEST(testGetDataPilotTables);

diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk
index 604800a..fce5a903 100644
--- a/test/Library_subsequenttest.mk
+++ b/test/Library_subsequenttest.mk
@@ -148,6 +148,7 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\
	test/source/sheet/xsubtotaldescriptor \
	test/source/table/xcell \
	test/source/table/xcellcursor \
	test/source/table/xcolumnrowrange \
	test/source/text/xtext \
	test/source/text/xtextfield \
	test/source/text/xtextcontent \
diff --git a/test/source/table/xcolumnrowrange.cxx b/test/source/table/xcolumnrowrange.cxx
new file mode 100644
index 0000000..4f2777a
--- /dev/null
+++ b/test/source/table/xcolumnrowrange.cxx
@@ -0,0 +1,37 @@
/* -*- 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/cppunitasserthelper.hxx>
#include <test/table/xcolumnrowrange.hxx>

#include <com/sun/star/table/XColumnRowRange.hpp>

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

#include <cppunit/extensions/HelperMacros.h>

using namespace com::sun::star;
using namespace com::sun::star::uno;

namespace apitest
{
void XColumnRowRange::testGetColumns()
{
    uno::Reference<table::XColumnRowRange> xColumnRowRange(init(), UNO_QUERY_THROW);
    CPPUNIT_ASSERT(xColumnRowRange->getColumns());
}

void XColumnRowRange::testGetRows()
{
    uno::Reference<table::XColumnRowRange> xColumnRowRange(init(), UNO_QUERY_THROW);
    CPPUNIT_ASSERT(xColumnRowRange->getRows());
}
}

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