[Libreoffice-commits] core.git: sc/source
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Sat Apr 18 07:58:23 UTC 2020
sc/source/ui/view/formatsh.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 94bf2650d0998da751e461a0a9393b21771d519b
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Fri Apr 17 21:54:36 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Apr 18 09:57:50 2020 +0200
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 at collabora.co.uk>
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;
More information about the Libreoffice-commits
mailing list