From 2fab32e831fc02e7efd4069aa0dfc7779d97a9cf Mon Sep 17 00:00:00 2001 From: Malte Timmermann Date: Wed, 2 Jun 2010 13:05:02 +0200 Subject: mtclip01: #i112022# Allow extended clipboard creation --- vcl/source/window/window.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'vcl/source/window') diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index b47aa50a2e72..4ffb52b0e2c9 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -8641,7 +8641,10 @@ Reference< XClipboard > Window::GetClipboard() if( xFactory.is() ) { - mpWindowImpl->mpFrameData->mxClipboard = Reference< XClipboard >( xFactory->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.SystemClipboard" ) ), UNO_QUERY ); + mpWindowImpl->mpFrameData->mxClipboard = Reference< XClipboard >( xFactory->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.SystemClipboardExt" ) ), UNO_QUERY ); + + if( !mpWindowImpl->mpFrameData->mxClipboard.is() ) + mpWindowImpl->mpFrameData->mxClipboard = Reference< XClipboard >( xFactory->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.SystemClipboard" ) ), UNO_QUERY ); #if defined(UNX) && !defined(QUARTZ) // unix clipboard needs to be initialized if( mpWindowImpl->mpFrameData->mxClipboard.is() ) @@ -8703,6 +8706,9 @@ Reference< XClipboard > Window::GetPrimarySelection() # else static Reference< XClipboard > s_xSelection; + if ( !s_xSelection.is() ) + s_xSelection = Reference< XClipboard >( xFactory->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.GenericClipboardExt" ) ), UNO_QUERY ); + if ( !s_xSelection.is() ) s_xSelection = Reference< XClipboard >( xFactory->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.GenericClipboard" ) ), UNO_QUERY ); -- cgit