[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - sc/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Feb 12 12:49:15 UTC 2019
sc/source/core/data/table1.cxx | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
New commits:
commit 5468cf114b55124f08660ce75be7ca50de49ef0b
Author: Eike Rathke <erack at redhat.com>
AuthorDate: Mon Feb 11 16:28:22 2019 +0100
Commit: Xisco FaulĂ <xiscofauli at libreoffice.org>
CommitDate: Tue Feb 12 13:48:52 2019 +0100
Resolves: tdf#123052 correctly init pNextRows[] values for up/back unprotected
Regression from
commit ec68d58afd53ffd5f0f524503dec607e52385c72
CommitDate: Fri Jul 6 14:25:07 2018 +0200
GetNextPos: deduplicate some nMovX code
Change-Id: I0352d44eda587d2c340df4c7d8fe35b7b8591fc1
Reviewed-on: https://gerrit.libreoffice.org/67693
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Jenkins
(cherry picked from commit febe6a57f9bc9145ffc8e9faeb34b8ac5af1c718)
Reviewed-on: https://gerrit.libreoffice.org/67696
Reviewed-by: Xisco FaulĂ <xiscofauli at libreoffice.org>
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index cef056314e2e..9377c7111a6e 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -1523,8 +1523,16 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCCOL nMovX, SCROW nMovY,
const SCROW nRowAdd = (bUp ? -1 : 1);
sal_uInt16 nWrap = 0;
- for (SCCOL i = 0; i < nColCount; ++i)
- pNextRows[i] = (i + nStartCol < nCol) ? (nRow + nRowAdd) : nRow;
+ if (bUp)
+ {
+ for (SCCOL i = 0; i < nColCount; ++i)
+ pNextRows[i] = (i + nStartCol > nCol) ? (nRow + nRowAdd) : nRow;
+ }
+ else
+ {
+ for (SCCOL i = 0; i < nColCount; ++i)
+ pNextRows[i] = (i + nStartCol < nCol) ? (nRow + nRowAdd) : nRow;
+ }
do
{
SCROW nNextRow = pNextRows[nCol - nStartCol] + nRowAdd;
More information about the Libreoffice-commits
mailing list