sw/source/filter/html/htmlplug.cxx | 3 +++ 1 file changed, 3 insertions(+)
New commits: commit 3dd03090ecee3ab9c3c406de0e8013ee2f3cd364 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:44:01 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 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136962 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lu...@collabora.com> diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index ace6570e332b..c6a939646f3a 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -1658,6 +1658,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(OStringConcatenation("</" + rHTMLWrt.GetNamespace() + + OOO_STRING_SVTOOLS_HTML_object ">")); return rWrt; } aGraphicURL = URIHelper::SmartRel2Abs(