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

New commits:
commit 2d69bd9f6c93788d297e9ea2508b5ead0bb64ae4
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:57 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/+/195764
    Reviewed-by: Balazs Varga <[email protected]>
    Tested-by: allotropia jenkins <[email protected]>

diff --git a/svx/source/svdraw/svdotextdecomposition.cxx 
b/svx/source/svdraw/svdotextdecomposition.cxx
index 293b23df88f3..b34db9f604b3 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -989,7 +989,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()));
 
@@ -1000,6 +999,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
     const Size aOutlinerTextSize(rOutliner.GetPaperSize());
     const basegfx::B2DVector aOutlinerScale(aOutlinerTextSize.Width(), 
aOutlinerTextSize.Height());

Reply via email to