summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Carl <j.carl43@gmx.de>2017-11-15 05:09:23 +0000
committerJens Carl <j.carl43@gmx.de>2017-11-15 08:37:27 +0100
commit1dde2e441451ba6e7d760b1e1544440113993c24 (patch)
tree3e4b49b9f4fa0dccc2b7241945e3c407eecc38aa
parent3588a48a82d37f940595570758bc1d1179d18b84 (diff)
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>
-rw-r--r--include/test/sheet/xsheetannotationssupplier.hxx34
-rw-r--r--qadevOOo/Jar_OOoRunner.mk1
-rw-r--r--qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv1
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_XSheetAnnotationsSupplier.java49
-rw-r--r--sc/qa/extras/sctablesheetobj.cxx7
-rw-r--r--test/Library_subsequenttest.mk1
-rw-r--r--test/source/sheet/xsheetannotationssupplier.cxx33
7 files changed, 74 insertions, 52 deletions
diff --git a/include/test/sheet/xsheetannotationssupplier.hxx b/include/test/sheet/xsheetannotationssupplier.hxx
new file mode 100644
index 000000000000..cc9e008ec6ae
--- /dev/null
+++ b/include/test/sheet/xsheetannotationssupplier.hxx
@@ -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: */
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index 24db4d9f20a8..f239a22e9cfd 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -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 \
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 4fbb1a5f92da..d43bdf798988 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv
@@ -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()"
diff --git a/qadevOOo/tests/java/ifc/sheet/_XSheetAnnotationsSupplier.java b/qadevOOo/tests/java/ifc/sheet/_XSheetAnnotationsSupplier.java
deleted file mode 100644
index 389ae138b6e3..000000000000
--- a/qadevOOo/tests/java/ifc/sheet/_XSheetAnnotationsSupplier.java
+++ /dev/null
@@ -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
-
diff --git a/sc/qa/extras/sctablesheetobj.cxx b/sc/qa/extras/sctablesheetobj.cxx
index 11c49feca4e2..64decbb96675 100644
--- a/sc/qa/extras/sctablesheetobj.cxx
+++ b/sc/qa/extras/sctablesheetobj.cxx
@@ -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);
diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk
index a4efd36e46e9..dbdac2a4ca06 100644
--- a/test/Library_subsequenttest.mk
+++ b/test/Library_subsequenttest.mk
@@ -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 \
diff --git a/test/source/sheet/xsheetannotationssupplier.cxx b/test/source/sheet/xsheetannotationssupplier.cxx
new file mode 100644
index 000000000000..82e4bb41e6c9
--- /dev/null
+++ b/test/source/sheet/xsheetannotationssupplier.cxx
@@ -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: */