sc: add an ODS round-trip test for the # spilled-range operator
The # operator uses the native # symbol in ODFF, so it needs no special handling to survive an ODS save and reload. Cover it the same way as the XLSX round-trip: load the fixture, check the formulas, save and reload as ODS, and check again. Change-Id: I900c418fb57b79a8e0434bdc2b4b8b9e88f5b05d Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/6265 Tested-by: Jenkins CPCI <releng@collaboraoffice.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 5a5d2aa0cd4ca72be0288855889ae75562d6e34a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207909 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
This commit is contained in:
committed by
Xisco Fauli
parent
0d303ccfd2
commit
39d10139e0
@@ -227,6 +227,24 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest5, testSpillOperatorXlsxRoundTrip)
|
||||
checkSpillFormulas();
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(ScFiltersTest5, testSpillOperatorOdsRoundTrip)
|
||||
{
|
||||
// The # spilled-range operator survives an ODS round-trip too, on
|
||||
// its own and inside other functions.
|
||||
createScDoc("xlsx/SimpleSpillOperatorFixture.xlsx");
|
||||
|
||||
auto checkSpillFormulas = [this]() {
|
||||
ScDocument* pDocument = getScDoc();
|
||||
CPPUNIT_ASSERT_EQUAL(u"=B2#"_ustr, pDocument->GetFormula(2, 1, 0));
|
||||
CPPUNIT_ASSERT_EQUAL(u"=UNIQUE(B2#)"_ustr, pDocument->GetFormula(3, 1, 0));
|
||||
CPPUNIT_ASSERT_EQUAL(u"=SUM(B2#)"_ustr, pDocument->GetFormula(4, 1, 0));
|
||||
};
|
||||
|
||||
checkSpillFormulas();
|
||||
saveAndReload(TestFilter::ODS);
|
||||
checkSpillFormulas();
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(ScFiltersTest5, testDynamicSpillStateExportFODS)
|
||||
{
|
||||
// A dynamic-array master in spill state collapses to 1x1. FODS
|
||||
|
||||
Reference in New Issue
Block a user