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

New commits:
commit a20dec704fb4e542ab0dc30776d8161605c603ce
Author:     Balazs Varga <[email protected]>
AuthorDate: Mon Dec 15 12:32:53 2025 +0100
Commit:     Tomaž Vajngerl <[email protected]>
CommitDate: Wed Dec 17 08:19:24 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

diff --git a/svx/source/svdraw/svdotextdecomposition.cxx 
b/svx/source/svdraw/svdotextdecomposition.cxx
index 951f93fe0de4..a5b46709fb63 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -227,7 +227,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()));
 
@@ -238,6 +237,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