From 79ea331bbd91def54bb8a31ba2acd671fbf4422d Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Thu, 21 Apr 2022 21:56:32 +0200 Subject: fix checking whether a block of cells is empty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The GetEmptyLinesInBlock() call has unclear semantics and it appears that it has an off-by-one error. Use a simple clear function for the check. Change-Id: I45d9b73428aedababc1ad93c202daa1de945b5bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133303 Tested-by: Jenkins Reviewed-by: Luboš Luňák --- sc/inc/table.hxx | 1 + 1 file changed, 1 insertion(+) (limited to 'sc/inc/table.hxx') diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index ba8ed9e328d8..ec78bfa598c5 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -619,6 +619,7 @@ public: SCROW GetLastDataRow( SCCOL nCol1, SCCOL nCol2, SCROW nLastRow, ScDataAreaExtras* pDataAreaExtras = nullptr ) const; + bool IsEmptyBlock(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow) const; SCSIZE GetEmptyLinesInBlock( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScDirection eDir ) const; -- cgit