summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/cellsh.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-24 21:24:36 +0100
commit288be67406110dc5e0f957d79fcf775076ee513c (patch)
tree10f942b909e4c861f03bfe07899901f6fa123676 /sc/source/ui/view/cellsh.cxx
parent718de51eb9f567fa433ac216114f5e6f16236209 (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/ui/view/cellsh.cxx')
-rw-r--r--sc/source/ui/view/cellsh.cxx17
1 files changed, 1 insertions, 16 deletions
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 943379f2d0af..8895f963d192 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -979,22 +979,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
// look for at least one note in selection
ScRangeList aRanges;
rMark.FillRangeListWithMarks( &aRanges, false );
- size_t nCount = aRanges.size();
- for (size_t nPos = 0; nPos < nCount && !bEnable; ++nPos)
- {
- SCTAB aTab = aRanges[nPos]->aStart.Tab();
- for (SCCOL aCol=aRanges[nPos]->aStart.Col(); aCol <= aRanges[nPos]->aEnd.Col() && !bEnable; aCol++)
- {
- for (SCROW aRow=aRanges[nPos]->aStart.Row(); aRow <= aRanges[nPos]->aEnd.Row(); aRow++)
- {
- if (pDoc->HasNote(aCol, aRow, aTab))
- {
- bEnable = true;
- break;
- }
- }
- }
- }
+ bEnable = pDoc->ContainsNotesInRange( aRanges );
}
}
else