summaryrefslogtreecommitdiff
path: root/sc/source/core/data/table2.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-11-24 21:22:20 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-11-28 00:32:39 +0100
commit12aa3151ab993fff1ae312ae7b1d5bbcfc379b07 (patch)
treee9187d3ee8a43810bba4bdc222094b4f0109e20f /sc/source/core/data/table2.cxx
parentbf35ce3f91c8ee3f06a7a6c7a10dd17f05198ce5 (diff)
checking every cell on a sheet is expensive, related fdo#71934
This is only the first of two places that does this. Change-Id: I57fe1eb07630ecd86b112e88b7ad32c16e9f793a
Diffstat (limited to 'sc/source/core/data/table2.cxx')
-rw-r--r--sc/source/core/data/table2.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 29e10c90d09f..c0d41d1ae6cf 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -1516,6 +1516,20 @@ void ScTable::GetAllNoteEntries( std::vector<sc::NoteEntry>& rNotes ) const
aCol[nCol].GetAllNoteEntries(rNotes);
}
+bool ScTable::ContainsNotesInRange( const ScRange& rRange ) const
+{
+ SCROW nStartRow = rRange.aStart.Row();
+ SCROW nEndRow = rRange.aEnd.Row();
+ for (SCCOL nCol = rRange.aStart.Col(); nCol <= rRange.aEnd.Col(); ++nCol)
+ {
+ bool bContainsNote = !aCol[nCol].IsNotesEmptyBlock(nStartRow, nEndRow);
+ if(bContainsNote)
+ return true;
+ }
+
+ return false;
+}
+
CellType ScTable::GetCellType( SCCOL nCol, SCROW nRow ) const
{
if (ValidColRow( nCol, nRow ))