summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/qa/unit/ucalc.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index f103f7d10306..f1d705ff401b 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -4094,6 +4094,23 @@ void Test::testUpdateReference()
m_pDoc->DeleteTab(2);
m_pDoc->DeleteTab(1);
m_pDoc->DeleteTab(0);
+
+ // Test positional update and invalidation of lookup cache for insertion
+ // and deletion within entire column reference.
+ m_pDoc->InsertTab(0, "Sheet1");
+ m_pDoc->InsertTab(1, "Sheet2");
+ m_pDoc->SetString(0,1,0, "s1");
+ m_pDoc->SetString(0,0,1, "=MATCH(\"s1\";Sheet1.A:A;0)");
+ m_pDoc->GetValue(0,0,1, aValue);
+ ASSERT_DOUBLES_EQUAL_MESSAGE("unexpected MATCH result", 2, aValue);
+ m_pDoc->InsertRow(0,0,MAXCOL,0,0,1); // insert 1 row before row 1 in Sheet1
+ m_pDoc->GetValue(0,0,1, aValue);
+ ASSERT_DOUBLES_EQUAL_MESSAGE("unexpected MATCH result", 3, aValue);
+ m_pDoc->DeleteRow(0,0,MAXCOL,0,0,1); // delete row 1 in Sheet1
+ m_pDoc->GetValue(0,0,1, aValue);
+ ASSERT_DOUBLES_EQUAL_MESSAGE("unexpected MATCH result", 2, aValue);
+ m_pDoc->DeleteTab(1);
+ m_pDoc->DeleteTab(0);
}
void Test::testSearchCells()