From c4077e840ba8983076ef77927b7b47ddb88e44aa Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Thu, 3 Mar 2022 17:45:52 +0100 Subject: provide MAXCOL/MAXROW also as strings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Primarily for use in tests. Change-Id: Icb962cbdfa63a3b50115314e9afd46f3fa1a928a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130939 Tested-by: Jenkins Reviewed-by: Luboš Luňák --- sc/qa/unit/ucalc_formula.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'sc/qa') diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index 748d3249fd31..e2264167a5b1 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -2508,9 +2508,7 @@ void TestFormula::testFormulaRefUpdateRange() // C3 with sticky reference including last column. m_pDoc->SetString( 2,2,1, "=SUM(23:23)"); // C4 with reference to last column. - CPPUNIT_ASSERT_MESSAGE("m_pDoc->MaxCol() changed, adapt unit test.", - m_pDoc->MaxCol() == 1023 || m_pDoc->MaxCol() == 16383); - m_pDoc->SetString( 2,3,1, m_pDoc->MaxCol() == 1023 ? "=SUM(AMJ22:AMJ23)" : "=SUM(XFD22:XFD23)"); + m_pDoc->SetString( 2,3,1, "=SUM(" + m_pDoc->MaxColAsString() + "22:" + m_pDoc->MaxColAsString() + "23)"); CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong result in C3.", 3.0, m_pDoc->GetValue(2,2,1)); CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong result in C4.", 2.0, m_pDoc->GetValue(2,3,1)); // Delete last column. -- cgit