diff options
author | Jens Carl <j.carl43@gmx.de> | 2017-08-08 09:54:47 +0000 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-08-08 12:36:08 +0200 |
commit | 1f54caef187dc73acda934808cc5d8d91f72b882 (patch) | |
tree | 7680180b1dbdaee6f4652588785cc52b8d359aa1 /sc | |
parent | 40ea896e5c378c36ab41dbbbb06b43b8ec2c231f (diff) |
Fix for failing tests of xcellseries with ScCellRangeObj ...
... (CppunitTest_sc_cellrangeobj) introduced by
commit 27cbca2c8dccbbb299621b49e5ffd836188202f0.
Change-Id: I97be4f70de52abd974bf1198063d28f2ff419dbd
Reviewed-on: https://gerrit.libreoffice.org/40871
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/extras/sccellcursorobj.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sc/qa/extras/sccellcursorobj.cxx b/sc/qa/extras/sccellcursorobj.cxx index 7450034b7705..eefdcb98bd6d 100644 --- a/sc/qa/extras/sccellcursorobj.cxx +++ b/sc/qa/extras/sccellcursorobj.cxx @@ -13,6 +13,7 @@ #include <com/sun/star/sheet/XSpreadsheetDocument.hpp> #include <com/sun/star/sheet/XSpreadsheet.hpp> +#include <com/sun/star/table/XCellCursor.hpp> using namespace css; using namespace css::uno; @@ -29,6 +30,7 @@ public: virtual void setUp() override; virtual void tearDown() override; virtual uno::Reference< uno::XInterface > init() override; + virtual uno::Reference< uno::XInterface > getXSpreadsheet() override; CPPUNIT_TEST_SUITE(ScCellCursorObj); @@ -67,6 +69,22 @@ 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; +} + +uno::Reference< uno::XInterface > ScCellCursorObj::getXSpreadsheet() +{ + OUString aFileURL; + createFileURL("ScCellCursorObj.ods", aFileURL); + if(!mxComponent.is()) + mxComponent = loadFromDesktop(aFileURL, "com.sun.star.sheet.SpreadsheetDocument"); + CPPUNIT_ASSERT(mxComponent.is()); + + 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); return xSheet; } |