tdf#133808 - Use cell counts in order to shrink entire columns/rows
Otherwise, entire ranges will never be shrunk leading to performance issues. Change-Id: If0c1d482ccaffd9446f0321782e3c0963514135f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211472 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
This commit is contained in:
committed by
Andreas Heinisch
parent
e43ac28d22
commit
3ca06ba114
@@ -1381,7 +1381,10 @@ public:
|
||||
ScSingleRefData& s = rData.Ref1;
|
||||
ScSingleRefData& e = rData.Ref2;
|
||||
|
||||
if(abs((e.Col()-s.Col())*(e.Row()-s.Row())) < SHRINK_RANGE_THRESHOLD)
|
||||
// tdf#133808 - use cell counts in order to shrink entire columns/rows
|
||||
const sal_Int64 nCells = (static_cast<sal_Int64>(std::abs(e.Col() - s.Col())) + 1)
|
||||
* (static_cast<sal_Int64>(std::abs(e.Row() - s.Row())) + 1);
|
||||
if (nCells < SHRINK_RANGE_THRESHOLD)
|
||||
return;
|
||||
|
||||
SCCOL nMinCol = mpDoc->MaxCol(), nMaxCol = 0;
|
||||
|
||||
Reference in New Issue
Block a user