sc/source/ui/view/formatsh.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 94bf2650d0998da751e461a0a9393b21771d519b Author: Julien Nabet <[email protected]> AuthorDate: Fri Apr 17 21:54:36 2020 +0200 Commit: Noel Grandin <[email protected]> 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 <[email protected]> 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; _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
