[Libreoffice-bugs] [Bug 142565] Clipboard Managers in Windows 10 or MacOS don't seem to work in LibreOffice

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon May 31 06:25:14 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=142565

--- Comment #5 from Mike Kaganski <mikekaganski at hotmail.com> ---
Interesting issue.

MS has indeed implemented yet another awful "clipboard manager", which is
unexpected, given that they are the owners of their own clipboard, and have all
capabilities to create something proper. Specifically, their saved clipboard
entry is not complete - it advertises a BITMAP format, and it's empty (0
bytes). So when they copy the current item to their history, they obviously do
not render it properly. (But could that be our code that does not allow then
rendering? The idea that it's MS code that doesn't render BITMAP properly is
based on "gut feeling" actually.)

However, our code indeed does something strange here at least *when pasting*.
When deciding which of the advertised formats to use, it first checks which
user action to perform - using a ordered list of "default actions"
(pEntry->aDefaultActions) in GetTransferableAction_Impl, where it first finds a
match "HTML_NO_COMMENT" and its associated action "EXCHG_IN_ACTION_COPY". Then
back in SotExchange::GetExchangeAction, it uses this action id to look inside
*another* ordered list of actions - namely, pEntry->aCopyActions is passed to
GetTransferableAction_Impl. This time it gets a match of BITMAP, and the action
is EXCHG_OUT_ACTION_INSERT_BITMAP. I don't quite see how finding
HTML_NO_COMMENT first could be a direction to look for another match in a
different list. So in the end we try to paste the bitmap, and naturally fail,
because the format is invalid in the manager.

(I do not plan to work on this; putting it here in hope that it could be useful
to whoever wants to take this. My idea would be to test first what happens when
the clipboard entry gets replaced by another entry: how is the rendering
performed, and why does it end up invalid - if it's LibreOffice code fault.)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210531/de148c5b/attachment.htm>


More information about the Libreoffice-bugs mailing list