[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sc/source
Eike Rathke
erack at redhat.com
Sat Jun 3 15:10:20 UTC 2017
sc/source/core/data/table2.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 2c7557594a41390d7a2ef4efcf3279f46f9cac26
Author: Eike Rathke <erack at redhat.com>
Date: Sat Jun 3 13:00:50 2017 +0200
sc::ColRowSpan::mnEnd is inclusive
Wrong since
commit 1e721077b43de84edab2a3ed2f316ddcbec6e3ec
Date: Tue Oct 7 00:22:32 2014 +0900
and
commit 91502a72c12c559442e8bf77c27a516b49c2a68d
Date: Thu Oct 9 14:44:27 2014 +0200
So HasAttribSelection() and HasSelectionMatrixFragment() did not query the
rightmost column of each marked range from ScMarkData.
Change-Id: Ie3aca26ee1b6c249c1135268dc0ad3ea053ea2b8
(cherry picked from commit 77d1e0c49adea959dd418de9b6cf9901e01be3ae)
Reviewed-on: https://gerrit.libreoffice.org/38370
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Jenkins <ci at libreoffice.org>
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 963e150ade9a..fd6acb8447b6 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -1968,7 +1968,7 @@ bool ScTable::HasAttribSelection( const ScMarkData& rMark, HasAttrFlags nMask )
for (sc::ColRowSpan & aSpan : aSpans)
{
- for (SCCOLROW j = aSpan.mnStart; j < aSpan.mnEnd; ++j)
+ for (SCCOLROW j = aSpan.mnStart; j <= aSpan.mnEnd; ++j)
{
if (aCol[j].HasAttribSelection(rMark, nMask))
return true;
@@ -2250,7 +2250,7 @@ bool ScTable::HasSelectionMatrixFragment( const ScMarkData& rMark ) const
for (sc::ColRowSpan & aSpan : aSpans)
{
- for ( SCCOLROW j=aSpan.mnStart; j<aSpan.mnEnd; j++ )
+ for ( SCCOLROW j=aSpan.mnStart; j<=aSpan.mnEnd; j++ )
{
if ( aCol[j].HasSelectionMatrixFragment(rMark) )
return true;
More information about the Libreoffice-commits
mailing list