summaryrefslogtreecommitdiff
path: root/sc/qa/unit/ucalc.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-06-23 14:40:15 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-06-23 15:24:07 +0100
commit84dc0157df9cb173ec74da2bd27507329efc3816 (patch)
treeb19718342ba5e2d7729a71298b26886683c94140 /sc/qa/unit/ucalc.cxx
parent456902abb40397e45f30efdfa2433d9d773d5344 (diff)
Related: tdf#100460 GetNotesInRange doesn't count last cell in range
e.g. open document from tdf#100460 and select select A20:A21 and right click and there is a hide comment entry. Shrink the selection to just A20 (which has the comment in it) and the right click menu has no hide comment entry in it. std::for_each(it, itEnd means it < itEnd but here we want the rows indicated by nStartRow <= nEndRow so we need to increment itEnd by one to get the right range Change-Id: I48e8c0748f520671e09f04b16961bf9729960317
Diffstat (limited to 'sc/qa/unit/ucalc.cxx')
-rw-r--r--sc/qa/unit/ucalc.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 9cecaccf510c..5a38c92fabfc 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -4980,6 +4980,12 @@ void Test::testNoteCopyPaste()
CPPUNIT_ASSERT(pNote);
CPPUNIT_ASSERT_EQUAL(OUString("Note2"), pNote->GetText());
+ // Test that GetNotesInRange includes the end of its range
+ // and so can find the note
+ std::vector<sc::NoteEntry> aNotes;
+ m_pDoc->GetNotesInRange(ScRange(1,7,0), aNotes);
+ CPPUNIT_ASSERT_EQUAL(size_t(1), aNotes.size());
+
m_pDoc->DeleteTab(0);
}