tdf#45904 Move _XSheetAnnotationsSupplier Java test to C++
Change-Id: I18143d96f49ea4f4b80ae89df33d2963bb20e125 Reviewed-on: https://gerrit.libreoffice.org/44747 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
/* -*- 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_XSHEETANNOTATIONSSUPPLIER_HXX
|
||||
#define INCLUDED_TEST_SHEET_XSHEETANNOTATIONSSUPPLIER_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 XSheetAnnotationsSupplier
|
||||
{
|
||||
public:
|
||||
virtual css::uno::Reference<css::uno::XInterface> init() = 0;
|
||||
|
||||
void testGetAnnotations();
|
||||
|
||||
protected:
|
||||
~XSheetAnnotationsSupplier() {}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // INCLUDED_TEST_SHEET_XSHEETANNOTATIONSSUPPLIER_HXX
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
||||
@@ -612,7 +612,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
|
||||
qadevOOo/tests/java/ifc/sheet/_XScenarioEnhanced \
|
||||
qadevOOo/tests/java/ifc/sheet/_XScenariosSupplier \
|
||||
qadevOOo/tests/java/ifc/sheet/_XSheetAnnotationAnchor \
|
||||
qadevOOo/tests/java/ifc/sheet/_XSheetAnnotationsSupplier \
|
||||
qadevOOo/tests/java/ifc/sheet/_XSheetAuditing \
|
||||
qadevOOo/tests/java/ifc/sheet/_XSheetCellCursor \
|
||||
qadevOOo/tests/java/ifc/sheet/_XSpreadsheetView \
|
||||
|
||||
@@ -135,7 +135,6 @@
|
||||
"ScTableSheetObj";"com::sun::star::sheet::Spreadsheet";"IsVisible"
|
||||
"ScTableSheetObj";"com::sun::star::sheet::Spreadsheet";"PageStyle"
|
||||
"ScTableSheetObj";"com::sun::star::sheet::Spreadsheet";"AutomaticPrintArea#optional"
|
||||
"ScTableSheetObj";"com::sun::star::sheet::XSheetAnnotationsSupplier";"getAnnotations()"
|
||||
"ScTableSheetObj";"com::sun::star::table::XTableChartsSupplier";"getCharts()"
|
||||
"ScTableSheetObj";"com::sun::star::sheet::XCellRangesQuery";"queryVisibleCells()"
|
||||
"ScTableSheetObj";"com::sun::star::sheet::XCellRangesQuery";"queryEmptyCells()"
|
||||
|
||||
|
@@ -1,49 +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.sheet;
|
||||
|
||||
import lib.MultiMethodTest;
|
||||
|
||||
import com.sun.star.sheet.XSheetAnnotations;
|
||||
import com.sun.star.sheet.XSheetAnnotationsSupplier;
|
||||
|
||||
/**
|
||||
* Testing <code>com.sun.star.sheet.XSheetAnnotationsSupplier</code>
|
||||
* interface methods :
|
||||
* <ul>
|
||||
* <li><code> getAnnotations()</code></li>
|
||||
* </ul> <p>
|
||||
* @see com.sun.star.sheet.XSheetAnnotationsSupplier
|
||||
*/
|
||||
public class _XSheetAnnotationsSupplier extends MultiMethodTest {
|
||||
|
||||
public XSheetAnnotationsSupplier 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 _getAnnotations(){
|
||||
log.println("testing getAnnotations");
|
||||
XSheetAnnotations oSheetAnno = oObj.getAnnotations();
|
||||
tRes.tested("getAnnotations()", oSheetAnno != null );
|
||||
}
|
||||
|
||||
} // EOC _XSheetAnnotationsSupplier
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <test/calc_unoapi_test.hxx>
|
||||
#include <test/sheet/xcellseries.hxx>
|
||||
#include <test/sheet/xprintareas.hxx>
|
||||
#include <test/sheet/xsheetannotationssupplier.hxx>
|
||||
#include <test/sheet/xsheetcellrange.hxx>
|
||||
#include <test/sheet/xsheetfilterable.hxx>
|
||||
#include <test/sheet/xsheetfilterableex.hxx>
|
||||
@@ -31,12 +32,13 @@ using namespace css::uno;
|
||||
namespace sc_apitest
|
||||
{
|
||||
|
||||
#define NUMBER_OF_TESTS 23
|
||||
#define NUMBER_OF_TESTS 24
|
||||
|
||||
class ScTableSheetObj : public CalcUnoApiTest, public apitest::XCellSeries,
|
||||
public apitest::XPrintAreas,
|
||||
public apitest::XReplaceable,
|
||||
public apitest::XSearchable,
|
||||
public apitest::XSheetAnnotationsSupplier,
|
||||
public apitest::XSheetCellRange,
|
||||
public apitest::XSheetFilterable,
|
||||
public apitest::XSheetFilterableEx,
|
||||
@@ -72,6 +74,9 @@ public:
|
||||
CPPUNIT_TEST(testReplaceAll);
|
||||
CPPUNIT_TEST(testCreateReplaceDescriptor);
|
||||
|
||||
// XSheetAnnotationsSupplier
|
||||
CPPUNIT_TEST(testGetAnnotations);
|
||||
|
||||
// XSearchable
|
||||
CPPUNIT_TEST(testFindAll);
|
||||
CPPUNIT_TEST(testFindNext);
|
||||
|
||||
@@ -72,6 +72,7 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\
|
||||
test/source/sheet/xspreadsheets2 \
|
||||
test/source/sheet/xsheetannotation \
|
||||
test/source/sheet/xsheetannotations \
|
||||
test/source/sheet/xsheetannotationssupplier \
|
||||
test/source/sheet/xsheetannotationshapesupplier \
|
||||
test/source/sheet/xsheetcellrangecontainer \
|
||||
test/source/sheet/xsheetcellrange \
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/* -*- 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/xsheetannotationssupplier.hxx>
|
||||
|
||||
#include <com/sun/star/sheet/XSheetAnnotations.hpp>
|
||||
#include <com/sun/star/sheet/XSheetAnnotationsSupplier.hpp>
|
||||
#include <com/sun/star/uno/Reference.hxx>
|
||||
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
|
||||
using namespace css;
|
||||
using namespace css::uno;
|
||||
|
||||
namespace apitest
|
||||
{
|
||||
void XSheetAnnotationsSupplier::testGetAnnotations()
|
||||
{
|
||||
uno::Reference<sheet::XSheetAnnotationsSupplier> xSupplier(init(), UNO_QUERY_THROW);
|
||||
|
||||
uno::Reference<sheet::XSheetAnnotations> xAnnotations(xSupplier->getAnnotations(),
|
||||
UNO_QUERY_THROW);
|
||||
CPPUNIT_ASSERT_MESSAGE("Unable to get XSheetAnnotations", xAnnotations.is());
|
||||
}
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
||||
Reference in New Issue
Block a user