summaryrefslogtreecommitdiff
path: root/sc/qa/extras/sccellcursorobj.cxx
diff options
context:
space:
mode:
authorJens Carl <j.carl43@gmx.de>2017-08-07 00:23:25 +0000
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-08-08 07:25:33 +0200
commit27cbca2c8dccbbb299621b49e5ffd836188202f0 (patch)
treefd6eec5f648286c0f4463b41891b759013571fc5 /sc/qa/extras/sccellcursorobj.cxx
parent0bd57d62d0f15eced0e99097d9f46a86f177e9a1 (diff)
tdf#45904 Move Java _XUsedAreaCursor tests to C++
Change-Id: I6a288fa333d6805540156f63040468f07967c0c6 Reviewed-on: https://gerrit.libreoffice.org/40817 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc/qa/extras/sccellcursorobj.cxx')
-rw-r--r--sc/qa/extras/sccellcursorobj.cxx16
1 files changed, 11 insertions, 5 deletions
diff --git a/sc/qa/extras/sccellcursorobj.cxx b/sc/qa/extras/sccellcursorobj.cxx
index ade41a77e375..7450034b7705 100644
--- a/sc/qa/extras/sccellcursorobj.cxx
+++ b/sc/qa/extras/sccellcursorobj.cxx
@@ -9,8 +9,8 @@
#include <test/calc_unoapi_test.hxx>
#include <test/sheet/xcellseries.hxx>
+#include <test/sheet/xusedareacursor.hxx>
-#include <com/sun/star/table/XCellCursor.hpp>
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/sheet/XSpreadsheet.hpp>
@@ -19,9 +19,9 @@ using namespace css::uno;
namespace sc_apitest {
-#define NUMBER_OF_TESTS 2
+#define NUMBER_OF_TESTS 4
-class ScCellCursorObj : public CalcUnoApiTest, private apitest::XCellSeries
+class ScCellCursorObj : public CalcUnoApiTest, private apitest::XCellSeries, public apitest::XUsedAreaCursor
{
public:
ScCellCursorObj();
@@ -31,8 +31,15 @@ public:
virtual uno::Reference< uno::XInterface > init() override;
CPPUNIT_TEST_SUITE(ScCellCursorObj);
+
+ // XUsedAreaCursor
+ CPPUNIT_TEST(testGotoStartOfUsedArea);
+ CPPUNIT_TEST(testGotoEndOfUsedArea);
+
+ // XCellSeries
CPPUNIT_TEST(testFillAuto);
CPPUNIT_TEST(testFillSeries);
+
CPPUNIT_TEST_SUITE_END();
private:
@@ -60,9 +67,8 @@ uno::Reference< uno::XInterface > ScCellCursorObj::init()
uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, UNO_QUERY_THROW);
uno::Reference< container::XIndexAccess > xIndex (xDoc->getSheets(), UNO_QUERY_THROW);
uno::Reference< sheet::XSpreadsheet > xSheet( xIndex->getByIndex(0), UNO_QUERY_THROW);
- uno::Reference< table::XCellCursor > xCellCursor( xSheet->createCursor(), UNO_QUERY_THROW);
- return xCellCursor;
+ return xSheet;
}
void ScCellCursorObj::setUp()