Hi Phillip,

>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. 

ok, I was doing this in my old code, I restored this behaviour.


>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.

when my object window receives a WM_DRAWCLIPBOARD (notification of
change of OS/2 clipboard content), I'm executing this code

OInterfaceContainerHelper* pICHelper = rBHelper.aLC.getContainer( 
        getCppuType( ( Reference< XClipboardListener > * ) 0 ) );
        if ( pICHelper )
{                           
    try
    {
            OInterfaceIteratorHelper iter(*pICHelper);
            m_aContents = 0;
            m_aContents = new Os2Transferable( static_cast<
OWeakObject* >(this) );
            ClipboardEvent aClipbEvent(static_cast<XClipboard*>(this),
m_aContents);
                    while(iter.hasMoreElements())
            {
                    try
                    {
                            Reference<XClipboardListener>
xCBListener(iter.next(), UNO_QUERY);
                            if (xCBListener.is())
                                   
xCBListener->changedContents(aClipbEvent);
                    }
                    catch(RuntimeException&)
                    {
                            OSL_ENSURE( false, "RuntimeException
caught" );
            }                                   
            } 
        }
    catch(const ::com::sun::star::lang::DisposedException&)
    {                           
        OSL_ENSURE(false, "Service Manager disposed");
    }
}


but it only action is to update the unformatted text content of OOo
clipboard.

I need more hints...

TIA,


Bye,

        Yuri Dario

/*
 * member of TeamOS/2 - Italy
 * http://www.os2power.com/yuri
 * http://www.teamos2.it
 */

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to