diff options
author | Noel Grandin <noel@peralex.com> | 2013-01-14 16:05:07 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-01-15 09:56:01 +0200 |
commit | 2fe852386c9450014f84910b0a282d684f40b56a (patch) | |
tree | 88a39e3ad180a0266b881f71c3679fed769532fc | |
parent | fdo#46808, Adapt frame::SessionListener UNO service to new style (diff) | |
download | core-2fe852386c9450014f84910b0a282d684f40b56a.tar.gz core-2fe852386c9450014f84910b0a282d684f40b56a.zip |
fdo#46808, Adapt SystemClipboard UNO service to new style
this is the datatransfer::clipboard::SystemClipboard service
Change-Id: I00227a2d84e2f1eaf9ca1ebb4fbe1f1548a6621d
-rw-r--r-- | dtrans/source/win32/clipb/WinClipboard.cxx | 2 | ||||
-rw-r--r-- | dtrans/source/win32/clipb/WinClipboard.hxx | 8 | ||||
-rw-r--r-- | offapi/UnoApi_offapi.mk | 5 | ||||
-rw-r--r-- | offapi/com/sun/star/datatransfer/clipboard/SystemClipboard.idl | 37 | ||||
-rw-r--r-- | offapi/com/sun/star/datatransfer/clipboard/XSystemClipboard.idl | 63 | ||||
-rw-r--r-- | offapi/type_reference/types.rdb | bin | 7440384 -> 7440384 bytes | |||
-rw-r--r-- | toolkit/source/awt/vclxtoolkit.cxx | 12 | ||||
-rw-r--r-- | vcl/aqua/source/dtrans/aqua_clipboard.cxx | 2 | ||||
-rw-r--r-- | vcl/aqua/source/dtrans/aqua_clipboard.hxx | 6 | ||||
-rw-r--r-- | vcl/ios/source/dtrans/ios_clipboard.cxx | 2 | ||||
-rw-r--r-- | vcl/ios/source/dtrans/ios_clipboard.hxx | 6 | ||||
-rw-r--r-- | vcl/source/components/dtranscomp.cxx | 12 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 36 | ||||
-rw-r--r-- | vcl/unx/generic/dtrans/X11_clipboard.cxx | 8 | ||||
-rw-r--r-- | vcl/unx/generic/dtrans/X11_clipboard.hxx | 12 |
15 files changed, 119 insertions, 92 deletions
diff --git a/dtrans/source/win32/clipb/WinClipboard.cxx b/dtrans/source/win32/clipb/WinClipboard.cxx index 4514e299358b..88661c4a3d99 100644 --- a/dtrans/source/win32/clipb/WinClipboard.cxx +++ b/dtrans/source/win32/clipb/WinClipboard.cxx @@ -60,7 +60,7 @@ namespace //------------------------------------------------------------------------ /*XEventListener,*/ CWinClipboard::CWinClipboard( const Reference< XMultiServiceFactory >& rServiceManager, const OUString& aClipboardName ) : - WeakComponentImplHelper4< XClipboardEx, XFlushableClipboard, XClipboardNotifier, XServiceInfo >( m_aCbListenerMutex ), + WeakComponentImplHelper3< XSystemClipboard, XFlushableClipboard, XServiceInfo >( m_aCbListenerMutex ), m_SrvMgr( rServiceManager ) { m_pImpl.reset( new CWinClipbImpl( aClipboardName, this ) ); diff --git a/dtrans/source/win32/clipb/WinClipboard.hxx b/dtrans/source/win32/clipb/WinClipboard.hxx index 9554e298aeb8..a5edc97a2589 100644 --- a/dtrans/source/win32/clipb/WinClipboard.hxx +++ b/dtrans/source/win32/clipb/WinClipboard.hxx @@ -23,12 +23,13 @@ #include <rtl/ustring.hxx> #include <sal/types.h> -#include <cppuhelper/compbase4.hxx> +#include <cppuhelper/compbase3.hxx> #include <com/sun/star/datatransfer/XTransferable.hpp> #include <com/sun/star/datatransfer/clipboard/XClipboardEx.hpp> #include <com/sun/star/datatransfer/clipboard/XClipboardOwner.hpp> #include <com/sun/star/datatransfer/clipboard/XClipboardListener.hpp> #include <com/sun/star/datatransfer/clipboard/XClipboardNotifier.hpp> +#include <com/sun/star/datatransfer/clipboard/XSystemClipboard.hpp> #include <com/sun/star/datatransfer/clipboard/XFlushableClipboard.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> #include <osl/conditn.hxx> @@ -61,10 +62,9 @@ protected: class CWinClipboard : public CWinClipboardDummy, - public cppu::WeakComponentImplHelper4< - ::com::sun::star::datatransfer::clipboard::XClipboardEx, \ + public cppu::WeakComponentImplHelper3< + ::com::sun::star::datatransfer::clipboard::XSystemClipboard, ::com::sun::star::datatransfer::clipboard::XFlushableClipboard, - ::com::sun::star::datatransfer::clipboard::XClipboardNotifier, ::com::sun::star::lang::XServiceInfo > { public: diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk index 2b133498317d..8a5266157ab6 100644 --- a/offapi/UnoApi_offapi.mk +++ b/offapi/UnoApi_offapi.mk @@ -73,6 +73,9 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/datatransf DataFormatTranslator \ MimeContentTypeFactory \ )) +$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/datatransfer/clipboard,\ + SystemClipboard \ +)) $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/deployment,\ ExtensionManager \ PackageInformationProvider \ @@ -615,7 +618,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/configu $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/datatransfer/clipboard,\ ClipboardManager \ GenericClipboard \ - SystemClipboard \ )) $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/datatransfer/dnd,\ OleDragSource \ @@ -2049,6 +2051,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,offapi/com/sun/star/datatransfer/cli XClipboardNotifier \ XClipboardOwner \ XFlushableClipboard \ + XSystemClipboard \ )) $(eval $(call gb_UnoApi_add_idlfiles,offapi,offapi/com/sun/star/datatransfer/dnd,\ DNDConstants \ diff --git a/offapi/com/sun/star/datatransfer/clipboard/SystemClipboard.idl b/offapi/com/sun/star/datatransfer/clipboard/SystemClipboard.idl index 35707087efa6..319dd373eedb 100644 --- a/offapi/com/sun/star/datatransfer/clipboard/SystemClipboard.idl +++ b/offapi/com/sun/star/datatransfer/clipboard/SystemClipboard.idl @@ -20,17 +20,14 @@ #ifndef __com_sun_star_datatransfer_clipboard_SystemClipboard_idl__ #define __com_sun_star_datatransfer_clipboard_SystemClipboard_idl__ -#include <com/sun/star/lang/XComponent.idl> -#include <com/sun/star/lang/XInitialization.idl> +#include <com/sun/star/awt/XDisplayConnection.idl> +#include <com/sun/star/datatransfer/clipboard/XSystemClipboard.idl> +#include <com/sun/star/script/XInvocation.idl> module com { module sun { module star { module datatransfer { module clipboard { - published interface XClipboardEx; - published interface XClipboardNotifier; - published interface XFlushableClipboard; - /** The system clipboard service builds a bridge to the OS specific clipboard interfaces. @@ -42,30 +39,14 @@ module com { module sun { module star { module datatransfer { module clipboard { </ul> It is possible to use clipboards for different selections simultaneously.</p> */ -published service SystemClipboard +published service SystemClipboard : XSystemClipboard { - /** Provides access to the clipboard content. - */ - interface XClipboardEx; - - /** Provides the ability to request notifications on content changes. - */ - interface XClipboardNotifier; - - /** Provides the ability to render the complete clipboard content. This - interface is only available if the method - <member scope="com::sun::star::datatransfer::clipboard">XClipboardEx::getRenderingCapabilities()</member> - returns Persistant - */ - [optional] interface XFlushableClipboard; - - /** Provides the ability to initialize the clipboard - */ - [optional] interface com::sun::star::lang::XInitialization; + createDefault(); - /** For shutdown and listener support. - */ - interface com::sun::star::lang::XComponent; + /** This method is only valid for unix systems (excluding MacOS) */ + createUnix([in] com::sun::star::awt::XDisplayConnection DisplayConnection, + [in] string ClipboardName, + [in] com::sun::star::script::XInvocation BmpConverter); }; diff --git a/offapi/com/sun/star/datatransfer/clipboard/XSystemClipboard.idl b/offapi/com/sun/star/datatransfer/clipboard/XSystemClipboard.idl new file mode 100644 index 000000000000..a3c054fa402f --- /dev/null +++ b/offapi/com/sun/star/datatransfer/clipboard/XSystemClipboard.idl @@ -0,0 +1,63 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_datatransfer_clipboard_XSystemClipboard_idl__ +#define __com_sun_star_datatransfer_clipboard_XSystemClipboard_idl__ + +#include <com/sun/star/lang/XComponent.idl> +#include <com/sun/star/datatransfer/clipboard/XClipboardEx.idl> +#include <com/sun/star/datatransfer/clipboard/XClipboardNotifier.idl> +#include <com/sun/star/datatransfer/clipboard/XFlushableClipboard.idl> + +module com { module sun { module star { module datatransfer { module clipboard { + + +/** + Provides a unified interface for new-style service SystemClipboard. + + @since LibreOffice 4.1 +*/ +published interface XSystemClipboard +{ + /** Provides access to the clipboard content. + */ + interface XClipboardEx; + + /** Provides the ability to request notifications on content changes. + */ + interface XClipboardNotifier; + + /** Provides the ability to render the complete clipboard content. This + interface is only available if the method + <member scope="com::sun::star::datatransfer::clipboard">XClipboardEx::getRenderingCapabilities()</member> + returns Persistant + */ + [optional] interface XFlushableClipboard; + + /** For shutdown and listener support. + */ + interface com::sun::star::lang::XComponent; +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/type_reference/types.rdb b/offapi/type_reference/types.rdb Binary files differindex 0987584e1edf..75de5a2cff35 100644 --- a/offapi/type_reference/types.rdb +++ b/offapi/type_reference/types.rdb diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index 527188b0efdb..67bd7c52aab2 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -42,6 +42,7 @@ #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/uno/XInterface.hpp> #include <com/sun/star/beans/NamedValue.hpp> +#include <com/sun/star/datatransfer/clipboard/SystemClipboard.hpp> #include <cppuhelper/typeprovider.hxx> #include <osl/conditn.hxx> #include <rtl/uuid.h> @@ -1334,13 +1335,10 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( { if( !mxClipboard.is() ) { - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory(); - if ( xFactory.is() ) - { - // remember clipboard here - mxClipboard = ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard > ( - xFactory->createInstance( ::rtl::OUString("com.sun.star.datatransfer.clipboard.SystemClipboard") ), ::com::sun::star::uno::UNO_QUERY ); - } + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext(); + // remember clipboard here + mxClipboard = ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard > ( + ::com::sun::star::datatransfer::clipboard::SystemClipboard::createDefault(xContext), ::com::sun::star::uno::UNO_QUERY ); } return mxClipboard; diff --git a/vcl/aqua/source/dtrans/aqua_clipboard.cxx b/vcl/aqua/source/dtrans/aqua_clipboard.cxx index db6c3b0a0558..06b4e487debe 100644 --- a/vcl/aqua/source/dtrans/aqua_clipboard.cxx +++ b/vcl/aqua/source/dtrans/aqua_clipboard.cxx @@ -82,7 +82,7 @@ Sequence<OUString> clipboard_getSupportedServiceNames() AquaClipboard::AquaClipboard(NSPasteboard* pasteboard, bool bUseSystemPasteboard) : - WeakComponentImplHelper4<XClipboardEx, XClipboardNotifier, XFlushableClipboard, XServiceInfo>(m_aMutex), + WeakComponentImplHelper3<XSystemClipboard, XFlushableClipboard, XServiceInfo>(m_aMutex), mIsSystemPasteboard(bUseSystemPasteboard) { Reference<XMultiServiceFactory> mrServiceMgr = comphelper::getProcessServiceFactory(); diff --git a/vcl/aqua/source/dtrans/aqua_clipboard.hxx b/vcl/aqua/source/dtrans/aqua_clipboard.hxx index 40e471ed26da..a12a3ec20f5e 100644 --- a/vcl/aqua/source/dtrans/aqua_clipboard.hxx +++ b/vcl/aqua/source/dtrans/aqua_clipboard.hxx @@ -23,12 +23,13 @@ #include "DataFlavorMapping.hxx" #include <rtl/ustring.hxx> #include <sal/types.h> -#include <cppuhelper/compbase4.hxx> +#include <cppuhelper/compbase3.hxx> #include <com/sun/star/datatransfer/XTransferable.hpp> #include <com/sun/star/datatransfer/clipboard/XClipboardEx.hpp> #include <com/sun/star/datatransfer/clipboard/XClipboardOwner.hpp> #include <com/sun/star/datatransfer/clipboard/XClipboardListener.hpp> #include <com/sun/star/datatransfer/clipboard/XClipboardNotifier.hpp> +#include <com/sun/star/datatransfer/clipboard/XSystemClipboard.hpp> #include <com/sun/star/datatransfer/XMimeContentTypeFactory.hpp> #include <com/sun/star/datatransfer/clipboard/XFlushableClipboard.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> @@ -63,8 +64,7 @@ class AquaClipboard; class AquaClipboard : public ::cppu::BaseMutex, - public ::cppu::WeakComponentImplHelper4< com::sun::star::datatransfer::clipboard::XClipboardEx, - com::sun::star::datatransfer::clipboard::XClipboardNotifier, + public ::cppu::WeakComponentImplHelper3< com::sun::star::datatransfer::clipboard::XSystemClipboard, com::sun::star::datatransfer::clipboard::XFlushableClipboard, com::sun::star::lang::XServiceInfo >, private ::boost::noncopyable diff --git a/vcl/ios/source/dtrans/ios_clipboard.cxx b/vcl/ios/source/dtrans/ios_clipboard.cxx index 8b75fd7ebc2e..03c8c9c7e629 100644 --- a/vcl/ios/source/dtrans/ios_clipboard.cxx +++ b/vcl/ios/source/dtrans/ios_clipboard.cxx @@ -81,7 +81,7 @@ Sequence<OUString> clipboard_getSupportedServiceNames() IosClipboard::IosClipboard(UIPasteboard* pasteboard, bool bUseSystemPasteboard) : - WeakComponentImplHelper4<XClipboardEx, XClipboardNotifier, XFlushableClipboard, XServiceInfo>(m_aMutex), + WeakComponentImplHelper3<XSystemClipboard, XFlushableClipboard, XServiceInfo>(m_aMutex), mIsSystemPasteboard(bUseSystemPasteboard) { Reference<XMultiServiceFactory> mrServiceMgr = comphelper::getProcessServiceFactory(); diff --git a/vcl/ios/source/dtrans/ios_clipboard.hxx b/vcl/ios/source/dtrans/ios_clipboard.hxx index 1b67022a94ce..1c3dc40392af 100644 --- a/vcl/ios/source/dtrans/ios_clipboard.hxx +++ b/vcl/ios/source/dtrans/ios_clipboard.hxx @@ -22,12 +22,13 @@ #include <rtl/ustring.hxx> #include <sal/types.h> -#include <cppuhelper/compbase4.hxx> +#include <cppuhelper/compbase3.hxx> #include <com/sun/star/datatransfer/XTransferable.hpp> #include <com/sun/star/datatransfer/clipboard/XClipboardEx.hpp> #include <com/sun/star/datatransfer/clipboard/XClipboardOwner.hpp> #include <com/sun/star/datatransfer/clipboard/XClipboardListener.hpp> #include <com/sun/star/datatransfer/clipboard/XClipboardNotifier.hpp> +#include <com/sun/star/datatransfer/clipboard/XSystemClipboard.hpp> #include <com/sun/star/datatransfer/XMimeContentTypeFactory.hpp> #include <com/sun/star/datatransfer/clipboard/XFlushableClipboard.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> @@ -62,8 +63,7 @@ class IosClipboard; class IosClipboard : public ::cppu::BaseMutex, - public ::cppu::WeakComponentImplHelper4< com::sun::star::datatransfer::clipboard::XClipboardEx, - com::sun::star::datatransfer::clipboard::XClipboardNotifier, + public ::cppu::WeakComponentImplHelper3< com::sun::star::datatransfer::clipboard::XSystemClipboard, com::sun::star::datatransfer::clipboard::XFlushableClipboard, com::sun::star::lang::XServiceInfo >, private ::boost::noncopyable diff --git a/vcl/source/components/dtranscomp.cxx b/vcl/source/components/dtranscomp.cxx index 88242e5e8849..18881de9e0cb 100644 --- a/vcl/source/components/dtranscomp.cxx +++ b/vcl/source/components/dtranscomp.cxx @@ -34,13 +34,13 @@ #include "com/sun/star/datatransfer/clipboard/XClipboardEx.hpp" #include "com/sun/star/datatransfer/clipboard/XClipboardNotifier.hpp" #include "com/sun/star/datatransfer/clipboard/XClipboardListener.hpp" +#include "com/sun/star/datatransfer/clipboard/XSystemClipboard.hpp" #include "com/sun/star/datatransfer/dnd/XDragSource.hpp" #include "com/sun/star/datatransfer/dnd/XDropTarget.hpp" #include "com/sun/star/datatransfer/dnd/DNDConstants.hpp" #include "cppuhelper/compbase1.hxx" #include "cppuhelper/compbase2.hxx" -#include "cppuhelper/compbase3.hxx" #include "cppuhelper/implbase1.hxx" using rtl::OUString; @@ -54,9 +54,8 @@ namespace vcl { // generic implementation to satisfy SalInstance class GenericClipboard : - public cppu::WeakComponentImplHelper3 < - datatransfer::clipboard::XClipboardEx, - datatransfer::clipboard::XClipboardNotifier, + public cppu::WeakComponentImplHelper2 < + datatransfer::clipboard::XSystemClipboard, XServiceInfo > { @@ -70,9 +69,8 @@ class GenericClipboard : public: - GenericClipboard() : cppu::WeakComponentImplHelper3< - datatransfer::clipboard::XClipboardEx, - datatransfer::clipboard::XClipboardNotifier, + GenericClipboard() : cppu::WeakComponentImplHelper2< + datatransfer::clipboard::XSystemClipboard, XServiceInfo >( m_aMutex ) {} diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 4e926f936e07..eac1351ced80 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -79,6 +79,7 @@ #include "com/sun/star/datatransfer/dnd/XDragSource.hpp" #include "com/sun/star/datatransfer/dnd/XDropTarget.hpp" #include "com/sun/star/datatransfer/clipboard/XClipboard.hpp" +#include "com/sun/star/datatransfer/clipboard/SystemClipboard.hpp" #include "com/sun/star/awt/XTopWindow.hpp" #include "com/sun/star/awt/XDisplayConnection.hpp" #include "com/sun/star/lang/XInitialization.hpp" @@ -8429,30 +8430,21 @@ uno::Reference< XClipboard > Window::GetClipboard() try { uno::Reference< XMultiServiceFactory > xFactory( comphelper::getProcessServiceFactory() ); + uno::Reference< XComponentContext > xContext( comphelper::getProcessComponentContext() ); mpWindowImpl->mpFrameData->mxClipboard = uno::Reference< XClipboard >( xFactory->createInstance( OUString("com.sun.star.datatransfer.clipboard.SystemClipboardExt") ), UNO_QUERY ); if( !mpWindowImpl->mpFrameData->mxClipboard.is() ) - mpWindowImpl->mpFrameData->mxClipboard = uno::Reference< XClipboard >( xFactory->createInstance( OUString("com.sun.star.datatransfer.clipboard.SystemClipboard") ), UNO_QUERY ); - -#if defined(UNX) && !defined(MACOSX) // unix clipboard needs to be initialized - if( mpWindowImpl->mpFrameData->mxClipboard.is() ) { - uno::Reference< XInitialization > xInit = uno::Reference< XInitialization >( mpWindowImpl->mpFrameData->mxClipboard, UNO_QUERY ); - - if( xInit.is() ) - { - Sequence< Any > aArgumentList( 3 ); - aArgumentList[ 0 ] = makeAny( Application::GetDisplayConnection() ); - aArgumentList[ 1 ] = makeAny( OUString("CLIPBOARD") ); - aArgumentList[ 2 ] = makeAny( vcl::createBmpConverter() ); - - xInit->initialize( aArgumentList ); - } - } + Reference<XSystemClipboard> xSystemClipboard; +#if defined(UNX) && !defined(MACOSX) // unix clipboard needs to be initialized + xSystemClipboard = SystemClipboard::createUnix( xContext, Application::GetDisplayConnection(), "CLIPBOARD", vcl::createBmpConverter() ); +#else + xSystemClipboard = SystemClipboard::createDefault(xContext); #endif + mpWindowImpl->mpFrameData->mxClipboard = uno::Reference< XClipboard >( xSystemClipboard, UNO_QUERY ); + } } - // createInstance can throw any exception catch (const Exception&) { @@ -8480,15 +8472,11 @@ uno::Reference< XClipboard > Window::GetPrimarySelection() try { uno::Reference< XMultiServiceFactory > xFactory( comphelper::getProcessServiceFactory() ); + uno::Reference< XComponentContext > xContext( comphelper::getProcessComponentContext() ); #if defined(UNX) && !defined(MACOSX) - Sequence< Any > aArgumentList( 3 ); - aArgumentList[ 0 ] = makeAny( Application::GetDisplayConnection() ); - aArgumentList[ 1 ] = makeAny( OUString("PRIMARY") ); - aArgumentList[ 2 ] = makeAny( vcl::createBmpConverter() ); - - mpWindowImpl->mpFrameData->mxSelection = uno::Reference< XClipboard >( xFactory->createInstanceWithArguments( - OUString("com.sun.star.datatransfer.clipboard.SystemClipboard"), aArgumentList ), UNO_QUERY ); + Reference<XSystemClipboard> xSystemClipboard = SystemClipboard::createUnix( xContext, Application::GetDisplayConnection(), "CLIPBOARD", vcl::createBmpConverter() ); + mpWindowImpl->mpFrameData->mxSelection = uno::Reference< XClipboard >( xSystemClipboard, UNO_QUERY ); # else static uno::Reference< XClipboard > s_xSelection; diff --git a/vcl/unx/generic/dtrans/X11_clipboard.cxx b/vcl/unx/generic/dtrans/X11_clipboard.cxx index d0b2a7389714..dee55c4b47c1 100644 --- a/vcl/unx/generic/dtrans/X11_clipboard.cxx +++ b/vcl/unx/generic/dtrans/X11_clipboard.cxx @@ -47,11 +47,9 @@ using namespace x11; using ::rtl::OUString; X11Clipboard::X11Clipboard( SelectionManager& rManager, Atom aSelection ) : - ::cppu::WeakComponentImplHelper4< - ::com::sun::star::datatransfer::clipboard::XClipboardEx, - ::com::sun::star::datatransfer::clipboard::XClipboardNotifier, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::lang::XInitialization + ::cppu::WeakComponentImplHelper2< + ::com::sun::star::datatransfer::clipboard::XSystemClipboard, + ::com::sun::star::lang::XServiceInfo >( rManager.getMutex() ), m_rSelectionManager( rManager ), diff --git a/vcl/unx/generic/dtrans/X11_clipboard.hxx b/vcl/unx/generic/dtrans/X11_clipboard.hxx index 05b6b5a46cfb..19f56e842780 100644 --- a/vcl/unx/generic/dtrans/X11_clipboard.hxx +++ b/vcl/unx/generic/dtrans/X11_clipboard.hxx @@ -23,9 +23,9 @@ #include <X11_selection.hxx> #include <com/sun/star/datatransfer/clipboard/XClipboardEx.hpp> - #include <com/sun/star/datatransfer/clipboard/XClipboardNotifier.hpp> -#include <cppuhelper/compbase4.hxx> +#include <com/sun/star/datatransfer/clipboard/XSystemClipboard.hpp> +#include <cppuhelper/compbase2.hxx> // ------------------------------------------------------------------------ @@ -34,11 +34,9 @@ namespace x11 { class X11Clipboard : - public ::cppu::WeakComponentImplHelper4 < - ::com::sun::star::datatransfer::clipboard::XClipboardEx, - ::com::sun::star::datatransfer::clipboard::XClipboardNotifier, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::lang::XInitialization + public ::cppu::WeakComponentImplHelper2 < + ::com::sun::star::datatransfer::clipboard::XSystemClipboard, + ::com::sun::star::lang::XServiceInfo >, public SelectionAdaptor { |