Kaydet (Commit) b92af3c7 authored tarafından Jens Carl's avatar Jens Carl

tdf#45904 Move _XCellRangeAddressable Java test to C++

Change-Id: Ic3c1e6d793d4405c2dc4b8e7d1d7b87ed94fc6c3
Reviewed-on: https://gerrit.libreoffice.org/46579Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJens Carl <j.carl43@gmx.de>
üst 2557c076
/* -*- 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_SHEET_XCELLRANGEADDRESSABLE_HXX
#define INCLUDED_TEST_SHEET_XCELLRANGEADDRESSABLE_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 XCellRangeAddressable
{
public:
virtual css::uno::Reference<css::uno::XInterface> init() = 0;
void testGetRangeAddress();
protected:
~XCellRangeAddressable() {}
};
}
#endif // INCLUDED_TEST_SHEET_XCELLRANGEADDRESSABLE_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
......@@ -586,7 +586,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
qadevOOo/tests/java/ifc/sheet/_XActivationBroadcaster \
qadevOOo/tests/java/ifc/sheet/_XArrayFormulaRange \
qadevOOo/tests/java/ifc/sheet/_XCalculatable \
qadevOOo/tests/java/ifc/sheet/_XCellRangeAddressable \
qadevOOo/tests/java/ifc/sheet/_XCellRangeData \
qadevOOo/tests/java/ifc/sheet/_XCellRangeFormula \
qadevOOo/tests/java/ifc/sheet/_XCellRangeMovement \
......
......@@ -41,7 +41,6 @@
"ScCellCursorObj";"com::sun::star::style::CharacterPropertiesAsian";"ParaIsCharacterDistance"
"ScCellCursorObj";"com::sun::star::style::CharacterPropertiesAsian";"ParaIsForbiddenRules"
"ScCellCursorObj";"com::sun::star::style::CharacterPropertiesAsian";"ParaIsHangingPunctuation"
"ScCellCursorObj";"com::sun::star::sheet::XCellRangeAddressable";"getRangeAddress()"
"ScCellCursorObj";"com::sun::star::table::XCellCursor";"gotoStart()"
"ScCellCursorObj";"com::sun::star::table::XCellCursor";"gotoEnd()"
"ScCellCursorObj";"com::sun::star::table::XCellCursor";"gotoNext()"
......
......@@ -41,7 +41,6 @@
"ScCellRangeObj";"com::sun::star::style::CharacterPropertiesAsian";"ParaIsCharacterDistance"
"ScCellRangeObj";"com::sun::star::style::CharacterPropertiesAsian";"ParaIsForbiddenRules"
"ScCellRangeObj";"com::sun::star::style::CharacterPropertiesAsian";"ParaIsHangingPunctuation"
"ScCellRangeObj";"com::sun::star::sheet::XCellRangeAddressable";"getRangeAddress()"
"ScCellRangeObj";"com::sun::star::util::XReplaceable";"createReplaceDescriptor()"
"ScCellRangeObj";"com::sun::star::util::XReplaceable";"replaceAll()"
"ScCellRangeObj";"com::sun::star::chart::XChartData";"addChartDataChangeEventListener()"
......
......@@ -41,7 +41,6 @@
"ScTableSheetObj";"com::sun::star::style::CharacterPropertiesAsian";"ParaIsCharacterDistance"
"ScTableSheetObj";"com::sun::star::style::CharacterPropertiesAsian";"ParaIsForbiddenRules"
"ScTableSheetObj";"com::sun::star::style::CharacterPropertiesAsian";"ParaIsHangingPunctuation"
"ScTableSheetObj";"com::sun::star::sheet::XCellRangeAddressable";"getRangeAddress()"
"ScTableSheetObj";"com::sun::star::util::XReplaceable";"createReplaceDescriptor()"
"ScTableSheetObj";"com::sun::star::util::XReplaceable";"replaceAll()"
"ScTableSheetObj";"com::sun::star::chart::XChartData";"addChartDataChangeEventListener()"
......
/*
* 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.sheet;
import lib.MultiMethodTest;
import com.sun.star.sheet.XCellRangeAddressable;
import com.sun.star.table.CellRangeAddress;
/**
* Testing <code>com.sun.star.sheet.XCellRangeAddressable</code>
* interface methods :
* <ul>
* <li><code> getRangeAddress()</code></li>
* </ul> <p>
* @see com.sun.star.sheet.XCellRangeAddressable
*/
public class _XCellRangeAddressable extends MultiMethodTest {
public XCellRangeAddressable oObj = null;
/**
* Test calls the method and checks returned value.
* Has <b> OK </b> status if returned value isn't null. <p>
*/
public void _getRangeAddress() {
CellRangeAddress oAddr = oObj.getRangeAddress();
tRes.tested("getRangeAddress()", oAddr != null);
}
} // EOC _XCellRangeAddressable
......@@ -9,6 +9,7 @@
#include <test/calc_unoapi_test.hxx>
#include <test/sheet/xcellformatrangessupplier.hxx>
#include <test/sheet/xcellrangeaddressable.hxx>
#include <test/sheet/xcellseries.hxx>
#include <test/sheet/xmultipleoperation.hxx>
#include <test/sheet/xsheetcellrange.hxx>
......@@ -28,9 +29,10 @@ using namespace css::uno;
namespace sc_apitest {
#define NUMBER_OF_TESTS 15
#define NUMBER_OF_TESTS 16
class ScCellCursorObj : public CalcUnoApiTest, public apitest::XCellFormatRangesSupplier,
public apitest::XCellRangeAddressable,
public apitest::XCellSeries,
public apitest::XMultipleOperation,
public apitest::XSheetCellRange,
......@@ -61,6 +63,9 @@ public:
// XCellFormatRangesSupplier
CPPUNIT_TEST(testGetCellFormatRanges);
// XCellRangeAddressable
CPPUNIT_TEST(testGetRangeAddress);
// XCellSeries
CPPUNIT_TEST(testFillAuto);
CPPUNIT_TEST(testFillSeries);
......
......@@ -10,6 +10,7 @@
#include <test/calc_unoapi_test.hxx>
#include <test/sheet/cellproperties.hxx>
#include <test/sheet/xcellformatrangessupplier.hxx>
#include <test/sheet/xcellrangeaddressable.hxx>
#include <test/sheet/xcellrangedata.hxx>
#include <test/sheet/xcellrangesquery.hxx>
#include <test/sheet/xcellseries.hxx>
......@@ -45,10 +46,11 @@ using namespace css::uno;
namespace sc_apitest {
#define NUMBER_OF_TESTS 28
#define NUMBER_OF_TESTS 29
class ScCellRangeObj : public CalcUnoApiTest, public apitest::CellProperties,
public apitest::XCellFormatRangesSupplier,
public apitest::XCellRangeAddressable,
public apitest::XCellRangeData,
public apitest::XCellRangesQuery,
public apitest::XCellSeries,
......@@ -85,6 +87,9 @@ public:
CPPUNIT_TEST(testFillAuto);
CPPUNIT_TEST(testFillSeries);
// XCellRangeAddressable
CPPUNIT_TEST(testGetRangeAddress);
// XCellRangeData
CPPUNIT_TEST(testGetDataArray);
CPPUNIT_TEST(testSetDataArray);
......
......@@ -9,6 +9,7 @@
#include <test/calc_unoapi_test.hxx>
#include <test/sheet/xcellformatrangessupplier.hxx>
#include <test/sheet/xcellrangeaddressable.hxx>
#include <test/sheet/xcellseries.hxx>
#include <test/sheet/xdatapilottablessupplier.hxx>
#include <test/sheet/xmultipleoperation.hxx>
......@@ -40,9 +41,10 @@ using namespace css::uno;
namespace sc_apitest
{
#define NUMBER_OF_TESTS 33
#define NUMBER_OF_TESTS 34
class ScTableSheetObj : public CalcUnoApiTest, public apitest::XCellFormatRangesSupplier,
public apitest::XCellRangeAddressable,
public apitest::XCellSeries,
public apitest::XDataPilotTablesSupplier,
public apitest::XMultipleOperation,
......@@ -80,6 +82,9 @@ public:
// XCellFormatRangesSupplier
CPPUNIT_TEST(testGetCellFormatRanges);
// XCellRangeAddressable
CPPUNIT_TEST(testGetRangeAddress);
// XCellSeries
CPPUNIT_TEST(testFillAuto);
CPPUNIT_TEST(testFillSeries);
......
......@@ -51,6 +51,7 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\
test/source/sheet/xarealinks \
test/source/sheet/xcelladdressable \
test/source/sheet/xcellformatrangessupplier \
test/source/sheet/xcellrangeaddressable \
test/source/sheet/xcellrangedata \
test/source/sheet/xcellrangereferrer \
test/source/sheet/xcellrangesquery \
......
/* -*- 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/sheet/xcellrangeaddressable.hxx>
#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
#include <com/sun/star/table/CellRangeAddress.hpp>
#include <com/sun/star/uno/Reference.hxx>
#include <cppunit/extensions/HelperMacros.h>
using namespace css;
using namespace css::uno;
namespace apitest
{
void XCellRangeAddressable::testGetRangeAddress()
{
uno::Reference<sheet::XCellRangeAddressable> xCRA(init(), UNO_QUERY_THROW);
table::CellRangeAddress aCellRangeAddr = xCRA->getRangeAddress();
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to get CellRangeAddress", sal_Int16(0),
aCellRangeAddr.Sheet);
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment