diff options
Diffstat (limited to 'sc/source/core/data/document.cxx')
-rw-r--r-- | sc/source/core/data/document.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 80696e4bd0ed..708300e72a88 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -6226,6 +6226,22 @@ void ScDocument::GetAllNoteEntries( std::vector<sc::NoteEntry>& rNotes ) const } } +bool ScDocument::ContainsNotesInRange( const ScRangeList& rRange ) const +{ + for( size_t i = 0; i < rRange.size(); ++i) + { + const ScRange* pRange = rRange[i]; + for( SCTAB nTab = pRange->aStart.Tab(); nTab < pRange->aEnd.Tab(); ++nTab ) + { + bool bContainsNote = maTabs[nTab]->ContainsNotesInRange( *pRange ); + if(bContainsNote) + return true; + } + } + + return false; +} + void ScDocument::SetAutoNameCache( ScAutoNameCache* pCache ) { delete pAutoNameCache; |