summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorJens Carl <j.carl43@gmx.de>2017-10-20 03:27:37 +0000
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-10-29 23:44:53 +0100
commit4200896e36f259a60b3d3288e13ff08d2fda861c (patch)
treeabe74ba72e907caabea1ae840937658823c6db89 /sc
parenta0b7cd137aac7529b328c813b011166a78074cb4 (diff)
tdf#45904: Move Java _XSheetLinkable tests to C++
Change-Id: I0f99c3b4a74748d7f1c73ef584170ae84b08cd9a Reviewed-on: https://gerrit.libreoffice.org/43582 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/extras/sctablesheetobj.cxx47
1 files changed, 30 insertions, 17 deletions
diff --git a/sc/qa/extras/sctablesheetobj.cxx b/sc/qa/extras/sctablesheetobj.cxx
index a3b246055965..277cd54cbddf 100644
--- a/sc/qa/extras/sctablesheetobj.cxx
+++ b/sc/qa/extras/sctablesheetobj.cxx
@@ -10,6 +10,7 @@
#include <test/calc_unoapi_test.hxx>
#include <test/sheet/xcellseries.hxx>
#include <test/sheet/xprintareas.hxx>
+#include <test/sheet/xsheetlinkable.hxx>
#include <test/sheet/xsheetoperation.hxx>
#include <test/sheet/xsheetpagebreak.hxx>
#include <test/sheet/xspreadsheet.hxx>
@@ -27,12 +28,13 @@ using namespace css::uno;
namespace sc_apitest
{
-#define NUMBER_OF_TESTS 19
+#define NUMBER_OF_TESTS 20
class ScTableSheetObj : public CalcUnoApiTest, public apitest::XCellSeries,
public apitest::XPrintAreas,
public apitest::XReplaceable,
public apitest::XSearchable,
+ public apitest::XSheetLinkable,
public apitest::XSheetOperation,
public apitest::XSheetPageBreak,
public apitest::XSpreadsheet,
@@ -45,27 +47,32 @@ public:
virtual void setUp() override;
virtual void tearDown() override;
+ virtual OUString getFileURL() override;
+
virtual uno::Reference< uno::XInterface > init() override;
virtual uno::Reference< uno::XInterface > getXSpreadsheet() override;
CPPUNIT_TEST_SUITE(ScTableSheetObj);
- // XSearchable
- CPPUNIT_TEST(testFindAll);
- CPPUNIT_TEST(testFindNext);
- CPPUNIT_TEST(testFindFirst);
+ // XCellSeries
+ CPPUNIT_TEST(testFillAuto);
+ CPPUNIT_TEST(testFillSeries);
+
+ // XPrintAreas
+ CPPUNIT_TEST(testSetAndGetPrintTitleColumns);
+ CPPUNIT_TEST(testSetAndGetPrintTitleRows);
// XReplaceable
CPPUNIT_TEST(testReplaceAll);
CPPUNIT_TEST(testCreateReplaceDescriptor);
- // XPrintAreas
- CPPUNIT_TEST(testSetAndGetPrintTitleColumns);
- CPPUNIT_TEST(testSetAndGetPrintTitleRows);
+ // XSearchable
+ CPPUNIT_TEST(testFindAll);
+ CPPUNIT_TEST(testFindNext);
+ CPPUNIT_TEST(testFindFirst);
- // XCellSeries
- CPPUNIT_TEST(testFillAuto);
- CPPUNIT_TEST(testFillSeries);
+ // XSheetLinkable
+ CPPUNIT_TEST(testSheetLinkable);
// XSheetOperation
CPPUNIT_TEST(testComputeFunction);
@@ -76,9 +83,6 @@ public:
CPPUNIT_TEST(testGetRowPageBreaks);
CPPUNIT_TEST(testRemoveAllManualPageBreaks);
- // XUniqueCellFormatRangesSupplier
- CPPUNIT_TEST(testGetUniqueCellFormatRanges);
-
// XSpreadsheet
CPPUNIT_TEST(testCreateCursor);
CPPUNIT_TEST(testCreateCursorByRange);
@@ -87,9 +91,13 @@ public:
CPPUNIT_TEST(testCreateSubTotalDescriptor);
CPPUNIT_TEST(testApplyRemoveSubTotals);
+ // XUniqueCellFormatRangesSupplier
+ CPPUNIT_TEST(testGetUniqueCellFormatRanges);
+
CPPUNIT_TEST_SUITE_END();
private:
+ OUString maFileURL;
static sal_Int32 nTest;
static uno::Reference< lang::XComponent > mxComponent;
};
@@ -107,10 +115,10 @@ ScTableSheetObj::ScTableSheetObj():
uno::Reference< uno::XInterface > ScTableSheetObj::init()
{
- OUString aFileURL;
- createFileURL("ScTableSheetObj.ods", aFileURL);
+ //OUString aFileURL;
+ createFileURL("ScTableSheetObj.ods", maFileURL);
if(!mxComponent.is())
- mxComponent = loadFromDesktop(aFileURL, "com.sun.star.sheet.SpreadsheetDocument");
+ mxComponent = loadFromDesktop(maFileURL, "com.sun.star.sheet.SpreadsheetDocument");
CPPUNIT_ASSERT(mxComponent.is());
uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, UNO_QUERY_THROW);
@@ -135,6 +143,11 @@ uno::Reference< uno::XInterface > ScTableSheetObj::getXSpreadsheet()
return xSheet;
}
+OUString ScTableSheetObj::getFileURL()
+{
+ return maFileURL;
+}
+
void ScTableSheetObj::setUp()
{
nTest++;