diff options
-rw-r--r-- | sc/qa/unit/ucalc_formula.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/tool/refdata.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index 551834284f76..dce22b2c25a4 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -7363,8 +7363,8 @@ void TestFormula::testFuncRangeOp() // have to be adapted. aPos.IncRow(); m_pDoc->SetString( aPos, "=SUM(B1:Sheet2.B2:Sheet3.B3)"); - ASSERT_FORMULA_EQUAL(*m_pDoc, aPos, "SUM(#REF!.B2:#REF!.B3)", "Wrong formula."); - CPPUNIT_ASSERT_EQUAL( OUString("#REF!"), m_pDoc->GetString(aPos)); + ASSERT_FORMULA_EQUAL(*m_pDoc, aPos, "SUM(b1:sheet2.b2:Sheet3.B3)", "Wrong formula."); + CPPUNIT_ASSERT_EQUAL( OUString("#NAME?"), m_pDoc->GetString(aPos)); aPos.IncRow(); m_pDoc->SetString( aPos, "=SUM(Sheet1.B1:Sheet3.B2:Sheet2.B3)"); diff --git a/sc/source/core/tool/refdata.cxx b/sc/source/core/tool/refdata.cxx index 59a224dbcfbd..9cdadc57da10 100644 --- a/sc/source/core/tool/refdata.cxx +++ b/sc/source/core/tool/refdata.cxx @@ -129,7 +129,7 @@ bool ScSingleRefData::IsDeleted() const bool ScSingleRefData::Valid(const ScDocument& rDoc) const { - return ColValid(rDoc) && RowValid(rDoc) && TabValid(); + return !IsDeleted() && ColValid(rDoc) && RowValid(rDoc) && TabValid(); } bool ScSingleRefData::ColValid(const ScDocument& rDoc) const |