Yuri Dario wrote:
Hi,
while migrating the source code from 2.0.3 to 2.0.4, I have broken the
OS/2 clipboard support for text data.
While in .3 I was able to exchange text data with the OS/2 clipboard in
both directions, now with .4 the same code is no longer working as
expected.
AFAIK there were no changes to the clipboard workflow from 2.0.3 to
2.0.4, sorry.
I can paste OS/2 text to OOo without problems until I select some text
in the document window and click on Edit menu and then Copy. Text is
copied to OS/2 clipboard as expected.
But now changes to OS/2 clipboard are not recognized by OOo clipboard
object: my code
Reference< XTransferable > SAL_CALL Os2Clipboard::getContents() throw(
RuntimeException )
{
MutexGuard aGuard(m_aMutex);
m_aContents = new Os2Transferable( static_cast< OWeakObject*
(this) );
return m_aContents;
}
As far as i know ::getContents should return what was set with
::setContents (this is the case where OOo pushes data to the clipboard
and owns the clipboard afterwards). You should only return your own
transferable if OOo is not currently the clipboard owner. If OOo looses
clipboard ownership you should clear the set transferable (m_aContents
in this case is guess) and sent the clipboard listeners (set via the
XClipboardNotifier interface) a message that the clipboard content has
changed.
Kind regards, pl
--
If you give someone a program, you will frustrate them for a day;
if you teach them how to program, you will frustrate them for a lifetime.
-- Author unknown
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]