summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJens Carl <j.carl43@gmx.de>2017-10-12 08:31:48 +0000
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-10-29 22:09:38 +0100
commit410515366c466c1f8b0a81d47f8263d278af3a18 (patch)
treec5697909b4e5000450c6518021dd30a116c410aa /test
parent80003831041fcd718d2dddc9b6409ff50b48facf (diff)
tdf#45904 Move Java _XSpreadsheet tests to C++
Change-Id: Idb398c87c89aa9b5613b9952bffde5929c1bc76b Reviewed-on: https://gerrit.libreoffice.org/43398 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'test')
-rw-r--r--test/Library_subsequenttest.mk1
-rw-r--r--test/source/sheet/xspreadsheet.cxx44
2 files changed, 45 insertions, 0 deletions
diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk
index b9378036942c..9c1e8524b27b 100644
--- a/test/Library_subsequenttest.mk
+++ b/test/Library_subsequenttest.mk
@@ -64,6 +64,7 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\
test/source/sheet/xnamedranges \
test/source/sheet/xprintareas \
test/source/sheet/xspreadsheetdocument \
+ test/source/sheet/xspreadsheet \
test/source/sheet/xspreadsheets \
test/source/sheet/xspreadsheets2 \
test/source/sheet/xsheetannotation \
diff --git a/test/source/sheet/xspreadsheet.cxx b/test/source/sheet/xspreadsheet.cxx
new file mode 100644
index 000000000000..2b6d0a0fec27
--- /dev/null
+++ b/test/source/sheet/xspreadsheet.cxx
@@ -0,0 +1,44 @@
+/* -*- 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/.
+ */
+
+#include <test/sheet/xspreadsheet.hxx>
+
+#include <com/sun/star/sheet/XSheetCellCursor.hpp>
+#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 XSpreadsheet::testCreateCursor()
+{
+ uno::Reference< sheet::XSpreadsheet > xSheet(init(), UNO_QUERY_THROW);
+
+ uno::Reference< sheet::XSheetCellCursor > xCursor(xSheet->createCursor(), UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_MESSAGE("Unable to create XSheetCellCursor", xCursor.is());
+}
+
+void XSpreadsheet::testCreateCursorByRange()
+{
+ uno::Reference< sheet::XSpreadsheet > xSheet(init(), UNO_QUERY_THROW);
+
+ uno::Reference< sheet::XSheetCellRange > xCellRange(xSheet->getCellRangeByPosition(1, 1, 2, 3), UNO_QUERY_THROW);
+ uno::Reference< sheet::XSheetCellCursor > xCursor(xSheet->createCursorByRange(xCellRange), UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_MESSAGE("Unable to create XSheetCellCursor", xCursor.is());
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */