oox/source/export/shapes.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
New commits: commit daba89f6b6d53c10fbd380b3608fc80f25de1bc0 Author: Michael Meeks <[email protected]> AuthorDate: Mon Oct 6 20:50:39 2025 +0100 Commit: Mike Kaganski <[email protected]> CommitDate: Tue Oct 7 07:41:52 2025 +0200 oox: don't write empty cNvPr descriptions to reduce diff noise. Change-Id: I360dc8eb9dbfb618fff03c96d9447db21b5ddafe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191997 Reviewed-by: Mike Kaganski <[email protected]> Tested-by: Jenkins diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 0e3a2d94e6a6..c150641a2fe5 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -1417,9 +1417,8 @@ void ShapeExport::WriteGraphicObjectShapePart( const Reference< XShape >& xShape presentation::ClickAction eClickAction = presentation::ClickAction_NONE; OUString sDescr, sURL, sBookmark, sPPAction; - bool bHaveDesc; - if ( ( bHaveDesc = GetProperty( xShapeProps, u"Description"_ustr ) ) ) + if ( GetProperty( xShapeProps, u"Description"_ustr ) ) mAny >>= sDescr; if ( GetProperty( xShapeProps, u"URL"_ustr ) ) mAny >>= sURL; @@ -1429,9 +1428,9 @@ void ShapeExport::WriteGraphicObjectShapePart( const Reference< XShape >& xShape mAny >>= eClickAction; pFS->startElementNS( mnXmlNamespace, XML_cNvPr, - XML_id, OString::number(GetNewShapeID(xShape)), - XML_name, GetShapeName(xShape), - XML_descr, sax_fastparser::UseIf(sDescr, bHaveDesc)); + XML_id, OString::number(GetNewShapeID(xShape)), + XML_name, GetShapeName(xShape), + XML_descr, sax_fastparser::UseIf(sDescr, !sDescr.isEmpty())); if (eClickAction != presentation::ClickAction_NONE) {
