summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorJens Carl <j.carl43@gmx.de>2017-11-24 23:20:55 +0000
committerJens Carl <j.carl43@gmx.de>2018-04-18 17:53:02 +0200
commit6bf05f004b19b1cc2045556b8dd48ddb2ec3c359 (patch)
treeb5d15a0f800db3f6b85c68e1f9342607ef41ae8f /sc
parent0cd7be1897b7b0badbb47048980333b9c1bc4899 (diff)
tdf#45904 Move _XScenario Java tests to C++
Change-Id: Ic12eebe62de5132dce26ec46c62501f90200b909 Reviewed-on: https://gerrit.libreoffice.org/52180 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/extras/sctablesheetobj.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/sc/qa/extras/sctablesheetobj.cxx b/sc/qa/extras/sctablesheetobj.cxx
index eed8cbd3440e..2194a710da55 100644
--- a/sc/qa/extras/sctablesheetobj.cxx
+++ b/sc/qa/extras/sctablesheetobj.cxx
@@ -20,6 +20,7 @@
#include <test/sheet/xdatapilottablessupplier.hxx>
#include <test/sheet/xmultipleoperation.hxx>
#include <test/sheet/xprintareas.hxx>
+#include <test/sheet/xscenario.hxx>
#include <test/sheet/xscenarioenhanced.hxx>
#include <test/sheet/xscenariossupplier.hxx>
#include <test/sheet/xsheetannotationssupplier.hxx>
@@ -60,6 +61,7 @@ class ScTableSheetObj : public CalcUnoApiTest, public apitest::Scenario,
public apitest::XMultipleOperation,
public apitest::XPrintAreas,
public apitest::XReplaceable,
+ public apitest::XScenario,
public apitest::XScenarioEnhanced,
public apitest::XScenariosSupplier,
public apitest::XSearchable,
@@ -146,6 +148,10 @@ public:
CPPUNIT_TEST(testReplaceAll);
CPPUNIT_TEST(testCreateReplaceDescriptor);
+ // XScenario
+ // test was disabled in qadevOOo/tests/java/ifc/sheet/_XScenario.java
+ CPPUNIT_TEST(testScenario);
+
// XScenarioEnhanced
CPPUNIT_TEST(testGetRanges);
@@ -218,8 +224,8 @@ uno::Reference< uno::XInterface > ScTableSheetObj::init()
CPPUNIT_ASSERT_MESSAGE("no calc document", xDoc.is());
uno::Reference<sheet::XSpreadsheets> xSheets(xDoc->getSheets(), 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<container::XIndexAccess> xIndex (xDoc->getSheets(), UNO_QUERY_THROW);
+ uno::Reference<sheet::XSpreadsheet> xSheet(xIndex->getByIndex(0), UNO_QUERY_THROW);
xSheet->getCellByPosition(5 ,5)->setValue(15);
xSheet->getCellByPosition(2 ,0)->setValue(-5.15);
@@ -232,6 +238,7 @@ uno::Reference< uno::XInterface > ScTableSheetObj::init()
uno::Sequence<table::CellRangeAddress> aCellRangeAddr(1);
aCellRangeAddr[0] = table::CellRangeAddress(0, 0, 0, 10, 10);
+
uno::Reference<sheet::XScenariosSupplier> xScence(xSheet, UNO_QUERY_THROW);
xScence->getScenarios()->addNewByName("Scenario", aCellRangeAddr, "Comment");
xSheets->getByName("Scenario");