summaryrefslogtreecommitdiff
path: root/sc/qa
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-09-13 15:06:18 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-09-13 21:17:36 +0200
commit862bd0d7f7a13f41f3489d2b926c3a229253c6b9 (patch)
tree819e3192902dfa46e971e0c103ee7f18c0bfd7b7 /sc/qa
parentb4983e9607134bcf803a895a632412526c2cfe41 (diff)
CompileFormulaContext never constructed with a null ScDocument
Change-Id: I0c88a9383e52a7406b466a82cda8f54a0a7722c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102585 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/qa')
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx2
-rw-r--r--sc/qa/unit/ucalc_sharedformula.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index bc8c36a9bf9c..459f72ea95f6 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -3434,7 +3434,7 @@ void ScFiltersTest::testVBAUserFunctionXLSM()
ScFormulaCell* pFC = rDoc.GetFormulaCell(ScAddress(0,0,0));
CPPUNIT_ASSERT(pFC);
- sc::CompileFormulaContext aCxt(&rDoc);
+ sc::CompileFormulaContext aCxt(rDoc);
OUString aFormula = pFC->GetFormula(aCxt);
CPPUNIT_ASSERT_EQUAL(OUString("=MYFUNC()"), aFormula);
diff --git a/sc/qa/unit/ucalc_sharedformula.cxx b/sc/qa/unit/ucalc_sharedformula.cxx
index 88d1fbae110a..e1dc8b71867e 100644
--- a/sc/qa/unit/ucalc_sharedformula.cxx
+++ b/sc/qa/unit/ucalc_sharedformula.cxx
@@ -1051,7 +1051,7 @@ void Test::testSharedFormulasDeleteColumns()
CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(0), pSRef->toAbs(*m_pDoc, ScAddress(1,0,0)).Row());
// The formula string should show #REF! in lieu of the column position (only for Calc A1 syntax).
- sc::CompileFormulaContext aCFCxt(m_pDoc, FormulaGrammar::GRAM_ENGLISH);
+ sc::CompileFormulaContext aCFCxt(*m_pDoc, FormulaGrammar::GRAM_ENGLISH);
CPPUNIT_ASSERT_EQUAL(OUString("=#REF!1"), pFC->GetFormula(aCFCxt));
SfxUndoManager* pUndoMgr = m_pDoc->GetUndoManager();