diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2022-07-11 18:38:18 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2022-07-12 09:46:00 +0200 |
commit | 90361397197d6641ede6658ae5c8d6ff36a10e6e (patch) | |
tree | af84e3bb2ff7136daf70fcf3c307cdc6015a7ade | |
parent | 9e258d95dc0cb5eaaf7479670eb98324718caf73 (diff) |
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
-rw-r--r-- | sw/source/filter/html/htmlplug.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
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( |