From 4d712961a2652a6defb7ef23e8985a6971710e37 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Fri, 16 Feb 2018 20:45:59 -0500 Subject: Let's also check for the presence of the range names. Change-Id: Ic61370e495a8647a17eec484f8f32afe4dcc3b94 Reviewed-on: https://gerrit.libreoffice.org/49888 Tested-by: Jenkins Reviewed-by: Kohei Yoshida --- sc/qa/unit/subsequent_filters-test.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index f93af35a0aab..214062f30ef0 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -3605,6 +3605,11 @@ void ScFiltersTest::testNamedExpressionsXLSXML() CPPUNIT_ASSERT_EQUAL(55.0, rDoc.GetValue(aPos)); ASSERT_FORMULA_EQUAL(rDoc, aPos, "SUM(MyRange2)", nullptr); + const ScRangeData* pRD = rDoc.GetRangeName()->findByUpperName("MYRANGE"); + CPPUNIT_ASSERT(pRD); + pRD = rDoc.GetRangeName()->findByUpperName("MYRANGE2"); + CPPUNIT_ASSERT(pRD); + xDocSh->DoClose(); } @@ -3625,6 +3630,15 @@ void ScFiltersTest::testNamedExpressionsXLSXML() CPPUNIT_ASSERT_EQUAL(74.0, rDoc.GetValue(aPos)); ASSERT_FORMULA_EQUAL(rDoc, aPos, "SUM(MyRange)", nullptr); + const ScRangeName* pRN = rDoc.GetRangeName(0); + CPPUNIT_ASSERT(pRN); + const ScRangeData* pRD = pRN->findByUpperName("MYRANGE"); + CPPUNIT_ASSERT(pRD); + pRN = rDoc.GetRangeName(1); + CPPUNIT_ASSERT(pRN); + pRD = pRN->findByUpperName("MYRANGE"); + CPPUNIT_ASSERT(pRD); + xDocSh->DoClose(); } } -- cgit v1.2.3