diff options
Diffstat (limited to 'desktop/source/deployment')
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_theextmgr.cxx | 7 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_theextmgr.hxx | 4 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_updatedialog.cxx | 9 |
3 files changed, 9 insertions, 11 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx index 579c5bc840f9..65ca88fa73cf 100644 --- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx +++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx @@ -26,6 +26,7 @@ #include "com/sun/star/beans/XPropertySet.hpp" #include "com/sun/star/configuration/theDefaultProvider.hpp" +#include "com/sun/star/frame/Desktop.hpp" #include "dp_gui_dialog2.hxx" #include "dp_gui_extensioncmdqueue.hxx" @@ -91,10 +92,8 @@ TheExtensionManager::TheExtensionManager( Window *pParent, { // the registration should be done after the construction has been ended // otherwise an exception prevents object creation, but it is registered as a listener - m_xDesktop.set( xContext->getServiceManager()->createInstanceWithContext( - OUString("com.sun.star.frame.Desktop"), xContext ), uno::UNO_QUERY ); - if ( m_xDesktop.is() ) - m_xDesktop->addTerminateListener( this ); + m_xDesktop.set( frame::Desktop::create(xContext), uno::UNO_QUERY_THROW ); + m_xDesktop->addTerminateListener( this ); } } diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.hxx b/desktop/source/deployment/gui/dp_gui_theextmgr.hxx index e292baf03532..ec2734e80cee 100644 --- a/desktop/source/deployment/gui/dp_gui_theextmgr.hxx +++ b/desktop/source/deployment/gui/dp_gui_theextmgr.hxx @@ -27,7 +27,7 @@ #include "com/sun/star/container/XNameAccess.hpp" #include "com/sun/star/deployment/XExtensionManager.hpp" #include "com/sun/star/deployment/ExtensionManager.hpp" -#include "com/sun/star/frame/XDesktop.hpp" +#include "com/sun/star/frame/XDesktop2.hpp" #include "com/sun/star/frame/XTerminateListener.hpp" #include "com/sun/star/uno/XComponentContext.hpp" #include "com/sun/star/util/XModifyListener.hpp" @@ -49,7 +49,7 @@ class TheExtensionManager : { private: ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; - ::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::deployment::XExtensionManager > m_xExtensionManager; ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xNameAccessNodes; diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index d41d57f37419..0664071ef5aa 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -49,7 +49,7 @@ #include "com/sun/star/deployment/XExtensionManager.hpp" #include "com/sun/star/deployment/ExtensionManager.hpp" #include "com/sun/star/deployment/XUpdateInformationProvider.hpp" -#include "com/sun/star/frame/XDesktop.hpp" +#include "com/sun/star/frame/Desktop.hpp" #include "com/sun/star/frame/XDispatch.hpp" #include "com/sun/star/frame/XDispatchProvider.hpp" #include "com/sun/star/lang/IllegalArgumentException.hpp" @@ -837,13 +837,12 @@ void UpdateDialog::createNotifyJob( bool bPrepareOnly, util::URL aURL; xNameAccess->getByName(OUSTR("URL")) >>= aURL.Complete; - uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); - uno::Reference < util::XURLTransformer > xTransformer( util::URLTransformer::create(::comphelper::getProcessComponentContext()) ); + uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); + uno::Reference < util::XURLTransformer > xTransformer = util::URLTransformer::create(xContext); xTransformer->parseStrict(aURL); - uno::Reference < frame::XDesktop > xDesktop( xFactory->createInstance( OUSTR( "com.sun.star.frame.Desktop" ) ), - uno::UNO_QUERY_THROW ); + uno::Reference < frame::XDesktop2 > xDesktop = frame::Desktop::create( xContext ); uno::Reference< frame::XDispatchProvider > xDispatchProvider( xDesktop->getCurrentFrame(), uno::UNO_QUERY_THROW ); uno::Reference< frame::XDispatch > xDispatch = xDispatchProvider->queryDispatch(aURL, rtl::OUString(), 0); |