sc/source/core/data/table5.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 4c4c5baaf017b2861daf039de179eaa7303b13b0 Author: Luboš Luňák <l.lu...@collabora.com> AuthorDate: Thu May 16 12:43:49 2019 +0200 Commit: Luboš Luňák <l.lu...@collabora.com> CommitDate: Thu May 16 14:40:59 2019 +0200 cache mdds position in ScTable::InvalidateTextWidth (tdf#108298) Again, normally starts container search from the beginning, so without caching this is quadratic. Change-Id: I3bb1ff40a326eb46780e45d3e3934773a7b77d06 Reviewed-on: https://gerrit.libreoffice.org/72406 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lu...@collabora.com> diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx index a32c27ae10bd..f4ecec8880a4 100644 --- a/sc/source/core/data/table5.cxx +++ b/sc/source/core/data/table5.cxx @@ -1205,12 +1205,14 @@ void ScTable::InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress* p for (SCCOL nCol = nCol1; nCol <= nCol2; ++nCol) { ScColumnTextWidthIterator aIter(aCol[nCol], nRow1, nRow2); + sc::ColumnBlockPosition blockPos; // cache mdds position + InitColumnBlockPosition( blockPos, nCol ); for (; aIter.hasCell(); aIter.next()) { SCROW nRow = aIter.getPos(); aIter.setValue(TEXTWIDTH_DIRTY); - ScRefCellValue aCell = aCol[nCol].GetCellValue(nRow); + ScRefCellValue aCell = aCol[nCol].GetCellValue(blockPos, nRow); if (aCell.isEmpty()) continue; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits