summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2020-04-17 21:54:36 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-04-18 09:57:50 +0200
commit94bf2650d0998da751e461a0a9393b21771d519b (patch)
tree08ace1c796c435ec96a0ce3c6f8864e47e354e46 /sc
parentc12a5e83802699615d4226c83c2e6f135a3485b4 (diff)
Optimize a bit loop in ScFormatShell::GetStyleState
Change-Id: I2479072f00edd919496e534146a619103559784b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92463 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/formatsh.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index b06463c71f68..4c6cda17ac60 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -157,7 +157,7 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet )
bool bProtected = false;
SCTAB nTabCount = pDoc->GetTableCount();
- for (SCTAB i=0; i<nTabCount; i++)
+ for (SCTAB i=0; i<nTabCount && !bProtected; i++)
if (pDoc->IsTabProtected(i)) // look after protected table
bProtected = true;