diff options
author | Rahul Gurung <gurungrahul2@gmail.com> | 2018-10-08 20:39:08 +0530 |
---|---|---|
committer | Jens Carl <j.carl43@gmx.de> | 2018-10-16 20:00:13 +0200 |
commit | 189d8ade3ca69c4eb313bdfc25182dc81b5d06e8 (patch) | |
tree | 1405771b8a81a4a47025470bf5136508deaee047 | |
parent | 872f363a5926c76ed8b21dc209352cebfe955764 (diff) |
tdf#45904 Move _XTableChartsSupplier Java Tests to C++
Change-Id: I4cd0b25cefce60e8253df65d5136d15d690dbc38
Reviewed-on: https://gerrit.libreoffice.org/61540
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
-rw-r--r-- | include/test/table/xtablechartssupplier.hxx | 34 | ||||
-rw-r--r-- | qadevOOo/Jar_OOoRunner.mk | 1 | ||||
-rw-r--r-- | qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv | 1 | ||||
-rw-r--r-- | qadevOOo/tests/java/ifc/table/_XTableChartsSupplier.java | 51 | ||||
-rw-r--r-- | sc/qa/extras/sctablesheetobj.cxx | 5 | ||||
-rw-r--r-- | test/Library_subsequenttest.mk | 1 | ||||
-rw-r--r-- | test/source/table/xtablechartssupplier.cxx | 31 |
7 files changed, 71 insertions, 53 deletions
diff --git a/include/test/table/xtablechartssupplier.hxx b/include/test/table/xtablechartssupplier.hxx new file mode 100644 index 000000000000..9e5d45dd0d2d --- /dev/null +++ b/include/test/table/xtablechartssupplier.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_TABLE_XTABLECHARTSSUPPLIER_HXX +#define INCLUDED_TEST_TABLE_XTABLECHARTSSUPPLIER_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 XTableChartsSupplier +{ +public: + virtual css::uno::Reference<css::uno::XInterface> init() = 0; + + void testGetCharts(); + +protected: + ~XTableChartsSupplier() {} +}; +} + +#endif // INCLUDED_TEST_TABLE_XTABLECHARTSSUPPLIER_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 f7f56ae29046..afa06001eeab 100644 --- a/qadevOOo/Jar_OOoRunner.mk +++ b/qadevOOo/Jar_OOoRunner.mk @@ -590,7 +590,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\ qadevOOo/tests/java/ifc/table/_XCellRange \ qadevOOo/tests/java/ifc/table/_XTableChart \ qadevOOo/tests/java/ifc/table/_XTableCharts \ - qadevOOo/tests/java/ifc/table/_XTableChartsSupplier \ qadevOOo/tests/java/ifc/table/_XTableColumns \ qadevOOo/tests/java/ifc/table/_XTableRows \ qadevOOo/tests/java/ifc/task/_XInteractionHandler \ 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 5ee16311af93..2ea4a60681cd 100644 --- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv +++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv @@ -109,7 +109,6 @@ "ScTableSheetObj";"com::sun::star::util::XProtectable";"unprotect()" "ScTableSheetObj";"com::sun::star::util::XProtectable";"isProtected()" "ScTableSheetObj";"com::sun::star::table::XAutoFormattable";"autoFormat()" -"ScTableSheetObj";"com::sun::star::table::XTableChartsSupplier";"getCharts()" "ScTableSheetObj";"com::sun::star::sheet::XCellRangesQuery";"queryVisibleCells()" "ScTableSheetObj";"com::sun::star::sheet::XCellRangesQuery";"queryEmptyCells()" "ScTableSheetObj";"com::sun::star::sheet::XCellRangesQuery";"queryContentCells()" diff --git a/qadevOOo/tests/java/ifc/table/_XTableChartsSupplier.java b/qadevOOo/tests/java/ifc/table/_XTableChartsSupplier.java deleted file mode 100644 index 0c170d4f40d9..000000000000 --- a/qadevOOo/tests/java/ifc/table/_XTableChartsSupplier.java +++ /dev/null @@ -1,51 +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.table; - -import lib.MultiMethodTest; - -import com.sun.star.table.XTableChartsSupplier; - -/** -* Testing <code>com.sun.star.table.XTableChartsSupplier</code> -* interface methods : -* <ul> -* <li><code> getCharts()</code></li> -* </ul> <p> -* @see com.sun.star.table.XTableChartsSupplier -*/ -public class _XTableChartsSupplier extends MultiMethodTest { - - public XTableChartsSupplier oObj = null; - - /** - * Test calls the method. <p> - * Has <b> OK </b> status if the method returns not - * <code>null</code> value. - */ - public void _getCharts() { - - tRes.tested( "getCharts()", oObj.getCharts()!=null ); - - } // getCharts() - -} // finish class _XTableChartsSupplier - - - diff --git a/sc/qa/extras/sctablesheetobj.cxx b/sc/qa/extras/sctablesheetobj.cxx index 5b3114d620b3..efb919405d33 100644 --- a/sc/qa/extras/sctablesheetobj.cxx +++ b/sc/qa/extras/sctablesheetobj.cxx @@ -37,6 +37,7 @@ #include <test/sheet/xsubtotalcalculatable.hxx> #include <test/sheet/xuniquecellformatrangessupplier.hxx> #include <test/table/xcolumnrowrange.hxx> +#include <test/table/xtablechartssupplier.hxx> #include <test/util/xindent.hxx> #include <test/util/xmergeable.hxx> #include <test/util/xreplaceable.hxx> @@ -85,6 +86,7 @@ class ScTableSheetObj : public CalcUnoApiTest, public apitest::Scenario, public apitest::XSheetPageBreak, public apitest::XSpreadsheet, public apitest::XSubTotalCalculatable, + public apitest::XTableChartsSupplier, public apitest::XUniqueCellFormatRangesSupplier { public: @@ -230,6 +232,9 @@ public: CPPUNIT_TEST(testCreateSubTotalDescriptor); CPPUNIT_TEST(testApplyRemoveSubTotals); + // XTableChartsSupplier + CPPUNIT_TEST(testGetCharts); + // XUniqueCellFormatRangesSupplier CPPUNIT_TEST(testGetUniqueCellFormatRanges); diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk index 7903bc49f2ae..7b588abbb667 100644 --- a/test/Library_subsequenttest.mk +++ b/test/Library_subsequenttest.mk @@ -150,6 +150,7 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\ test/source/table/xcell \ test/source/table/xcellcursor \ test/source/table/xcolumnrowrange \ + test/source/table/xtablechartssupplier \ test/source/text/xtext \ test/source/text/xtextfield \ test/source/text/xtextcontent \ diff --git a/test/source/table/xtablechartssupplier.cxx b/test/source/table/xtablechartssupplier.cxx new file mode 100644 index 000000000000..c141d8f87d70 --- /dev/null +++ b/test/source/table/xtablechartssupplier.cxx @@ -0,0 +1,31 @@ +/* -*- 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/table/xtablechartssupplier.hxx> + +#include <com/sun/star/table/XTableChartsSupplier.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 XTableChartsSupplier::testGetCharts() +{ + uno::Reference<table::XTableChartsSupplier> xTableChartsSupplier(init(), UNO_QUERY_THROW); + + CPPUNIT_ASSERT_MESSAGE("Successfully able to Get Charts", xTableChartsSupplier->getCharts()); +} +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |