<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - Clipboard Managers in Windows 10 or MacOS don't seem to work in LibreOffice"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=142565#c5">Comment # 5</a>
on <a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - Clipboard Managers in Windows 10 or MacOS don't seem to work in LibreOffice"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=142565">bug 142565</a>
from <span class="vcard"><a class="email" href="mailto:mikekaganski@hotmail.com" title="Mike Kaganski <mikekaganski@hotmail.com>"> <span class="fn">Mike Kaganski</span></a>
</span></b>
<pre>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.)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>