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

tdf#45904 Move Java _XSheetCellRange tests to C++

Change-Id: Ia4534f083a804d450ac8fdd31759f1554b684e15
Reviewed-on: https://gerrit.libreoffice.org/44245Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJens Carl <j.carl43@gmx.de>
üst 646448dd
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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_XSHEETCELLRANGE_HXX
#define INCLUDED_TEST_SHEET_XSHEETCELLRANGE_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 XSheetCellRange
{
public:
virtual css::uno::Reference< css::uno::XInterface > init() =0;
void testGetSpreadsheet();
protected:
~XSheetCellRange() {}
};
}
#endif // INCLUDED_TEST_SHEET_XSHEETCELLRANGE_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -618,7 +618,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\ ...@@ -618,7 +618,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
qadevOOo/tests/java/ifc/sheet/_XSheetAnnotationsSupplier \ qadevOOo/tests/java/ifc/sheet/_XSheetAnnotationsSupplier \
qadevOOo/tests/java/ifc/sheet/_XSheetAuditing \ qadevOOo/tests/java/ifc/sheet/_XSheetAuditing \
qadevOOo/tests/java/ifc/sheet/_XSheetCellCursor \ qadevOOo/tests/java/ifc/sheet/_XSheetCellCursor \
qadevOOo/tests/java/ifc/sheet/_XSheetCellRange \
qadevOOo/tests/java/ifc/sheet/_XSheetCellRangeContainer \ qadevOOo/tests/java/ifc/sheet/_XSheetCellRangeContainer \
qadevOOo/tests/java/ifc/sheet/_XSheetFilterableEx \ qadevOOo/tests/java/ifc/sheet/_XSheetFilterableEx \
qadevOOo/tests/java/ifc/sheet/_XSpreadsheetView \ qadevOOo/tests/java/ifc/sheet/_XSpreadsheetView \
......
...@@ -126,7 +126,6 @@ ...@@ -126,7 +126,6 @@
"ScCellCursorObj";"com::sun::star::util::XIndent";"incrementIndent()" "ScCellCursorObj";"com::sun::star::util::XIndent";"incrementIndent()"
"ScCellCursorObj";"com::sun::star::sheet::XMultipleOperation";"setTableOperation()" "ScCellCursorObj";"com::sun::star::sheet::XMultipleOperation";"setTableOperation()"
"ScCellCursorObj";"com::sun::star::table::XAutoFormattable";"autoFormat()" "ScCellCursorObj";"com::sun::star::table::XAutoFormattable";"autoFormat()"
"ScCellCursorObj";"com::sun::star::sheet::XSheetCellRange";"getSpreadsheet()"
"ScCellCursorObj";"com::sun::star::sheet::XCellRangesQuery";"queryVisibleCells()" "ScCellCursorObj";"com::sun::star::sheet::XCellRangesQuery";"queryVisibleCells()"
"ScCellCursorObj";"com::sun::star::sheet::XCellRangesQuery";"queryEmptyCells()" "ScCellCursorObj";"com::sun::star::sheet::XCellRangesQuery";"queryEmptyCells()"
"ScCellCursorObj";"com::sun::star::sheet::XCellRangesQuery";"queryContentCells()" "ScCellCursorObj";"com::sun::star::sheet::XCellRangesQuery";"queryContentCells()"
......
...@@ -121,7 +121,6 @@ ...@@ -121,7 +121,6 @@
"ScCellRangeObj";"com::sun::star::util::XIndent";"incrementIndent()" "ScCellRangeObj";"com::sun::star::util::XIndent";"incrementIndent()"
"ScCellRangeObj";"com::sun::star::sheet::XMultipleOperation";"setTableOperation()" "ScCellRangeObj";"com::sun::star::sheet::XMultipleOperation";"setTableOperation()"
"ScCellRangeObj";"com::sun::star::table::XAutoFormattable";"autoFormat()" "ScCellRangeObj";"com::sun::star::table::XAutoFormattable";"autoFormat()"
"ScCellRangeObj";"com::sun::star::sheet::XSheetCellRange";"getSpreadsheet()"
"ScCellRangeObj";"com::sun::star::sheet::XCellRangesQuery";"queryVisibleCells()" "ScCellRangeObj";"com::sun::star::sheet::XCellRangesQuery";"queryVisibleCells()"
"ScCellRangeObj";"com::sun::star::sheet::XCellRangesQuery";"queryEmptyCells()" "ScCellRangeObj";"com::sun::star::sheet::XCellRangesQuery";"queryEmptyCells()"
"ScCellRangeObj";"com::sun::star::sheet::XCellRangesQuery";"queryContentCells()" "ScCellRangeObj";"com::sun::star::sheet::XCellRangesQuery";"queryContentCells()"
......
...@@ -133,7 +133,6 @@ ...@@ -133,7 +133,6 @@
"ScTableSheetObj";"com::sun::star::util::XIndent";"incrementIndent()" "ScTableSheetObj";"com::sun::star::util::XIndent";"incrementIndent()"
"ScTableSheetObj";"com::sun::star::sheet::XMultipleOperation";"setTableOperation()" "ScTableSheetObj";"com::sun::star::sheet::XMultipleOperation";"setTableOperation()"
"ScTableSheetObj";"com::sun::star::table::XAutoFormattable";"autoFormat()" "ScTableSheetObj";"com::sun::star::table::XAutoFormattable";"autoFormat()"
"ScTableSheetObj";"com::sun::star::sheet::XSheetCellRange";"getSpreadsheet()"
"ScTableSheetObj";"com::sun::star::sheet::Spreadsheet";"IsVisible" "ScTableSheetObj";"com::sun::star::sheet::Spreadsheet";"IsVisible"
"ScTableSheetObj";"com::sun::star::sheet::Spreadsheet";"PageStyle" "ScTableSheetObj";"com::sun::star::sheet::Spreadsheet";"PageStyle"
"ScTableSheetObj";"com::sun::star::sheet::Spreadsheet";"AutomaticPrintArea#optional" "ScTableSheetObj";"com::sun::star::sheet::Spreadsheet";"AutomaticPrintArea#optional"
......
/*
* 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.XSheetCellRange;
import com.sun.star.sheet.XSpreadsheet;
/**
* Testing <code>com.sun.star.sheet.XSheetCellRange</code>
* interface methods :
* <ul>
* <li><code> getSpreadsheet()</code></li>
* </ul> <p>
* @see com.sun.star.sheet.XSheetCellRange
*/
public class _XSheetCellRange extends MultiMethodTest {
public XSheetCellRange oObj = null;
/**
* Test calls the method and checks returned value. <p>
* Has <b> OK </b> status if returned value isn't null. <p>
*/
public void _getSpreadsheet(){
XSpreadsheet oSheet = oObj.getSpreadsheet();
tRes.tested("getSpreadsheet()", oSheet != null);
}
} // EOC _XSheetCellRange
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <test/calc_unoapi_test.hxx> #include <test/calc_unoapi_test.hxx>
#include <test/sheet/xcellseries.hxx> #include <test/sheet/xcellseries.hxx>
#include <test/sheet/xsheetcellrange.hxx>
#include <test/sheet/xsheetfilterable.hxx> #include <test/sheet/xsheetfilterable.hxx>
#include <test/sheet/xsheetoperation.hxx> #include <test/sheet/xsheetoperation.hxx>
#include <test/sheet/xsubtotalcalculatable.hxx> #include <test/sheet/xsubtotalcalculatable.hxx>
...@@ -24,9 +25,10 @@ using namespace css::uno; ...@@ -24,9 +25,10 @@ using namespace css::uno;
namespace sc_apitest { namespace sc_apitest {
#define NUMBER_OF_TESTS 11 #define NUMBER_OF_TESTS 12
class ScCellCursorObj : public CalcUnoApiTest, public apitest::XCellSeries, class ScCellCursorObj : public CalcUnoApiTest, public apitest::XCellSeries,
public apitest::XSheetCellRange,
public apitest::XSheetFilterable, public apitest::XSheetFilterable,
public apitest::XSheetOperation, public apitest::XSheetOperation,
public apitest::XSubTotalCalculatable, public apitest::XSubTotalCalculatable,
...@@ -51,6 +53,9 @@ public: ...@@ -51,6 +53,9 @@ public:
CPPUNIT_TEST(testFillAuto); CPPUNIT_TEST(testFillAuto);
CPPUNIT_TEST(testFillSeries); CPPUNIT_TEST(testFillSeries);
// XSheetCellRange
CPPUNIT_TEST(testGetSpreadsheet);
// XSheetFilterable // XSheetFilterable
CPPUNIT_TEST(testCreateFilterDescriptor); CPPUNIT_TEST(testCreateFilterDescriptor);
CPPUNIT_TEST(testFilter); CPPUNIT_TEST(testFilter);
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <test/sheet/xcellrangedata.hxx> #include <test/sheet/xcellrangedata.hxx>
#include <test/sheet/xcellrangesquery.hxx> #include <test/sheet/xcellrangesquery.hxx>
#include <test/sheet/xcellseries.hxx> #include <test/sheet/xcellseries.hxx>
#include <test/sheet/xsheetcellrange.hxx>
#include <test/sheet/xsheetfilterable.hxx> #include <test/sheet/xsheetfilterable.hxx>
#include <test/sheet/xsheetoperation.hxx> #include <test/sheet/xsheetoperation.hxx>
#include <test/sheet/xsubtotalcalculatable.hxx> #include <test/sheet/xsubtotalcalculatable.hxx>
...@@ -40,7 +41,7 @@ using namespace css::uno; ...@@ -40,7 +41,7 @@ using namespace css::uno;
namespace sc_apitest { namespace sc_apitest {
#define NUMBER_OF_TESTS 24 #define NUMBER_OF_TESTS 25
class ScCellRangeObj : public CalcUnoApiTest, public apitest::CellProperties, class ScCellRangeObj : public CalcUnoApiTest, public apitest::CellProperties,
public apitest::XCellRangeData, public apitest::XCellRangeData,
...@@ -48,6 +49,7 @@ class ScCellRangeObj : public CalcUnoApiTest, public apitest::CellProperties, ...@@ -48,6 +49,7 @@ class ScCellRangeObj : public CalcUnoApiTest, public apitest::CellProperties,
public apitest::XCellSeries, public apitest::XCellSeries,
public apitest::XReplaceable, public apitest::XReplaceable,
public apitest::XSearchable, public apitest::XSearchable,
public apitest::XSheetCellRange,
public apitest::XSheetFilterable, public apitest::XSheetFilterable,
public apitest::XSheetOperation, public apitest::XSheetOperation,
public apitest::XSubTotalCalculatable, public apitest::XSubTotalCalculatable,
...@@ -83,6 +85,9 @@ public: ...@@ -83,6 +85,9 @@ public:
CPPUNIT_TEST(testFindAll); CPPUNIT_TEST(testFindAll);
CPPUNIT_TEST(testFindFirst); CPPUNIT_TEST(testFindFirst);
// XSheetCellRange
CPPUNIT_TEST(testGetSpreadsheet);
// XReplaceable // XReplaceable
CPPUNIT_TEST(testReplaceAll); CPPUNIT_TEST(testReplaceAll);
CPPUNIT_TEST(testCreateReplaceDescriptor); CPPUNIT_TEST(testCreateReplaceDescriptor);
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <test/calc_unoapi_test.hxx> #include <test/calc_unoapi_test.hxx>
#include <test/sheet/xcellseries.hxx> #include <test/sheet/xcellseries.hxx>
#include <test/sheet/xprintareas.hxx> #include <test/sheet/xprintareas.hxx>
#include <test/sheet/xsheetcellrange.hxx>
#include <test/sheet/xsheetfilterable.hxx> #include <test/sheet/xsheetfilterable.hxx>
#include <test/sheet/xsheetlinkable.hxx> #include <test/sheet/xsheetlinkable.hxx>
#include <test/sheet/xsheetoperation.hxx> #include <test/sheet/xsheetoperation.hxx>
...@@ -29,12 +30,13 @@ using namespace css::uno; ...@@ -29,12 +30,13 @@ using namespace css::uno;
namespace sc_apitest namespace sc_apitest
{ {
#define NUMBER_OF_TESTS 22 #define NUMBER_OF_TESTS 23
class ScTableSheetObj : public CalcUnoApiTest, public apitest::XCellSeries, class ScTableSheetObj : public CalcUnoApiTest, public apitest::XCellSeries,
public apitest::XPrintAreas, public apitest::XPrintAreas,
public apitest::XReplaceable, public apitest::XReplaceable,
public apitest::XSearchable, public apitest::XSearchable,
public apitest::XSheetCellRange,
public apitest::XSheetFilterable, public apitest::XSheetFilterable,
public apitest::XSheetLinkable, public apitest::XSheetLinkable,
public apitest::XSheetOperation, public apitest::XSheetOperation,
...@@ -73,6 +75,9 @@ public: ...@@ -73,6 +75,9 @@ public:
CPPUNIT_TEST(testFindNext); CPPUNIT_TEST(testFindNext);
CPPUNIT_TEST(testFindFirst); CPPUNIT_TEST(testFindFirst);
// XSheetCellRange
CPPUNIT_TEST(testGetSpreadsheet);
// XSheetFilterable // XSheetFilterable
CPPUNIT_TEST(testCreateFilterDescriptor); CPPUNIT_TEST(testCreateFilterDescriptor);
CPPUNIT_TEST(testFilter); CPPUNIT_TEST(testFilter);
......
...@@ -70,6 +70,7 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\ ...@@ -70,6 +70,7 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\
test/source/sheet/xsheetannotation \ test/source/sheet/xsheetannotation \
test/source/sheet/xsheetannotations \ test/source/sheet/xsheetannotations \
test/source/sheet/xsheetannotationshapesupplier \ test/source/sheet/xsheetannotationshapesupplier \
test/source/sheet/xsheetcellrange \
test/source/sheet/xsheetcellranges \ test/source/sheet/xsheetcellranges \
test/source/sheet/xsheetconditionalentries \ test/source/sheet/xsheetconditionalentries \
test/source/sheet/xsheetconditionalentry \ test/source/sheet/xsheetconditionalentry \
......
/* -*- 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/xsheetcellrange.hxx>
#include <com/sun/star/sheet/XSheetCellRange.hpp>
#include <com/sun/star/sheet/XSpreadsheet.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 XSheetCellRange::testGetSpreadsheet()
{
uno::Reference< sheet::XSheetCellRange > xSheetCellRange(init(), UNO_QUERY_THROW);
uno::Reference< sheet::XSpreadsheet > xSheet = xSheetCellRange->getSpreadsheet();
CPPUNIT_ASSERT_MESSAGE("Unable to get spreadsheet", xSheet.is());
}
}
/* 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