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:
f61ea13543
(editeng: use text scaling that better mimics MSO text scaling)

25d6bd3ebc
(Support FixedCellHeight in SdrAutoFitTextPrimitive2D)

Change-Id: I74ae843f6a2b66ad7b276b9c2c363052390803db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195665
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Jenkins
This commit is contained in:
Balazs Varga
2025-12-17 08:19:24 +01:00
committed by Tomaž Vajngerl
parent a8dcbc862b
commit a20dec704f
+3 -1
View File
@@ -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(