diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-09-16 10:20:56 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-09-18 14:22:13 +0200 |
commit | 30bb3657ee78b7d3b0a7d26f80bf1ff94b16f51c (patch) | |
tree | e2f96cc04c33f3e62c422505a4cdd5e0740ea9f6 /sc/qa | |
parent | 897bd0517d835ba00458279311e5d8ff11079dd7 (diff) |
ScAddress::Parse never passed a null ScDocument*
Change-Id: I8832f2cc4311b30b9a15883e831260a19d089a57
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102974
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/helper/qahelper.cxx | 2 | ||||
-rw-r--r-- | sc/qa/unit/helper/shared_test_impl.hxx | 2 | ||||
-rw-r--r-- | sc/qa/unit/range.cxx | 2 | ||||
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 2 | ||||
-rw-r--r-- | sc/qa/unit/ucalc_formula.cxx | 8 |
5 files changed, 8 insertions, 8 deletions
diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx index b0a6084d9db9..130ff024cf87 100644 --- a/sc/qa/unit/helper/qahelper.cxx +++ b/sc/qa/unit/helper/qahelper.cxx @@ -404,7 +404,7 @@ ScRangeList getChartRanges(ScDocument& rDoc, const SdrOle2Obj& rChartObj) { // Parse it as a single cell address. ScAddress aAddr; - nRes = aAddr.Parse(aRangeReps[i], &rDoc, rDoc.GetAddressConvention()); + nRes = aAddr.Parse(aRangeReps[i], rDoc, rDoc.GetAddressConvention()); CPPUNIT_ASSERT_MESSAGE("Failed to parse a range representation.", (nRes & ScRefFlags::VALID)); aRanges.push_back(aAddr); } diff --git a/sc/qa/unit/helper/shared_test_impl.hxx b/sc/qa/unit/helper/shared_test_impl.hxx index e5bffd5c8f06..92c05c6d7e9a 100644 --- a/sc/qa/unit/helper/shared_test_impl.hxx +++ b/sc/qa/unit/helper/shared_test_impl.hxx @@ -280,7 +280,7 @@ void testCeilingFloor_Impl( ScDocument& rDoc ) // Sheet1.K1 has =AND(K3:K81) to evaluate all results. const char pORef[] = "Sheet1.K1"; ScAddress aPos; - aPos.Parse(pORef, &rDoc); + aPos.Parse(pORef, rDoc); ASSERT_FORMULA_EQUAL(rDoc, aPos, "AND(K3:K81)", "Wrong formula."); CPPUNIT_ASSERT_MESSAGE( OString( pORef + OStringLiteral(" result is error.")).getStr(), isFormulaWithoutError( rDoc, aPos)); diff --git a/sc/qa/unit/range.cxx b/sc/qa/unit/range.cxx index f20def220318..21add9ee37fe 100644 --- a/sc/qa/unit/range.cxx +++ b/sc/qa/unit/range.cxx @@ -40,7 +40,7 @@ void ScAddressTest::testAddressParsing() { ScAddress aAddr; ScDocument& rDoc = m_xDocShRef->GetDocument(); - ScRefFlags nRes = aAddr.Parse("1", &rDoc, formula::FormulaGrammar::CONV_OOO); + ScRefFlags nRes = aAddr.Parse("1", rDoc, formula::FormulaGrammar::CONV_OOO); CPPUNIT_ASSERT_MESSAGE("Should fail to parse.", !(nRes & ScRefFlags::VALID)); } diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index e2033cadebc6..203460654d17 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -4332,7 +4332,7 @@ void ScFiltersTest::testEmptyRowsXLSXML() } ScAddress aPos; - aPos.Parse("B9", &rDoc); + aPos.Parse("B9", rDoc); ASSERT_FORMULA_EQUAL(rDoc, aPos, "SUM(B4:B8)", nullptr); xDocSh->DoClose(); diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index 00bffef9de29..e226103849c8 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -286,28 +286,28 @@ void Test::testFormulaParseReference() ScAddress aPos; ScAddress::ExternalInfo aExtInfo; - ScRefFlags nRes = aPos.Parse("'90''s Music'.D10", m_pDoc, formula::FormulaGrammar::CONV_OOO, &aExtInfo); + ScRefFlags nRes = aPos.Parse("'90''s Music'.D10", *m_pDoc, formula::FormulaGrammar::CONV_OOO, &aExtInfo); CPPUNIT_ASSERT_MESSAGE("Failed to parse.", (nRes & ScRefFlags::VALID)); CPPUNIT_ASSERT_EQUAL(static_cast<SCTAB>(1), aPos.Tab()); CPPUNIT_ASSERT_EQUAL(static_cast<SCCOL>(3), aPos.Col()); CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(9), aPos.Row()); CPPUNIT_ASSERT_MESSAGE("This is not an external address.", !aExtInfo.mbExternal); - nRes = aPos.Parse("'90''s and 70''s'.C100", m_pDoc, formula::FormulaGrammar::CONV_OOO, &aExtInfo); + nRes = aPos.Parse("'90''s and 70''s'.C100", *m_pDoc, formula::FormulaGrammar::CONV_OOO, &aExtInfo); CPPUNIT_ASSERT_MESSAGE("Failed to parse.", (nRes & ScRefFlags::VALID)); CPPUNIT_ASSERT_EQUAL(static_cast<SCTAB>(2), aPos.Tab()); CPPUNIT_ASSERT_EQUAL(static_cast<SCCOL>(2), aPos.Col()); CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(99), aPos.Row()); CPPUNIT_ASSERT_MESSAGE("This is not an external address.", !aExtInfo.mbExternal); - nRes = aPos.Parse("'All Others'.B3", m_pDoc, formula::FormulaGrammar::CONV_OOO, &aExtInfo); + nRes = aPos.Parse("'All Others'.B3", *m_pDoc, formula::FormulaGrammar::CONV_OOO, &aExtInfo); CPPUNIT_ASSERT_MESSAGE("Failed to parse.", (nRes & ScRefFlags::VALID)); CPPUNIT_ASSERT_EQUAL(static_cast<SCTAB>(3), aPos.Tab()); CPPUNIT_ASSERT_EQUAL(static_cast<SCCOL>(1), aPos.Col()); CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(2), aPos.Row()); CPPUNIT_ASSERT_MESSAGE("This is not an external address.", !aExtInfo.mbExternal); - nRes = aPos.Parse("NoQuote.E13", m_pDoc, formula::FormulaGrammar::CONV_OOO, &aExtInfo); + nRes = aPos.Parse("NoQuote.E13", *m_pDoc, formula::FormulaGrammar::CONV_OOO, &aExtInfo); CPPUNIT_ASSERT_MESSAGE("Failed to parse.", (nRes & ScRefFlags::VALID)); CPPUNIT_ASSERT_EQUAL(static_cast<SCTAB>(4), aPos.Tab()); CPPUNIT_ASSERT_EQUAL(static_cast<SCCOL>(4), aPos.Col()); |