svx/source/svdraw/svdoashp.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e53bc0a1bf3941e0f38d590b5e119105aafdcffe
Author:     Justin Luth <justin.l...@collabora.com>
AuthorDate: Tue Mar 25 14:14:50 2025 -0400
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Mon Mar 31 09:58:28 2025 +0200

    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
    (cherry picked from commit c7c543e5f5a361d52dd0cc57379da4304bc3eb7f)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183351
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 99cae2a50290..e9b788071b6f 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());

Reply via email to