From b561d6ef7d03f6d940d01367110f595deec7475c Mon Sep 17 00:00:00 2001 From: Laurent Godard Date: Thu, 5 Dec 2013 12:04:31 +0100 Subject: [PATCH] counting notes is per table, not on the whole document Change-Id: Id4afa4eee961f159f8ea8caeac620d101cfb103e Reviewed-on: https://gerrit.libreoffice.org/6941 Tested-by: Markus Mohrhard Reviewed-by: Markus Mohrhard --- sc/source/ui/unoobj/docuno.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 rNotes; + pDoc->GetNotesInRange(aRangeList, rNotes); + nCount = rNotes.size(); } return nCount; }