summaryrefslogtreecommitdiff
path: root/sw/source/filter/html
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2022-07-11 18:38:18 +0200
committerLuboš Luňák <l.lunak@collabora.com>2022-07-12 09:46:37 +0200
commitc331438be97f95313ec0c21de5bc5989f2c3e03d (patch)
treebac9a2f4358e85336db78122b9e2c1482be4fbd3 /sw/source/filter/html
parent8204426373add3d2e7e34c75b4f9415677e7ba9e (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 (cherry picked from commit 90361397197d6641ede6658ae5c8d6ff36a10e6e)
Diffstat (limited to 'sw/source/filter/html')
-rw-r--r--sw/source/filter/html/htmlplug.cxx3
1 files changed, 3 insertions, 0 deletions
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(