sw/source/filter/html/htmlplug.cxx | 3 +++ 1 file changed, 3 insertions(+)
New commits: commit c331438be97f95313ec0c21de5bc5989f2c3e03d Author: Luboš Luňák <[email protected]> AuthorDate: Mon Jul 11 18:38:18 2022 +0200 Commit: Luboš Luňák <[email protected]> CommitDate: Tue Jul 12 09:46:37 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 (cherry picked from commit 90361397197d6641ede6658ae5c8d6ff36a10e6e) diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index 5fd6b3e54d7b..169eaae84637 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -1650,6 +1650,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(
