From a2baea7faff31d26459dab3668a39eae85e4991b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 11:27:30 +0200 Subject: Adding upstream version 4:24.2.1. Signed-off-by: Daniel Baumann --- oox/source/export/drawingml.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'oox/source/export') diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 05c96c9ad7..a3e5356c05 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -4061,6 +4061,22 @@ void DrawingML::WriteText(const Reference& rXIface, bool bBodyPr, bo bHasWrap = true; } + // tdf#134401: If AUTOGROWWIDTH and AUTOGROWHEIGHT are set, then export it as TextWordWrap + if (SvxShapeText* pShpTxt = dynamic_cast(rXIface.get())) + { + const sdr::properties::BaseProperties& rProperties + = pShpTxt->GetSdrObject()->GetProperties(); + + const SdrOnOffItem& rSdrTextFitWidth = rProperties.GetItem(SDRATTR_TEXT_AUTOGROWWIDTH); + const SdrOnOffItem& rSdrTextFitHeight = rProperties.GetItem(SDRATTR_TEXT_AUTOGROWHEIGHT); + + if (rSdrTextFitWidth.GetValue() == true && rSdrTextFitHeight.GetValue() == true) + { + bHasWrap = true; + bWrap = false; + } + } + if (bBodyPr) { const char* pWrap = (bHasWrap && !bWrap) || bIsFontworkShape ? "none" : nullptr; -- cgit v1.2.3