[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - sc/source

Eike Rathke erack at redhat.com
Sat Jun 3 14:55:13 UTC 2017


 sc/source/core/data/table2.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 7821c84215be4f3e968f9a6afd8f8325992ef03c
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/38371
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index a44ee8939730..7789b215504d 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -1927,7 +1927,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;
@@ -2209,7 +2209,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