oox/source/export/shapes.cxx |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

New commits:
commit 7223808ed6b74c8429cb4d1418629998a743ac90
Author:     Michael Meeks <[email protected]>
AuthorDate: Mon Oct 6 20:50:39 2025 +0100
Commit:     Mike Kaganski <[email protected]>
CommitDate: Tue Oct 7 07:08:11 2025 +0200

    oox: don't write empty cNvPr descriptions to reduce diff noise.
    
    Change-Id: I360dc8eb9dbfb618fff03c96d9447db21b5ddafe
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191984
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Mike Kaganski <[email protected]>

diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index b4062cda91f5..16f574b4b40e 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -1421,9 +1421,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;
@@ -1433,9 +1432,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)
     {

Reply via email to