diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-04-15 19:14:32 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-04-15 19:17:21 +0200 |
commit | e3e9e0ae125cef1cdce149ce632c21c481be8654 (patch) | |
tree | 8e3fb680ab8e6ddb6fda1d264e7421535c1e7224 /sc | |
parent | 3d9f86e96874b238b4b960b65f1f10a1dc6ef881 (diff) |
add test for tdf#88849
Change-Id: Id72d94799e20f0b290d5d5b05fb2b351d0750178
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/perf/scperfobj.cxx | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sc/qa/perf/scperfobj.cxx b/sc/qa/perf/scperfobj.cxx index decce7fb291f..12202f6e3471 100644 --- a/sc/qa/perf/scperfobj.cxx +++ b/sc/qa/perf/scperfobj.cxx @@ -74,6 +74,7 @@ public: CPPUNIT_TEST(testLoadingFileWithSingleBigSheet); CPPUNIT_TEST(testFixedSum); CPPUNIT_TEST(testVariableSum); + CPPUNIT_TEST(testMatConcat); CPPUNIT_TEST_SUITE_END(); private: @@ -98,6 +99,7 @@ private: void testLoadingFileWithSingleBigSheet(); void testFixedSum(); void testVariableSum(); + void testMatConcat(); }; sal_Int32 ScPerfObj::nTest = 0; @@ -628,6 +630,34 @@ void ScPerfObj::testVariableSum() callgrindDump("sc:sum_with_variable_array_formula"); } +void ScPerfObj::testMatConcat() +{ + uno::Reference< sheet::XSpreadsheetDocument > xDoc(init("empty.ods"), UNO_QUERY_THROW); + + CPPUNIT_ASSERT(xDoc.is()); + uno::Reference< sheet::XCalculatable > xCalculatable(xDoc, UNO_QUERY_THROW); + + // get getSheets + uno::Reference< sheet::XSpreadsheets > xSheets (xDoc->getSheets(), UNO_QUERY_THROW); + + uno::Any rSheet = xSheets->getByName("Sheet1"); + + // query for the XSpreadsheet interface + uno::Reference< sheet::XSpreadsheet > xSheet (rSheet, UNO_QUERY); + + // query for the XCellRange interface + uno::Reference< table::XCellRange > rCellRange(rSheet, UNO_QUERY); + // query the cell range + uno::Reference< table::XCellRange > xCellRange = rCellRange->getCellRangeByName("C1"); + + uno::Reference< sheet::XArrayFormulaRange > xArrayFormulaRange(xCellRange, UNO_QUERY_THROW); + + callgrindStart(); + xArrayFormulaRange->setArrayFormula("=A:A&B:B"); + xCalculatable->calculate(); + callgrindDump("sc:mat_concat"); +} + CPPUNIT_TEST_SUITE_REGISTRATION(ScPerfObj); } |