This is an automated email from the ASF dual-hosted git repository. jimjag pushed a commit to branch odf-devel in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit 2545e06c0604cb52693970b68aaca773b0284a68 Author: Jim Jagielski <[email protected]> AuthorDate: Fri Oct 23 13:40:02 2026 -0400 xmloff: don't write an empty text:p in draw:object --- main/xmloff/source/draw/shapeexport2.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/xmloff/source/draw/shapeexport2.cxx b/main/xmloff/source/draw/shapeexport2.cxx index c215a536c5..7c252d99e4 100644 --- a/main/xmloff/source/draw/shapeexport2.cxx +++ b/main/xmloff/source/draw/shapeexport2.cxx @@ -1668,7 +1668,8 @@ void XMLShapeExport::ImpExportOLE2Shape( SvXMLElementExport aElem( mrExport, XML_NAMESPACE_DRAW, eElem, sal_True, sal_True ); // #i118485# Add text export, the draw OLE shape allows text now - if( mrExport.getDefaultVersion() < SvtSaveOptions::ODFVER_010 || mrExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012 ) ImpExportText( xShape ); + uno::Reference< text::XText > xOleText( xShape, uno::UNO_QUERY ); + if( ( mrExport.getDefaultVersion() < SvtSaveOptions::ODFVER_010 || mrExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012 ) && xOleText.is() && xOleText->getString().getLength() ) ImpExportText( xShape ); if(bExportEmbedded && !bIsEmptyPresObj) {
