sc/source/core/data/table1.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
New commits: commit 1768d5705dc72328ae2369fac7fc82437fef4ae1 Author: Luboš Luňák <l.lu...@collabora.com> AuthorDate: Thu Apr 21 21:03:59 2022 +0200 Commit: Luboš Luňák <l.lu...@collabora.com> CommitDate: Thu Apr 21 22:08:35 2022 +0200 simply return from a loop Change-Id: I4e10945f32dfb535663ea7392f19532e45ca9ee3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133301 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lu...@collabora.com> diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx index e82fdf9d4cfd..e864bd23974f 100644 --- a/sc/source/core/data/table1.cxx +++ b/sc/source/core/data/table1.cxx @@ -1234,11 +1234,10 @@ bool ScTable::IsEmptyLine( SCROW nRow, SCCOL nStartCol, SCCOL nEndCol ) const nEndCol = std::min<SCCOL>( nEndCol, aCol.size()-1 ); - bool bFound = false; - for (SCCOL i=nStartCol; i<=nEndCol && !bFound; i++) + for (SCCOL i=nStartCol; i<=nEndCol; i++) if (aCol[i].HasDataAt(nRow)) - bFound = true; - return !bFound; + return false; + return true; } void ScTable::LimitChartArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow ) const