sw/source/filter/html/htmlplug.cxx | 3 +++ 1 file changed, 3 insertions(+)
New commits: commit e7fd5af6f65d17cbb3a753544bcab9501e5d1caa Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Mon May 23 16:24:00 2022 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Tue May 24 08:09:57 2022 +0200 sw HTML import: extend list of MIME types recognized as image objects The HTML import sometimes imports <object> elements as embedded objects and sometimes as Writer images. This MIME-type based approach works great to differentiate plain images (with PNG fallback) from real embedded objects, but analysis on some larger document corpus pointed out a few missing entries in this allow-list. Fix the problem by adding a 2nd variant for BMP, TIFF and WMF, which should also count as image, not object. This could be improved further in a later commit by getting a full list of image MIME types we support from VCL. Change-Id: Idb2485012e44b4c7db396b5062e7173f3c85495e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134826 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index bd8446c9ca1e..710cd2f986c7 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -441,6 +441,9 @@ bool SwHTMLParser::InsertEmbed() u"image/svg+xml", u"image/tiff", u"image/x-emf", + u"image/bmp", + u"image/tif", + u"image/wmf", }; if (vAllowlist.find(aType) != vAllowlist.end() && m_aEmbeds.empty())