summaryrefslogtreecommitdiff
path: root/sw/source/filter/html/htmlplug.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-08-26 10:02:09 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-08-26 10:13:45 +0200
commit58fc5c6a5153b68470f7de8229b76dca04267ab7 (patch)
tree72bc776c78f58ccd2ef300fbf2f685aa539056ef /sw/source/filter/html/htmlplug.cxx
parentdf1b30925050dc6774b52d4bfabb0fb552930896 (diff)
sw HTML export: avoid <table> directly inside <p>
Wrapping the embedded object output in a <span> at least makes the parser errors go away. Change-Id: I010d0257b5386a36f40103e3531737db6937ce85
Diffstat (limited to 'sw/source/filter/html/htmlplug.cxx')
-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 3705a0785e7f..1881b1779366 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -1285,7 +1285,10 @@ Writer& OutHTML_FrmFmtOLENodeGrf( Writer& rWrt, const SwFrmFmt& rFrmFmt,
aMediaDescriptor["OutputStream"] <<= xOutputStream;
xStorable->storeToURL("private:stream", aMediaDescriptor.getAsConstPropertyValueList());
OString aData(reinterpret_cast<const char*>(aStream.GetData()), aStream.GetSize());
+ // Wrap output in a <span> tag to avoid 'HTML parser error: Unexpected end tag: p'
+ HTMLOutFuncs::Out_AsciiTag(rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_span);
rWrt.Strm().WriteCharPtr(aData.getStr());
+ HTMLOutFuncs::Out_AsciiTag(rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_span, false);
}
return rWrt;