[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - sc/qa sc/source
Thorsten Behrens (via logerrit)
logerrit at kemper.freedesktop.org
Tue Feb 18 09:15:16 UTC 2020
sc/qa/unit/data/ods/autoheight2rows.ods |binary
sc/qa/unit/subsequent_filters-test.cxx | 9 +++++++--
sc/source/core/data/segmenttree.cxx | 4 +++-
3 files changed, 10 insertions(+), 3 deletions(-)
New commits:
commit a915d7b7b9855a487902784dcdd8e295b6222519
Author: Thorsten Behrens <Thorsten.Behrens at CIB.de>
AuthorDate: Sun Feb 16 12:14:01 2020 +0100
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Tue Feb 18 10:14:47 2020 +0100
tdf#123971 don't clobber entire RowHeight range on updates
Use start index from current loop variable, not full range; otherwise
we're always clobbering values from (possibly higher) upper rows.
Change-Id: I3add7c2358710f4ae3927e7b0a1c1ff544965a03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88785
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
(cherry picked from commit f55140c7376c330bcdac071592aada75e8781e19)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88787
Reviewed-by: Vasily Melenchuk <vasily.melenchuk at cib.de>
diff --git a/sc/qa/unit/data/ods/autoheight2rows.ods b/sc/qa/unit/data/ods/autoheight2rows.ods
index b687701240c1..099df137ff64 100644
Binary files a/sc/qa/unit/data/ods/autoheight2rows.ods and b/sc/qa/unit/data/ods/autoheight2rows.ods differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 9110505667fc..e005b258d979 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -4300,11 +4300,16 @@ void ScFiltersTest::testAutoheight2Rows()
SCTAB nTab = 0;
int nHeight1 = rDoc.GetRowHeight(0, nTab, false);
- int nHeight3 = rDoc.GetRowHeight(2, nTab, false);
+ int nHeight2 = rDoc.GetRowHeight(1, nTab, false);
+ int nHeight4 = rDoc.GetRowHeight(3, nTab, false);
+ int nHeight5 = rDoc.GetRowHeight(4, nTab, false);
// We will do relative comparison, because calculated autoheight
// can be different on different platforms
- CPPUNIT_ASSERT_MESSAGE("Row #3 should be thinner than #1", nHeight3 < nHeight1);
+ CPPUNIT_ASSERT_MESSAGE("Row #1 and row #4 must have same height after load & auto-adjust",
+ abs( nHeight1 - nHeight4 ) < 10 );
+ CPPUNIT_ASSERT_MESSAGE("Row #2 and row #5 must have same height after load & auto-adjust",
+ abs( nHeight2 - nHeight5 ) < 10 );
xDocSh->DoClose();
}
diff --git a/sc/source/core/data/segmenttree.cxx b/sc/source/core/data/segmenttree.cxx
index b47f1e7b9f3c..01f1f9d82416 100644
--- a/sc/source/core/data/segmenttree.cxx
+++ b/sc/source/core/data/segmenttree.cxx
@@ -106,7 +106,9 @@ void ScFlatSegmentsImpl<ValueType_, ExtValueType_>::setValueIf(SCCOLROW nPos1, S
getRangeData(nCurrentStartRow, aRangeData);
if (rPredicate(aRangeData.mnValue))
{
- setValue(nPos1, std::min<SCCOLROW>(nPos2, aRangeData.mnPos2), nValue);
+ // set value from current iteration point on, til end of range.
+ // Note that aRangeData may well contain much lower values for nPos1
+ setValue(nCurrentStartRow, std::min<SCCOLROW>(nPos2, aRangeData.mnPos2), nValue);
}
// even if nPos2 is bigger than nPos2 this should terminate the loop
More information about the Libreoffice-commits
mailing list