[Libreoffice-commits] core.git: sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Aug 31 08:27:43 UTC 2018


 sc/source/core/data/document.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 03b361673d04f31e0602d2988e4df26eaeb53a34
Author:     Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Thu Aug 30 12:59:06 2018 +0200
Commit:     Katarina Behrens <Katarina.Behrens at cib.de>
CommitDate: Fri Aug 31 10:27:17 2018 +0200

    tdf#112454 Also consider last SCTAB in loop
    
    Since 'rRange.aEnd.Tab()' is valid, it needs to
    be included in the loop to get a valid result.
    
    Change-Id: I7b2447e059dc03444c56e7fc0b113e1b618dd510
    Reviewed-on: https://gerrit.libreoffice.org/59798
    Tested-by: Jenkins
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>

diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index a1e44600eeac..59c821e4764a 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -6726,7 +6726,7 @@ bool ScDocument::ContainsNotesInRange( const ScRangeList& rRangeList ) const
     for( size_t i = 0; i < rRangeList.size(); ++i)
     {
         const ScRange & rRange = rRangeList[i];
-        for( SCTAB nTab = rRange.aStart.Tab(); nTab < rRange.aEnd.Tab(); ++nTab )
+        for( SCTAB nTab = rRange.aStart.Tab(); nTab <= rRange.aEnd.Tab(); ++nTab )
         {
             bool bContainsNote = maTabs[nTab]->ContainsNotesInRange( rRange );
             if(bContainsNote)


More information about the Libreoffice-commits mailing list