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 /toolkit | |
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
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/source/awt/vclxtoolkit.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
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; |