Kaydet (Commit) e3e9e0ae authored tarafından Markus Mohrhard's avatar Markus Mohrhard

add test for tdf#88849

Change-Id: Id72d94799e20f0b290d5d5b05fb2b351d0750178
üst 3d9f86e9
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment