summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorJens Carl <j.carl43@gmx.de>2017-11-23 01:50:39 +0000
committerJens Carl <j.carl43@gmx.de>2017-11-23 08:41:48 +0100
commit39c5ade7bbb444eb204015955276748a5b381ad9 (patch)
treeda623126068a4db9e2309685cf4f7ca68ee95c13 /sc
parent0e2f224d07a0e7f542984d9e9f48c9cda86a80f6 (diff)
tdf#45904 Move _XSheetAuditing Java tests to C++
Change-Id: I057447494ff488546d43d2d3068a65d5c0d402e0 Reviewed-on: https://gerrit.libreoffice.org/45120 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.cxx20
1 files changed, 17 insertions, 3 deletions
diff --git a/sc/qa/extras/sctablesheetobj.cxx b/sc/qa/extras/sctablesheetobj.cxx
index 2217b70b4cd8..27fb9a297fb4 100644
--- a/sc/qa/extras/sctablesheetobj.cxx
+++ b/sc/qa/extras/sctablesheetobj.cxx
@@ -12,6 +12,7 @@
#include <test/sheet/xprintareas.hxx>
#include <test/sheet/xscenariossupplier.hxx>
#include <test/sheet/xsheetannotationssupplier.hxx>
+#include <test/sheet/xsheetauditing.hxx>
#include <test/sheet/xsheetcellrange.hxx>
#include <test/sheet/xsheetfilterable.hxx>
#include <test/sheet/xsheetfilterableex.hxx>
@@ -33,7 +34,7 @@ using namespace css::uno;
namespace sc_apitest
{
-#define NUMBER_OF_TESTS 25
+#define NUMBER_OF_TESTS 30
class ScTableSheetObj : public CalcUnoApiTest, public apitest::XCellSeries,
public apitest::XPrintAreas,
@@ -41,6 +42,7 @@ class ScTableSheetObj : public CalcUnoApiTest, public apitest::XCellSeries,
public apitest::XScenariosSupplier,
public apitest::XSearchable,
public apitest::XSheetAnnotationsSupplier,
+ public apitest::XSheetAuditing,
public apitest::XSheetCellRange,
public apitest::XSheetFilterable,
public apitest::XSheetFilterableEx,
@@ -87,6 +89,13 @@ public:
// XSheetAnnotationsSupplier
CPPUNIT_TEST(testGetAnnotations);
+ // XSheetAuditing
+ CPPUNIT_TEST(testShowHideDependents);
+ CPPUNIT_TEST(testShowHidePrecedents);
+ CPPUNIT_TEST(testClearArrows);
+ CPPUNIT_TEST(testShowErrors);
+ CPPUNIT_TEST(testShowInvalid);
+
// XSheetCellRange
CPPUNIT_TEST(testGetSpreadsheet);
@@ -146,12 +155,17 @@ uno::Reference< uno::XInterface > ScTableSheetObj::init()
createFileURL("ScTableSheetObj.ods", maFileURL);
if (!mxComponent.is())
mxComponent = loadFromDesktop(maFileURL, "com.sun.star.sheet.SpreadsheetDocument");
- CPPUNIT_ASSERT(mxComponent.is());
+ CPPUNIT_ASSERT_MESSAGE("no calc document", 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);
+ xSheet->getCellByPosition(6, 6)->setValue(3);
+ xSheet->getCellByPosition(7, 6)->setValue(3);
+ xSheet->getCellByPosition(8, 6)->setFormula("= SUM(G7:H7)");
+ xSheet->getCellByPosition(9, 6)->setFormula("= G7*I7");
+
return xSheet;
}
@@ -160,7 +174,7 @@ uno::Reference< uno::XInterface > ScTableSheetObj::getXSpreadsheet()
createFileURL("ScTableSheetObj.ods", maFileURL);
if (!mxComponent.is())
mxComponent = loadFromDesktop(maFileURL, "com.sun.star.sheet.SpreadsheetDocument");
- CPPUNIT_ASSERT(mxComponent.is());
+ CPPUNIT_ASSERT_MESSAGE("no calc document", mxComponent.is());
uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, UNO_QUERY_THROW);
uno::Reference< container::XIndexAccess > xIndex (xDoc->getSheets(), UNO_QUERY_THROW);