summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorLaurent Godard <lgodard.libre@laposte.net>2013-12-05 12:04:31 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-12-05 07:53:05 -0600
commitb561d6ef7d03f6d940d01367110f595deec7475c (patch)
treeaa39cfe30d25b6a43fa75439653c4a041ef31c02 /sc
parente697cd8f82765ebf9005167a7b9d2680a774cb04 (diff)
counting notes is per table, not on the whole document
Change-Id: Id4afa4eee961f159f8ea8caeac620d101cfb103e Reviewed-on: https://gerrit.libreoffice.org/6941 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/unoobj/docuno.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 56cd857dd6b0..54f40d071df8 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -3605,7 +3605,10 @@ sal_Int32 SAL_CALL ScAnnotationsObj::getCount() throw(uno::RuntimeException)
if (pDocShell)
{
ScDocument* pDoc = pDocShell->GetDocument();
- nCount = pDoc->CountNotes();
+ const ScRangeList aRangeList( ScRange( 0, 0, nTab, MAXCOL, MAXROW, nTab) );
+ std::vector<sc::NoteEntry> rNotes;
+ pDoc->GetNotesInRange(aRangeList, rNotes);
+ nCount = rNotes.size();
}
return nCount;
}