From 839eccc8ae5aa5dde055f84471246f2a3ef04929 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Thu, 28 Nov 2013 00:29:59 +0100 Subject: iterating through all cells is not a good idea, fdo#71934 Change-Id: I370f641f0fffed8835a32c577c2f2e841ba419aa --- sc/source/core/data/table2.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'sc/source/core/data/table2.cxx') diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index c0d41d1ae6cf..d7fca4f9eb69 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -1516,6 +1516,16 @@ void ScTable::GetAllNoteEntries( std::vector& rNotes ) const aCol[nCol].GetAllNoteEntries(rNotes); } +void ScTable::GetNotesInRange( const ScRange& rRange, std::vector& rNotes ) const +{ + SCROW nStartRow = rRange.aStart.Row(); + SCROW nEndRow = rRange.aEnd.Row(); + for (SCCOL nCol = rRange.aStart.Col(); nCol <= rRange.aEnd.Col(); ++nCol) + { + aCol[nCol].GetNotesInRange(nStartRow, nEndRow, rNotes); + } +} + bool ScTable::ContainsNotesInRange( const ScRange& rRange ) const { SCROW nStartRow = rRange.aStart.Row(); -- cgit v1.2.3