sw/source/filter/html/htmlplug.cxx | 3 +++ 1 file changed, 3 insertions(+)
New commits: commit 90361397197d6641ede6658ae5c8d6ff36a10e6e Author: Luboš Luňák <l.lu...@collabora.com> AuthorDate: Mon Jul 11 18:38:18 2022 +0200 Commit: Luboš Luňák <l.lu...@collabora.com> CommitDate: Tue Jul 12 09:46:00 2022 +0200 close object tag if writing out the preview(?) fails When writing out OLE frame, if a picture of it (or is it preview?) is not available, the code bails out, but that leaves the object tag unclosed. Since it sets only a warning and so it appears to be non-fatal, close the tag properly before bailing out. Change-Id: Ib8a6d692b0c3b4cb9ff5bcfe3c964efdaed3dab0 diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index 39a18a4487af..6c8416988b30 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -1668,6 +1668,9 @@ Writer& OutHTML_FrameFormatOLENodeGrf( Writer& rWrt, const SwFrameFormat& rFrame if( nErr ) // error, don't write anything { rHTMLWrt.m_nWarn = WARN_SWG_POOR_LOAD; + if (bObjectOpened) // Still at least close the tag. + rWrt.Strm().WriteOString("</" + rHTMLWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_object + ">"); return rWrt; } aGraphicURL = URIHelper::SmartRel2Abs(