tdf#145875 don't open Insert section dialog when pasting image
commitdaafc32c5625757091e7cf80711a18639bd36bf0
authorSzymon Kłos <szymon.klos@collabora.com>
Fri, 27 May 2022 12:50:21 +0000 (27 14:50 +0200)
committerCaolán McNamara <caolanm@redhat.com>
Mon, 30 May 2022 18:57:55 +0000 (30 20:57 +0200)
tree3d2a387d1c497c269acd749f2b7e392f7eae020e
parenta4412bff3ed4b193f791ac1168fb7010c2936a1f
tdf#145875 don't open Insert section dialog when pasting image

This happens when we "copy image" in Firefox of the resource which
cannot be accessed without logging in on some website.

In that case we used HTML format and that resulted in pasting
login webpage as a section.

This patch detects simple HTML containing only an image while it also
contains BITMAP format in the clipboard which we can use directly.
That way we paste image data from the clipboard.

Change-Id: Ia2ee7e246f8c71e1d0958c6c955ec056a0a96f8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135011
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit 0599a73c3c2bffdbfa4e695e2d694f1947215a07)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135013
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
sw/source/uibase/dochdl/swdtflvr.cxx