svx/source/svdraw/svdotextdecomposition.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit c324c3a242ec110380f3d0f3fbac3b53bdb366d6
Author:     Balazs Varga <[email protected]>
AuthorDate: Mon Dec 15 12:32:53 2025 +0100
Commit:     Balazs Varga <[email protected]>
CommitDate: Thu Dec 18 09:00:40 2025 +0100

    Related: tdf#148041 - sd editeng fix: clicking text will make line
    
    spacing change for no reason in Impress
    
    Do setupAutoFitText after setVisualizedPage and SetFixedCellHeight
    was set, otherwise we can can have different text autofit calculation
    results between view and edit mode.
    
    follow-up after:
    f61ea135430d7b4a1fac7de1e57a1314fbb1b49e
    (editeng: use text scaling that better mimics MSO text scaling)
    
    25d6bd3ebcf4a5d6003288863620565749433787
    (Support FixedCellHeight in SdrAutoFitTextPrimitive2D)
    
    Change-Id: I74ae843f6a2b66ad7b276b9c2c363052390803db
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195665
    Reviewed-by: Tomaž Vajngerl <[email protected]>
    Tested-by: Jenkins
    (cherry picked from commit a20dec704fb4e542ab0dc30776d8161605c603ce)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195763
    Reviewed-by: Balazs Varga <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>

diff --git a/svx/source/svdraw/svdotextdecomposition.cxx 
b/svx/source/svdraw/svdotextdecomposition.cxx
index 45bd4a7ad43b..d9a9439a308e 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -991,7 +991,6 @@ void SdrTextObj::impDecomposeAutoFitTextPrimitive(
     rOutliner.SetUpdateLayout(true);
     rOutliner.SetText(rOutlinerParaObject);
 
-    setupAutoFitText(rOutliner, aAnchorTextSize);
     // set visualizing page at Outliner; needed e.g. for PageNumberField 
decomposition
     
rOutliner.setVisualizedPage(GetSdrPageFromXDrawPage(aViewInformation.getVisualizedPage()));
 
@@ -1002,6 +1001,9 @@ void SdrTextObj::impDecomposeAutoFitTextPrimitive(
     // done here (in contrast to BlockText and StretchText)
     rOutliner.SetFixedCellHeight(rSdrAutofitTextPrimitive.isFixedCellHeight());
 
+    // do auto text scaling
+    setupAutoFitText(rOutliner, aAnchorTextSize);
+
     // now get back the layouted text size from outliner
     Size aOutlinerTextSize(rOutliner.GetPaperSize());
     if (getSdrModelFromSdrObject().GetCompatibilityFlag(

Reply via email to