diff options
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/dtrans/X11_selection.cxx | 11 | ||||
-rw-r--r-- | vcl/unx/generic/dtrans/X11_selection.hxx | 4 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 3 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx | 5 | ||||
-rw-r--r-- | vcl/unx/gtk/gdi/salprn-gtk.cxx | 5 |
5 files changed, 11 insertions, 17 deletions
diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx index 9c11fe0587d2..d4cccb2488bc 100644 --- a/vcl/unx/generic/dtrans/X11_selection.cxx +++ b/vcl/unx/generic/dtrans/X11_selection.cxx @@ -59,6 +59,7 @@ #include <com/sun/star/datatransfer/dnd/DNDConstants.hpp> #include <com/sun/star/awt/MouseEvent.hpp> #include <com/sun/star/awt/MouseButton.hpp> +#include <com/sun/star/frame/Desktop.hpp> #include <rtl/tencinfo.h> #include <osl/process.h> @@ -3746,13 +3747,9 @@ void SelectionManager::run( void* pThis ) timeval aLast; gettimeofday( &aLast, 0 ); - css::uno::Reference< XMultiServiceFactory > xFact( ::comphelper::getProcessServiceFactory() ); - if( xFact.is() ) - { - This->m_xDesktop.set(xFact->createInstance( ::rtl::OUString("com.sun.star.frame.Desktop") ), UNO_QUERY); - if (This->m_xDesktop.is()) - This->m_xDesktop->addTerminateListener(This); - } + css::uno::Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); + This->m_xDesktop.set( Desktop::create(xContext) ); + This->m_xDesktop->addTerminateListener(This); while( osl_scheduleThread(This->m_aThread) ) { diff --git a/vcl/unx/generic/dtrans/X11_selection.hxx b/vcl/unx/generic/dtrans/X11_selection.hxx index 95e9e98813f3..823cd5f259b7 100644 --- a/vcl/unx/generic/dtrans/X11_selection.hxx +++ b/vcl/unx/generic/dtrans/X11_selection.hxx @@ -29,7 +29,7 @@ #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/script/XInvocation.hpp> -#include <com/sun/star/frame/XDesktop.hpp> +#include <com/sun/star/frame/XDesktop2.hpp> #include <osl/thread.h> #include <osl/conditn.hxx> @@ -253,7 +253,7 @@ namespace x11 { oslThread m_aDragExecuteThread; ::osl::Condition m_aDragRunning; XLIB_Window m_aWindow; - com::sun::star::uno::Reference< ::com::sun::star::frame::XDesktop > m_xDesktop; + com::sun::star::uno::Reference< ::com::sun::star::frame::XDesktop2 > m_xDesktop; com::sun::star::uno::Reference< ::com::sun::star::awt::XDisplayConnection > m_xDisplayConnection; com::sun::star::uno::Reference< com::sun::star::script::XInvocation > diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx index b4f1c6a0418b..386395b3bbe8 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx @@ -24,6 +24,7 @@ #endif #include <com/sun/star/awt/Toolkit.hpp> +#include <com/sun/star/frame/Desktop.hpp> #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp> #include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp> @@ -971,7 +972,7 @@ sal_Int16 SAL_CALL SalGtkFilePicker::execute() throw( uno::RuntimeException ) UNO_QUERY_THROW ); uno::Reference< frame::XDesktop > xDesktop( - createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")) ), + frame::Desktop::create(m_xContext), UNO_QUERY_THROW ); RunDialog* pRunDialog = new RunDialog(m_pDialog, xToolkit, xDesktop); diff --git a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx index 931f197a9242..4da4b1e74040 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx @@ -24,6 +24,7 @@ #endif #include <com/sun/star/awt/Toolkit.hpp> +#include <com/sun/star/frame/Desktop.hpp> #include <com/sun/star/lang/XMultiComponentFactory.hpp> #include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp> #include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp> @@ -140,9 +141,7 @@ sal_Int16 SAL_CALL SalGtkFolderPicker::execute() throw( uno::RuntimeException ) awt::Toolkit::create(m_xContext), uno::UNO_QUERY); - uno::Reference< frame::XDesktop > xDesktop( - createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")) ), - uno::UNO_QUERY); + uno::Reference< frame::XDesktop > xDesktop( frame::Desktop::create(m_xContext), uno::UNO_QUERY); RunDialog* pRunDialog = new RunDialog(m_pDialog, xToolkit, xDesktop); uno::Reference < awt::XTopWindowListener > xLifeCycle(pRunDialog); diff --git a/vcl/unx/gtk/gdi/salprn-gtk.cxx b/vcl/unx/gtk/gdi/salprn-gtk.cxx index 79a94327589d..e787bae6e96a 100644 --- a/vcl/unx/gtk/gdi/salprn-gtk.cxx +++ b/vcl/unx/gtk/gdi/salprn-gtk.cxx @@ -938,10 +938,7 @@ GtkPrintDialog::run() #if 0 void GtkPrintDialog::ExportAsPDF(const rtl::OUString &rFileURL, GtkPrintSettings *pSettings) const { - uno::Reference < XFramesSupplier > xDesktop = - uno::Reference < XFramesSupplier >( - ::comphelper::getProcessServiceFactory()-> - createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop"))), UNO_QUERY); + uno::Reference < XDesktop2 > xDesktop = Desktop::create( ::comphelper::getProcessComponentContext() ); uno::Reference < XFrame > xFrame(xDesktop->getActiveFrame()); if (!xFrame.is()) xFrame = uno::Reference < XFrame >(xDesktop, UNO_QUERY); |