sw/source/filter/ww8/docxattributeoutput.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 48bf5a571c76a43fd16276c0ef7a0defecc7897d
Author:     Karthik Godha <[email protected]>
AuthorDate: Mon Dec 22 14:47:31 2025 +0530
Commit:     Michael Stahl <[email protected]>
CommitDate: Mon Dec 29 14:38:32 2025 +0100

    Skip export of <v:imagedata> for empty graphics
    
    This is related to f6b22383258d6ecd93193240b60d6124791d8699, for some
    Draw OLEs graphic can be empty.
    
    Change-Id: I0feac81d8ae33fdbabd426ff2e37c01f911a6f0b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196075
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Michael Stahl <[email protected]>

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 801d7bd09048..b00b509693b5 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -6296,9 +6296,9 @@ void DocxAttributeOutput::WriteOLEShape(const 
SwFlyFrameFormat& rFrameFormat, co
     }
 
     // shape filled with the preview image
-    m_pSerializer->singleElementNS(XML_v, XML_imagedata,
-                                   FSNS(XML_r, XML_id), rImageId,
-                                   FSNS(XML_o, XML_title), "");
+    if (!rImageId.isEmpty())
+        m_pSerializer->singleElementNS(XML_v, XML_imagedata, FSNS(XML_r, 
XML_id), rImageId,
+                                       FSNS(XML_o, XML_title), "");
 
     //export wrap settings
     if (rFrameFormat.GetAnchor().GetAnchorId() != RndStdIds::FLY_AS_CHAR) 
//As-char objs does not have surround.

Reply via email to