svx/source/svdraw/svdoashp.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit c7c543e5f5a361d52dd0cc57379da4304bc3eb7f Author: Justin Luth <justin.l...@collabora.com> AuthorDate: Tue Mar 25 14:14:50 2025 -0400 Commit: Justin Luth <justin.l...@collabora.com> CommitDate: Wed Mar 26 02:32:48 2025 +0100 related tdf#165521 svx: don't start layout until text is set It has been this way since it svdoashp.cxx was introduced in 2004. Calculating the layout is expensive. So why turn on the layout updates early, when both SetFixedCellHeight (which can cause a FormatFullDoc) as well as SetText (which always triggers a full layout) could still obsolete any previous layout results. Change-Id: I258ae8ffc33cf6221f56a4eb52f151e10d08bb82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183314 Reviewed-by: Justin Luth <jl...@mail.com> Tested-by: Jenkins diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 63a11924ece1..f5a13207d840 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -2345,7 +2345,6 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool { Outliner& rOutliner=ImpGetDrawOutliner(); rOutliner.SetPaperSize(aSiz); - rOutliner.SetUpdateLayout(true); // TODO: add the optimization with bPortionInfoChecked again. OutlinerParaObject* pOutlinerParaObject = GetOutlinerParaObject(); if( pOutlinerParaObject != nullptr ) @@ -2354,6 +2353,7 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool GetMergedItem(SDRATTR_TEXT_USEFIXEDCELLHEIGHT).GetValue()); rOutliner.SetText(*pOutlinerParaObject); } + rOutliner.SetUpdateLayout(true); if ( bWdtGrow ) { Size aSiz2(rOutliner.CalcTextSize());