summaryrefslogtreecommitdiff
path: root/sc/source/core/data/table2.cxx
diff options
context:
space:
mode:
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 ))