summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2018-08-30 12:59:06 +0200
committerAndras Timar <andras.timar@collabora.com>2018-09-03 10:12:51 +0200
commit8a8e4e3fc338994883fbb7db8fb9447e1f99f012 (patch)
tree2c8c79abc2def69244cdfbcd2ba7de602c1e2559
parentd576955f513509a2740ab2e40b4523bf1a6b17ac (diff)
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. Reviewed-on: https://gerrit.libreoffice.org/59798 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> (cherry picked from commit 03b361673d04f31e0602d2988e4df26eaeb53a34) Conflicts: sc/source/core/data/document.cxx Backported. Change-Id: I7b2447e059dc03444c56e7fc0b113e1b618dd510 Reviewed-on: https://gerrit.libreoffice.org/59878 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 9858b7004856a632778dde0dc7edddb14b673194)
-rw-r--r--sc/source/core/data/document.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 1c06c813c2f7..f5a3218301f5 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -6730,7 +6730,7 @@ bool ScDocument::ContainsNotesInRange( const ScRangeList& rRange ) const
for( size_t i = 0; i < rRange.size(); ++i)
{
const ScRange* pRange = rRange[i];
- for( SCTAB nTab = pRange->aStart.Tab(); nTab < pRange->aEnd.Tab(); ++nTab )
+ for( SCTAB nTab = pRange->aStart.Tab(); nTab <= pRange->aEnd.Tab(); ++nTab )
{
bool bContainsNote = maTabs[nTab]->ContainsNotesInRange( *pRange );
if(bContainsNote)