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

tdf#45904 Move _SheetCell Java tests to C++

Change-Id: I5d698303a901ee103fdd4ffdea34809142afa0e5
Reviewed-on: https://gerrit.libreoffice.org/48463Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJens Carl <j.carl43@gmx.de>
üst 36686e2a
......@@ -12,6 +12,8 @@
#include <rtl/ustring.hxx>
#include <com/sun/star/awt/Point.hpp>
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/table/CellAddress.hpp>
#include <com/sun/star/table/CellRangeAddress.hpp>
......@@ -19,6 +21,40 @@
CPPUNIT_NS_BEGIN
/** @brief Trait used by CPPUNIT_ASSERT* macros to compare com::sun::star:awt::Point.
*
* This specialization from @c struct @c assertion_traits<> helps to compare
* @see com::sun::star::awt::Point.
*/
template <> struct assertion_traits<css::awt::Point>
{
static bool equal(const css::awt::Point& x, const css::awt::Point& y) { return x == y; }
static std::string toString(const css::awt::Point& x)
{
OStringStream ost;
ost << "Point: " << x.X << "." << x.Y << " (coordinate: X.Y)";
return ost.str();
}
};
/** @brief Trait used by CPPUNIT_ASSERT* macros to compare com::sun::star:awt::Size.
*
* This specialization from @c struct @c assertion_traits<> helps to compare
* @see com::sun::star::awt::Size.
*/
template <> struct assertion_traits<css::awt::Size>
{
static bool equal(const css::awt::Size& x, const css::awt::Size& y) { return x == y; }
static std::string toString(const css::awt::Size& x)
{
OStringStream ost;
ost << "Size: " << x.Width << " x " << x.Height << " (Width x Height)";
return ost.str();
}
};
/** @brief Trait used by CPPUNIT_ASSERT* macros to compare com::sun::star::table::CellAddress.
*
* This specialization from @c struct @c assertion_traits<> helps to compare
......
/* -*- 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_SHEETCELL_HXX
#define INCLUDED_TEST_SHEET_SHEETCELL_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 SheetCell
{
public:
virtual css::uno::Reference<css::uno::XInterface> init() = 0;
void testSheetCellProperties();
protected:
~SheetCell() {}
};
}
#endif // INCLUDED_TEST_SHEET_SHEETCELL_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
......@@ -565,7 +565,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
qadevOOo/tests/java/ifc/sdb/_XSQLErrorBroadcaster \
qadevOOo/tests/java/ifc/sheet/_FunctionDescription \
qadevOOo/tests/java/ifc/sheet/_Shape \
qadevOOo/tests/java/ifc/sheet/_SheetCell \
qadevOOo/tests/java/ifc/sheet/_SheetCellRange \
qadevOOo/tests/java/ifc/sheet/_SheetCellRanges \
qadevOOo/tests/java/ifc/sheet/_SheetFilterDescriptor \
......
......@@ -139,14 +139,6 @@
"ScCellObj";"com::sun::star::text::XTextRange";"getEnd()"
"ScCellObj";"com::sun::star::text::XTextRange";"getString()"
"ScCellObj";"com::sun::star::text::XTextRange";"setString()"
"ScCellObj";"com::sun::star::sheet::SheetCell";"Position"
"ScCellObj";"com::sun::star::sheet::SheetCell";"Size"
"ScCellObj";"com::sun::star::sheet::SheetCell";"FormulaLocal#optional"
"ScCellObj";"com::sun::star::sheet::SheetCell";"FormulaResultType"
"ScCellObj";"com::sun::star::sheet::SheetCell";"ConditionalFormat"
"ScCellObj";"com::sun::star::sheet::SheetCell";"ConditionalFormatLocal#optional"
"ScCellObj";"com::sun::star::sheet::SheetCell";"Validation"
"ScCellObj";"com::sun::star::sheet::SheetCell";"ValidationLocal#optional"
"ScCellObj";"com::sun::star::beans::XTolerantMultiPropertySet#optional";"setPropertyValuesTolerant()"
"ScCellObj";"com::sun::star::beans::XTolerantMultiPropertySet#optional";"getPropertyValuesTolerant()"
"ScCellObj";"com::sun::star::beans::XTolerantMultiPropertySet#optional";"getDirectPropertyValuesTolerant()"
......
/*
* 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.MultiPropertyTest;
public class _SheetCell extends MultiPropertyTest {
}
......@@ -8,6 +8,7 @@
*/
#include <test/calc_unoapi_test.hxx>
#include <test/sheet/sheetcell.hxx>
#include <test/sheet/xcelladdressable.hxx>
#include <test/sheet/xsheetannotationanchor.hxx>
......@@ -26,9 +27,10 @@ using namespace css::uno;
namespace sc_apitest {
#define NUMBER_OF_TESTS 2
#define NUMBER_OF_TESTS 3
class ScCellObj : public CalcUnoApiTest, public apitest::XCellAddressable,
class ScCellObj : public CalcUnoApiTest, public apitest::SheetCell,
public apitest::XCellAddressable,
public apitest::XSheetAnnotationAnchor
{
public:
......@@ -40,6 +42,9 @@ public:
CPPUNIT_TEST_SUITE(ScCellObj);
// SheetCell
CPPUNIT_TEST(testSheetCellProperties);
// XCellAddressable
CPPUNIT_TEST(testGetCellAddress);
......
......@@ -53,6 +53,7 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\
test/source/sheet/scenario \
test/source/sheet/spreadsheetviewsettings \
test/source/sheet/subtotaldescriptor \
test/source/sheet/sheetcell \
test/source/sheet/tableautoformat \
test/source/sheet/tablevalidation \
test/source/sheet/xarealink \
......
This diff is collapsed.
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