chart2/source/view/main/VLegend.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit a36173359d4614a8935e2f764acadfcf736e091c Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Tue Oct 4 18:35:17 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed Oct 5 07:02:24 2022 +0200 tdf#151283 calc hangs when try to open XLS file regression from commit 258a8d133d0548c7af51f4852260e9969df288fc Author: Noel Grandin <noel.gran...@collabora.co.uk> tdf#150034 very slow opening pathological chart if nNewLen is < 10, we can get stuck in an infinite loop because the calculation will not actually decrement nNewLen Change-Id: I98920deaa087713c44531a7f6506d1d5d32b2e98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140949 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index 1cfa1848d024..061cbb39976d 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -448,7 +448,7 @@ awt::Size lcl_placeLegendEntries( DrawModelWrapper::removeShape(xEntry); // The intention here is to make pathological cases with extremely large labels // converge a little faster - if (std::abs(nRemainingSpace) > nSumHeight / 10) + if (nNewLen > 10 && std::abs(nRemainingSpace) > nSumHeight / 10) nNewLen -= nNewLen / 10; else --nNewLen;