dtrans win32: implement support for pasting when the handle type is stream

Desktop / LibreOffice - Miklos Vajna [collabora.com] - 28 January 2020 19:08 EST

Steps to reproduce the problem: select an image in Word on Windows, copy, paste into Writer -> nothing happens. A workaround is to use paste special, and select the metafile paste, not the bitmap one.

The root cause was that clipboard contents on Windows can have different handle types and we only supported the memory and the metafile cases.

An alternative fix would be to handle this at a higher level, e.g. TransferableDataHelper::GetBitmapEx() in vcl could fall back to EMF when the bitmap formats fail, but that would not work for other applications that only offer bitmap formats with a stream handle type.

Change-Id: Iccaaf33df949ee73185acbd55b61d00a12d210ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87649

5d1a540963d1 dtrans win32: implement support for pasting when the handle type is stream
dtrans/source/win32/dtobj/DOTransferable.cxx | 47 +++++++++++++++++++++++++++-
1 file changed, 46 insertions(+), 1 deletion(-)

Upstream: cgit.freedesktop.org


  • Share