Author: arielch
Date: Fri Jan 4 19:58:16 2013
New Revision: 1429072
URL: http://svn.apache.org/viewvc?rev=1429072&view=rev
Log:
i121578 - Convert css.system.SystemShellExectue to new-style
Adapt the office code to use the new-style service constructor
Modified:
openoffice/trunk/main/cui/source/dialogs/about.cxx
openoffice/trunk/main/cui/source/options/optimprove.cxx
openoffice/trunk/main/cui/source/options/optimprove2.cxx
openoffice/trunk/main/cui/source/options/optlingu.cxx
openoffice/trunk/main/desktop/source/app/app.cxx
openoffice/trunk/main/desktop/source/deployment/gui/dp_gui_dialog2.cxx
openoffice/trunk/main/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
openoffice/trunk/main/embeddedobj/source/msole/oleembed.cxx
openoffice/trunk/main/extensions/source/update/check/updatecheck.cxx
openoffice/trunk/main/framework/inc/dispatch/mailtodispatcher.hxx
openoffice/trunk/main/framework/inc/dispatch/systemexec.hxx
openoffice/trunk/main/framework/inc/pch/precompiled_framework.hxx
openoffice/trunk/main/framework/inc/services.h
openoffice/trunk/main/framework/source/dispatch/mailtodispatcher.cxx
openoffice/trunk/main/framework/source/dispatch/systemexec.cxx
openoffice/trunk/main/framework/source/jobs/shelljob.cxx
openoffice/trunk/main/framework/source/services/backingwindow.cxx
openoffice/trunk/main/sfx2/source/appl/appopen.cxx
openoffice/trunk/main/sfx2/source/appl/appserv.cxx
openoffice/trunk/main/sfx2/source/view/viewsh.cxx
openoffice/trunk/main/shell/source/win32/workbench/TestSysShExec.cxx
openoffice/trunk/main/svtools/source/contnr/templwin.cxx
openoffice/trunk/main/swext/mediawiki/src/com/sun/star/wiki/Helper.java
openoffice/trunk/main/toolkit/source/awt/vclxwindows.cxx
openoffice/trunk/main/uui/source/newerverwarn.cxx
Modified: openoffice/trunk/main/cui/source/dialogs/about.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/dialogs/about.cxx?rev=1429072&r1=1429071&r2=1429072&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/dialogs/about.cxx (original)
+++ openoffice/trunk/main/cui/source/dialogs/about.cxx Fri Jan 4 19:58:16 2013
@@ -46,7 +46,7 @@
#include <vcl/tabpage.hxx>
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
-#include <com/sun/star/system/XSystemShellExecute.hpp>
+#include <com/sun/star/system/SystemShellExecute.hpp>
#include <com/sun/star/uno/Any.h>
#include "about.hxx"
@@ -532,13 +532,9 @@ IMPL_LINK ( AboutDialog, OpenLinkHdl_Imp
{
try
{
- uno::Reference< uno::XComponentContext > xContext =
- ::comphelper::getProcessComponentContext();
uno::Reference< com::sun::star::system::XSystemShellExecute >
xSystemShell(
- xContext->getServiceManager()->createInstanceWithContext(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.system.SystemShellExecute" ) ),
- xContext ),
- uno::UNO_QUERY_THROW );
+ com::sun::star::system::SystemShellExecute::create(
+ ::comphelper::getProcessComponentContext() ) );
if ( xSystemShell.is() )
xSystemShell->execute( sURL, rtl::OUString(),
com::sun::star::system::SystemShellExecuteFlags::DEFAULTS );
}
Modified: openoffice/trunk/main/cui/source/options/optimprove.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/options/optimprove.cxx?rev=1429072&r1=1429071&r2=1429072&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/options/optimprove.cxx (original)
+++ openoffice/trunk/main/cui/source/options/optimprove.cxx Fri Jan 4 19:58:16
2013
@@ -38,7 +38,7 @@
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/system/XSystemShellExecute.hpp>
+#include <com/sun/star/system/SystemShellExecute.hpp>
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <com/sun/star/oooimprovement/XCoreController.hpp>
#include <comphelper/configurationhelper.hxx>
@@ -142,12 +142,9 @@ IMPL_LINK( SvxImprovementDialog, HandleH
{
try
{
- uno::Reference< lang::XMultiServiceFactory > xSMGR =
- ::comphelper::getProcessServiceFactory();
uno::Reference< XSystemShellExecute > xSystemShell(
- xSMGR->createInstance( ::rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.system.SystemShellExecute" ) ) ),
- uno::UNO_QUERY_THROW );
+ com::sun::star::system::SystemShellExecute::create(
+ ::comphelper::getProcessComponentContext() ) );
if ( xSystemShell.is() )
{
xSystemShell->execute(
Modified: openoffice/trunk/main/cui/source/options/optimprove2.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/options/optimprove2.cxx?rev=1429072&r1=1429071&r2=1429072&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/options/optimprove2.cxx (original)
+++ openoffice/trunk/main/cui/source/options/optimprove2.cxx Fri Jan 4
19:58:16 2013
@@ -40,7 +40,7 @@
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/oooimprovement/XCore.hpp>
#include <com/sun/star/oooimprovement/XCoreController.hpp>
-#include <com/sun/star/system/XSystemShellExecute.hpp>
+#include <com/sun/star/system/SystemShellExecute.hpp>
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <com/sun/star/util/XStringSubstitution.hpp>
#include <comphelper/configurationhelper.hxx>
@@ -111,12 +111,9 @@ IMPL_LINK( SvxImprovementOptionsPage, Ha
{
try
{
- uno::Reference< lang::XMultiServiceFactory > xSMGR =
- ::comphelper::getProcessServiceFactory();
uno::Reference< XSystemShellExecute > xSystemShell(
- xSMGR->createInstance( ::rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.system.SystemShellExecute" ) ) ),
- uno::UNO_QUERY_THROW );
+ com::sun::star::system::SystemShellExecute::create(
+ ::comphelper::getProcessComponentContext() ) );
if ( xSystemShell.is() )
{
xSystemShell->execute(
Modified: openoffice/trunk/main/cui/source/options/optlingu.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/options/optlingu.cxx?rev=1429072&r1=1429071&r2=1429072&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/options/optlingu.cxx (original)
+++ openoffice/trunk/main/cui/source/options/optlingu.cxx Fri Jan 4 19:58:16
2013
@@ -54,7 +54,7 @@
#include <com/sun/star/linguistic2/XDictionaryList.hpp>
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/ucb/CommandAbortedException.hpp>
-#include <com/sun/star/system/XSystemShellExecute.hpp>
+#include <com/sun/star/system/SystemShellExecute.hpp>
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <unotools/extendedsecurityoptions.hxx>
#include <svtools/svlbox.hxx>
@@ -148,12 +148,9 @@ static void lcl_OpenURL( const ::rtl::OU
{
try
{
- uno::Reference< lang::XMultiServiceFactory > xSMGR =
- ::comphelper::getProcessServiceFactory();
uno::Reference< css::system::XSystemShellExecute > xSystemShell(
- xSMGR->createInstance( ::rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.system.SystemShellExecute" ) ) ),
- uno::UNO_QUERY_THROW );
+ css::system::SystemShellExecute::create(
+ ::comphelper::getProcessComponentContext() ) );
if ( xSystemShell.is() )
xSystemShell->execute( rURL, ::rtl::OUString(),
css::system::SystemShellExecuteFlags::DEFAULTS );
}
Modified: openoffice/trunk/main/desktop/source/app/app.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/desktop/source/app/app.cxx?rev=1429072&r1=1429071&r2=1429072&view=diff
==============================================================================
--- openoffice/trunk/main/desktop/source/app/app.cxx (original)
+++ openoffice/trunk/main/desktop/source/app/app.cxx Fri Jan 4 19:58:16 2013
@@ -53,7 +53,6 @@
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/util/XModifiable.hpp>
#include <com/sun/star/util/XFlushable.hpp>
-#include <com/sun/star/system/XSystemShellExecute.hpp>
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/lang/XComponent.hpp>
Modified: openoffice/trunk/main/desktop/source/deployment/gui/dp_gui_dialog2.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/desktop/source/deployment/gui/dp_gui_dialog2.cxx?rev=1429072&r1=1429071&r2=1429072&view=diff
==============================================================================
--- openoffice/trunk/main/desktop/source/deployment/gui/dp_gui_dialog2.cxx
(original)
+++ openoffice/trunk/main/desktop/source/deployment/gui/dp_gui_dialog2.cxx Fri
Jan 4 19:58:16 2013
@@ -65,7 +65,7 @@
#include "com/sun/star/i18n/CollatorOptions.hpp"
#include "com/sun/star/system/SystemShellExecuteFlags.hpp"
-#include "com/sun/star/system/XSystemShellExecute.hpp"
+#include "com/sun/star/system/SystemShellExecute.hpp"
#include "com/sun/star/ui/dialogs/ExecutableDialogResults.hpp"
#include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
@@ -626,7 +626,7 @@ void DialogHelper::openWebBrowser( const
try
{
uno::Reference< XSystemShellExecute > xSystemShellExecute(
- m_xContext->getServiceManager()->createInstanceWithContext( OUSTR(
"com.sun.star.system.SystemShellExecute" ), m_xContext), uno::UNO_QUERY_THROW);
+ com::sun::star::system::SystemShellExecute::create( m_xContext ) );
//throws css::lang::IllegalArgumentException,
css::system::SystemShellExecuteException
xSystemShellExecute->execute( sURL, OUString(),
SystemShellExecuteFlags::DEFAULTS );
}
Modified:
openoffice/trunk/main/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/desktop/source/deployment/gui/dp_gui_updatedialog.cxx?rev=1429072&r1=1429071&r2=1429072&view=diff
==============================================================================
--- openoffice/trunk/main/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
(original)
+++ openoffice/trunk/main/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
Fri Jan 4 19:58:16 2013
@@ -61,7 +61,7 @@
#include "com/sun/star/lang/XMultiComponentFactory.hpp"
#include "com/sun/star/lang/XSingleServiceFactory.hpp"
#include "com/sun/star/system/SystemShellExecuteFlags.hpp"
-#include "com/sun/star/system/XSystemShellExecute.hpp"
+#include "com/sun/star/system/SystemShellExecute.hpp"
#include "com/sun/star/task/XAbortChannel.hpp"
#include "com/sun/star/task/XJob.hpp"
#include "com/sun/star/ucb/CommandAbortedException.hpp"
@@ -1475,10 +1475,7 @@ IMPL_LINK( UpdateDialog, hyperlink_click
try
{
uno::Reference< com::sun::star::system::XSystemShellExecute >
xSystemShellExecute(
- m_context->getServiceManager()->createInstanceWithContext(
- OUSTR( "com.sun.star.system.SystemShellExecute" ),
- m_context), uno::UNO_QUERY_THROW);
- //throws lang::IllegalArgumentException,
system::SystemShellExecuteException
+ com::sun::star::system::SystemShellExecute::create( m_context ) );
xSystemShellExecute->execute(
sURL, ::rtl::OUString(),
com::sun::star::system::SystemShellExecuteFlags::DEFAULTS);
}
Modified: openoffice/trunk/main/embeddedobj/source/msole/oleembed.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/embeddedobj/source/msole/oleembed.cxx?rev=1429072&r1=1429071&r2=1429072&view=diff
==============================================================================
--- openoffice/trunk/main/embeddedobj/source/msole/oleembed.cxx (original)
+++ openoffice/trunk/main/embeddedobj/source/msole/oleembed.cxx Fri Jan 4
19:58:16 2013
@@ -45,14 +45,14 @@
#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
-#include <com/sun/star/system/XSystemShellExecute.hpp>
+#include <com/sun/star/system/SystemShellExecute.hpp>
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <rtl/logfile.hxx>
#include <cppuhelper/interfacecontainer.h>
#include <comphelper/mimeconfighelper.hxx>
#include <comphelper/storagehelper.hxx>
-
+#include <comphelper/processfactory.hxx>
#include <targetstatecontrol.hxx>
@@ -878,9 +878,9 @@ void SAL_CALL OleEmbeddedObject::doVerb(
if (m_aTempDumpURL.getLength())
{
- uno::Reference<
::com::sun::star::system::XSystemShellExecute > xSystemShellExecute(
m_xFactory->createInstance(
-
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.system.SystemShellExecute"))),
- uno::UNO_QUERY_THROW);
+ uno::Reference<
::com::sun::star::system::XSystemShellExecute > xSystemShellExecute(
+ ::com::sun::star::system::SystemShellExecute::create(
+ ::comphelper::getProcessComponentContext() ) );
xSystemShellExecute->execute(m_aTempDumpURL,
::rtl::OUString(), ::com::sun::star::system::SystemShellExecuteFlags::DEFAULTS);
}
else
Modified: openoffice/trunk/main/extensions/source/update/check/updatecheck.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/extensions/source/update/check/updatecheck.cxx?rev=1429072&r1=1429071&r2=1429072&view=diff
==============================================================================
--- openoffice/trunk/main/extensions/source/update/check/updatecheck.cxx
(original)
+++ openoffice/trunk/main/extensions/source/update/check/updatecheck.cxx Fri
Jan 4 19:58:16 2013
@@ -33,7 +33,7 @@
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/DispatchResultEvent.hpp>
#include <com/sun/star/frame/DispatchResultState.hpp>
-#include <com/sun/star/system/XSystemShellExecute.hpp>
+#include <com/sun/star/system/SystemShellExecute.hpp>
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <com/sun/star/task/XJob.hpp>
#include <com/sun/star/task/XJobExecutor.hpp>
@@ -932,8 +932,7 @@ UpdateCheck::install()
osl::MutexGuard aGuard(m_aMutex);
const uno::Reference< c3s::XSystemShellExecute > xShellExecute(
- createService( UNISTRING( "com.sun.star.system.SystemShellExecute" ),
m_xContext ),
- uno::UNO_QUERY );
+ c3s::SystemShellExecute::create( m_xContext ) );
try {
// Construct install command ??
Modified: openoffice/trunk/main/framework/inc/dispatch/mailtodispatcher.hxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/framework/inc/dispatch/mailtodispatcher.hxx?rev=1429072&r1=1429071&r2=1429072&view=diff
==============================================================================
--- openoffice/trunk/main/framework/inc/dispatch/mailtodispatcher.hxx (original)
+++ openoffice/trunk/main/framework/inc/dispatch/mailtodispatcher.hxx Fri Jan
4 19:58:16 2013
@@ -93,15 +93,13 @@ class MailToDispatcher : // interfaces
{
/* member */
private:
-
- /// reference to global uno service manager which had created us
- css::uno::Reference< css::lang::XMultiServiceFactory > m_xFactory;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
/* interface */
public:
// ctor/dtor
- MailToDispatcher( const css::uno::Reference<
css::lang::XMultiServiceFactory >& xFactory );
+ MailToDispatcher( const css::uno::Reference<
css::uno::XComponentContext >& xContext );
virtual ~MailToDispatcher(
);
// XInterface, XTypeProvider, XServiceInfo
Modified: openoffice/trunk/main/framework/inc/dispatch/systemexec.hxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/framework/inc/dispatch/systemexec.hxx?rev=1429072&r1=1429071&r2=1429072&view=diff
==============================================================================
--- openoffice/trunk/main/framework/inc/dispatch/systemexec.hxx (original)
+++ openoffice/trunk/main/framework/inc/dispatch/systemexec.hxx Fri Jan 4
19:58:16 2013
@@ -93,15 +93,13 @@ class SystemExec : // interfaces
{
/* member */
private:
-
- /// reference to global uno service manager which had created us
- css::uno::Reference< css::lang::XMultiServiceFactory > m_xFactory;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
/* interface */
public:
// ctor/dtor
- SystemExec( const css::uno::Reference<
css::lang::XMultiServiceFactory >& xFactory );
+ SystemExec( const css::uno::Reference<
css::uno::XComponentContext >& xContext );
virtual ~SystemExec(
);
// XInterface, XTypeProvider, XServiceInfo
Modified: openoffice/trunk/main/framework/inc/pch/precompiled_framework.hxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/framework/inc/pch/precompiled_framework.hxx?rev=1429072&r1=1429071&r2=1429072&view=diff
==============================================================================
--- openoffice/trunk/main/framework/inc/pch/precompiled_framework.hxx (original)
+++ openoffice/trunk/main/framework/inc/pch/precompiled_framework.hxx Fri Jan
4 19:58:16 2013
@@ -222,7 +222,7 @@
#include "com/sun/star/style/XStyleFamiliesSupplier.hpp"
#include "com/sun/star/sync2/BadPartnershipException.hpp"
#include "com/sun/star/system/SystemShellExecuteFlags.hpp"
-#include "com/sun/star/system/XSystemShellExecute.hpp"
+#include "com/sun/star/system/SystemShellExecute.hpp"
#include "com/sun/star/task/ErrorCodeRequest.hpp"
#include "com/sun/star/task/XAsyncJob.hpp"
#include "com/sun/star/task/XInteractionAbort.hpp"
Modified: openoffice/trunk/main/framework/inc/services.h
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/framework/inc/services.h?rev=1429072&r1=1429071&r2=1429072&view=diff
==============================================================================
--- openoffice/trunk/main/framework/inc/services.h (original)
+++ openoffice/trunk/main/framework/inc/services.h Fri Jan 4 19:58:16 2013
@@ -72,7 +72,6 @@ namespace framework{
#define SERVICENAME_JOB
DECLARE_ASCII("com.sun.star.task.Job" )
#define SERVICENAME_DISPATCHRECORDERSUPPLIER
DECLARE_ASCII("com.sun.star.frame.DispatchRecorderSupplier" )
#define SERVICENAME_DISPATCHRECORDER
DECLARE_ASCII("com.sun.star.frame.DispatchRecorder" )
-#define SERVICENAME_SYSTEMSHELLEXECUTE
DECLARE_ASCII("com.sun.star.system.SystemShellExecute" )
#define SERVICENAME_PROTOCOLHANDLER
DECLARE_ASCII("com.sun.star.frame.ProtocolHandler" )
#define SERVICENAME_SUBSTITUTEPATHVARIABLES
DECLARE_ASCII("com.sun.star.util.PathSubstitution"
)
#define SERVICENAME_PATHSETTINGS
DECLARE_ASCII("com.sun.star.util.PathSettings"
)
Modified: openoffice/trunk/main/framework/source/dispatch/mailtodispatcher.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/framework/source/dispatch/mailtodispatcher.cxx?rev=1429072&r1=1429071&r2=1429072&view=diff
==============================================================================
--- openoffice/trunk/main/framework/source/dispatch/mailtodispatcher.cxx
(original)
+++ openoffice/trunk/main/framework/source/dispatch/mailtodispatcher.cxx Fri
Jan 4 19:58:16 2013
@@ -35,7 +35,7 @@
//_________________________________________________________________________________________________________________
// interface includes
//_________________________________________________________________________________________________________________
-#include <com/sun/star/system/XSystemShellExecute.hpp>
+#include <com/sun/star/system/SystemShellExecute.hpp>
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <com/sun/star/frame/DispatchResultState.hpp>
@@ -84,10 +84,10 @@ DEFINE_XTYPEPROVIDER_5(MailToDispatcher
css::frame::XNotifyingDispatch,
css::frame::XDispatch )
-DEFINE_XSERVICEINFO_MULTISERVICE(MailToDispatcher ,
- ::cppu::OWeakObject ,
- SERVICENAME_PROTOCOLHANDLER ,
- IMPLEMENTATIONNAME_MAILTODISPATCHER)
+DEFINE_XSERVICEINFO_MULTISERVICE_2(MailToDispatcher ,
+ ::cppu::OWeakObject ,
+ SERVICENAME_PROTOCOLHANDLER ,
+ IMPLEMENTATIONNAME_MAILTODISPATCHER)
DEFINE_INIT_SERVICE(MailToDispatcher,
{
@@ -105,17 +105,17 @@ DEFINE_INIT_SERVICE(MailToDispatcher,
@short standard ctor
@descr These initialize a new instance of ths class with needed
informations for work.
- @param xFactory
- reference to uno servicemanager for creation of new
services
+ @param xContext
+ reference to uno component context
@modified 30.04.2002 14:10, as96863
*/
-MailToDispatcher::MailToDispatcher( const css::uno::Reference<
css::lang::XMultiServiceFactory >& xFactory )
+MailToDispatcher::MailToDispatcher( const css::uno::Reference<
css::uno::XComponentContext >& xContext )
// Init baseclasses first
: ThreadHelpBase( &Application::GetSolarMutex() )
, OWeakObject ( )
// Init member
- , m_xFactory ( xFactory )
+ , m_xContext ( xContext )
{
}
@@ -129,7 +129,7 @@ MailToDispatcher::MailToDispatcher( cons
*/
MailToDispatcher::~MailToDispatcher()
{
- m_xFactory = NULL;
+ m_xContext = NULL;
}
//_________________________________________________________________________________________________________________
@@ -266,13 +266,14 @@ sal_Bool MailToDispatcher::implts_dispat
{
sal_Bool bSuccess = sal_False;
- css::uno::Reference< css::lang::XMultiServiceFactory > xFactory;
+ css::uno::Reference< css::uno::XComponentContext > xContext;
/* SAFE */{
ReadGuard aReadLock( m_aLock );
- xFactory = m_xFactory;
+ xContext = m_xContext;
/* SAFE */}
- css::uno::Reference< css::system::XSystemShellExecute >
xSystemShellExecute( xFactory->createInstance(SERVICENAME_SYSTEMSHELLEXECUTE),
css::uno::UNO_QUERY );
+ css::uno::Reference< css::system::XSystemShellExecute >
xSystemShellExecute(
+ css::system::SystemShellExecute::create( xContext ) );
if (xSystemShellExecute.is())
{
try
Modified: openoffice/trunk/main/framework/source/dispatch/systemexec.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/framework/source/dispatch/systemexec.cxx?rev=1429072&r1=1429071&r2=1429072&view=diff
==============================================================================
--- openoffice/trunk/main/framework/source/dispatch/systemexec.cxx (original)
+++ openoffice/trunk/main/framework/source/dispatch/systemexec.cxx Fri Jan 4
19:58:16 2013
@@ -35,7 +35,7 @@
//_________________________________________________________________________________________________________________
// interface includes
//_________________________________________________________________________________________________________________
-#include <com/sun/star/system/XSystemShellExecute.hpp>
+#include <com/sun/star/system/SystemShellExecute.hpp>
#include <com/sun/star/util/XStringSubstitution.hpp>
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <com/sun/star/frame/DispatchResultState.hpp>
@@ -85,10 +85,10 @@ DEFINE_XTYPEPROVIDER_5(SystemExec
css::frame::XNotifyingDispatch,
css::frame::XDispatch )
-DEFINE_XSERVICEINFO_MULTISERVICE(SystemExec ,
- ::cppu::OWeakObject ,
- SERVICENAME_PROTOCOLHANDLER ,
- IMPLEMENTATIONNAME_SYSTEMEXEC)
+DEFINE_XSERVICEINFO_MULTISERVICE_2(SystemExec ,
+ ::cppu::OWeakObject ,
+ SERVICENAME_PROTOCOLHANDLER ,
+ IMPLEMENTATIONNAME_SYSTEMEXEC)
DEFINE_INIT_SERVICE(SystemExec,
{
@@ -102,12 +102,12 @@ DEFINE_INIT_SERVICE(SystemExec,
//_________________________________________________________________________________________________________________
-SystemExec::SystemExec( const css::uno::Reference<
css::lang::XMultiServiceFactory >& xFactory )
+SystemExec::SystemExec( const css::uno::Reference< css::uno::XComponentContext
>& xContext )
// Init baseclasses first
: ThreadHelpBase( &Application::GetSolarMutex() )
, OWeakObject ( )
// Init member
- , m_xFactory ( xFactory )
+ , m_xContext ( xContext )
{
}
@@ -115,7 +115,7 @@ SystemExec::SystemExec( const css::uno::
SystemExec::~SystemExec()
{
- m_xFactory = NULL;
+ m_xContext = NULL;
}
//_________________________________________________________________________________________________________________
@@ -171,7 +171,7 @@ void SAL_CALL SystemExec::dispatchWithNo
// SAFE ->
ReadGuard aReadLock(m_aLock);
- css::uno::Reference< css::lang::XMultiServiceFactory > xFactory =
m_xFactory;
+ css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
aReadLock.unlock();
// <- SAFE
@@ -180,14 +180,14 @@ void SAL_CALL SystemExec::dispatchWithNo
try
{
css::uno::Reference< css::util::XStringSubstitution > xPathSubst(
- xFactory->createInstance(SERVICENAME_SUBSTITUTEPATHVARIABLES),
+ xContext->getServiceManager()->createInstanceWithContext(
+ SERVICENAME_SUBSTITUTEPATHVARIABLES, xContext),
css::uno::UNO_QUERY_THROW);
::rtl::OUString sSystemURL =
xPathSubst->substituteVariables(sSystemURLWithVariables, sal_True); // sal_True
force an exception if unknown variables exists !
css::uno::Reference< css::system::XSystemShellExecute > xShell(
- xFactory->createInstance(SERVICENAME_SYSTEMSHELLEXECUTE),
- css::uno::UNO_QUERY_THROW);
+ css::system::SystemShellExecute::create(xContext));
xShell->execute(sSystemURL, ::rtl::OUString(),
css::system::SystemShellExecuteFlags::DEFAULTS);
impl_notifyResultListener(xListener,
css::frame::DispatchResultState::SUCCESS);
Modified: openoffice/trunk/main/framework/source/jobs/shelljob.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/framework/source/jobs/shelljob.cxx?rev=1429072&r1=1429071&r2=1429072&view=diff
==============================================================================
--- openoffice/trunk/main/framework/source/jobs/shelljob.cxx (original)
+++ openoffice/trunk/main/framework/source/jobs/shelljob.cxx Fri Jan 4
19:58:16 2013
@@ -44,8 +44,6 @@
//_______________________________________________
// include interfaces
-#include <com/sun/star/system/XSystemShellExecute.hpp>
-#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <com/sun/star/util/XStringSubstitution.hpp>
//_______________________________________________
Modified: openoffice/trunk/main/framework/source/services/backingwindow.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/framework/source/services/backingwindow.cxx?rev=1429072&r1=1429071&r2=1429072&view=diff
==============================================================================
--- openoffice/trunk/main/framework/source/services/backingwindow.cxx (original)
+++ openoffice/trunk/main/framework/source/services/backingwindow.cxx Fri Jan
4 19:58:16 2013
@@ -54,7 +54,7 @@
#include "com/sun/star/lang/XMultiServiceFactory.hpp"
#include "com/sun/star/container/XNameAccess.hpp"
-#include "com/sun/star/system/XSystemShellExecute.hpp"
+#include "com/sun/star/system/SystemShellExecute.hpp"
#include "com/sun/star/system/SystemShellExecuteFlags.hpp"
#include "com/sun/star/task/XJobExecutor.hpp"
#include "com/sun/star/util/XStringWidth.hpp"
@@ -971,9 +971,8 @@ IMPL_LINK( BackingWindow, ToolboxHdl, vo
sURL = aURLObj.GetMainURL( INetURLObject::NO_DECODE );
Reference< com::sun::star::system::XSystemShellExecute >
xSystemShellExecute(
- comphelper::getProcessServiceFactory()->createInstance(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.system.SystemShellExecute" ) ) ),
- UNO_QUERY_THROW);
+ com::sun::star::system::SystemShellExecute::create(
+ ::comphelper::getProcessComponentContext() ) );
//throws css::lang::IllegalArgumentException,
css::system::SystemShellExecuteException
xSystemShellExecute->execute( sURL, rtl::OUString(),
com::sun::star::system::SystemShellExecuteFlags::DEFAULTS);
}
Modified: openoffice/trunk/main/sfx2/source/appl/appopen.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/appl/appopen.cxx?rev=1429072&r1=1429071&r2=1429072&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/appl/appopen.cxx (original)
+++ openoffice/trunk/main/sfx2/source/appl/appopen.cxx Fri Jan 4 19:58:16 2013
@@ -36,7 +36,7 @@
#include <com/sun/star/frame/XDispatchResultListener.hpp>
#include <com/sun/star/util/URL.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
-#include <com/sun/star/system/XSystemShellExecute.hpp>
+#include <com/sun/star/system/SystemShellExecute.hpp>
#include <com/sun/star/document/XTypeDetection.hpp>
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <com/sun/star/document/MacroExecMode.hpp>
@@ -988,8 +988,9 @@ void SfxApplication::OpenDocExec_Impl( S
if ( !pFilter || !( pFilter->IsOwnFormat() ))
{
// hyperlink does not link to own type =>
special handling (http, ftp) browser and (other external protocols) OS
- Reference< XSystemShellExecute >
xSystemShellExecute( ::comphelper::getProcessServiceFactory()->createInstance(
-
::rtl::OUString::createFromAscii(
"com.sun.star.system.SystemShellExecute" )), UNO_QUERY );
+ Reference< XSystemShellExecute >
xSystemShellExecute(
+ com::sun::star::system::SystemShellExecute::create(
+ ::comphelper::getProcessComponentContext() ) );
if ( xSystemShellExecute.is() )
{
if ( aINetProtocol == INET_PROT_MAILTO )
Modified: openoffice/trunk/main/sfx2/source/appl/appserv.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/appl/appserv.cxx?rev=1429072&r1=1429071&r2=1429072&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/appl/appserv.cxx (original)
+++ openoffice/trunk/main/sfx2/source/appl/appserv.cxx Fri Jan 4 19:58:16 2013
@@ -39,7 +39,7 @@
#include <com/sun/star/document/XEmbeddedScripts.hpp>
#include <com/sun/star/embed/XStorage.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
-#include <com/sun/star/system/XSystemShellExecute.hpp>
+#include <com/sun/star/system/SystemShellExecute.hpp>
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <com/sun/star/system/SystemShellExecuteException.hpp>
@@ -851,12 +851,10 @@ void SfxApplication::OfaExec_Impl( SfxRe
{
try
{
- uno::Reference< lang::XMultiServiceFactory > xSMGR =
- ::comphelper::getProcessServiceFactory();
uno::Reference< css::system::XSystemShellExecute >
xSystemShell(
- xSMGR->createInstance(
DEFINE_CONST_UNICODE("com.sun.star.system.SystemShellExecute" ) ),
- uno::UNO_QUERY_THROW );
-
+ css::system::SystemShellExecute::create(
+ ::comphelper::getProcessComponentContext() ) );
+
// read repository URL from configuration
::rtl::OUString sTemplRepoURL =
getConfigurationStringValue(
Modified: openoffice/trunk/main/sfx2/source/view/viewsh.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/view/viewsh.cxx?rev=1429072&r1=1429071&r2=1429072&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/view/viewsh.cxx (original)
+++ openoffice/trunk/main/sfx2/source/view/viewsh.cxx Fri Jan 4 19:58:16 2013
@@ -36,7 +36,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/embed/EmbedStates.hpp>
#include <com/sun/star/embed/EmbedMisc.hpp>
-#include <com/sun/star/system/XSystemShellExecute.hpp>
+#include <com/sun/star/system/SystemShellExecute.hpp>
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <com/sun/star/container/XContainerQuery.hpp>
#include <com/sun/star/frame/XStorable.hpp>
@@ -709,9 +709,9 @@ void SfxViewShell::ExecMisc_Impl( SfxReq
return;
}
- ::com::sun::star::uno::Reference< XSystemShellExecute >
xSystemShellExecute( xSMGR->createInstance(
- ::rtl::OUString::createFromAscii(
"com.sun.star.system.SystemShellExecute" )),
- css::uno::UNO_QUERY );
+ ::com::sun::star::uno::Reference< XSystemShellExecute >
xSystemShellExecute(
+ com::sun::star::system::SystemShellExecute::create(
+ ::comphelper::getProcessComponentContext() ) );
sal_Bool bRet( sal_True );
if ( xSystemShellExecute.is() )
Modified: openoffice/trunk/main/shell/source/win32/workbench/TestSysShExec.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/shell/source/win32/workbench/TestSysShExec.cxx?rev=1429072&r1=1429071&r2=1429072&view=diff
==============================================================================
--- openoffice/trunk/main/shell/source/win32/workbench/TestSysShExec.cxx
(original)
+++ openoffice/trunk/main/shell/source/win32/workbench/TestSysShExec.cxx Fri
Jan 4 19:58:16 2013
@@ -30,10 +30,7 @@
//-----------------------------------------------------------
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/registry/XSimpleRegistry.hpp>
-
-#ifndef _COM_SUN_STAR_SYS_SHELL_XSYSTEMSHELLEXECUTE_HPP_
#include <com/sun/star/system/XSystemShellExecute.hpp>
-#endif
#include <cppuhelper/servicefactory.hxx>
Modified: openoffice/trunk/main/svtools/source/contnr/templwin.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/svtools/source/contnr/templwin.cxx?rev=1429072&r1=1429071&r2=1429072&view=diff
==============================================================================
--- openoffice/trunk/main/svtools/source/contnr/templwin.cxx (original)
+++ openoffice/trunk/main/svtools/source/contnr/templwin.cxx Fri Jan 4
19:58:16 2013
@@ -65,7 +65,7 @@
#include <com/sun/star/io/IOException.hpp>
#include <com/sun/star/util/DateTime.hpp>
#include <com/sun/star/script/XTypeConverter.hpp>
-#include <com/sun/star/system/XSystemShellExecute.hpp>
+#include <com/sun/star/system/SystemShellExecute.hpp>
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <unotools/localedatawrapper.hxx>
#include <com/sun/star/container/XNameContainer.hpp>
@@ -1985,12 +1985,9 @@ IMPL_LINK ( SvtDocumentTemplateDialog, O
{
try
{
- uno::Reference< lang::XMultiServiceFactory > xSMGR =
- ::comphelper::getProcessServiceFactory();
uno::Reference< com::sun::star::system::XSystemShellExecute >
xSystemShell(
- xSMGR->createInstance( ::rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.system.SystemShellExecute" ) ) ),
- uno::UNO_QUERY_THROW );
+ com::sun::star::system::SystemShellExecute::create(
+ ::comphelper::getProcessComponentContext() ) );
if ( xSystemShell.is() )
xSystemShell->execute( sURL, ::rtl::OUString(),
com::sun::star::system::SystemShellExecuteFlags::DEFAULTS );
EndDialog( RET_CANCEL );
Modified:
openoffice/trunk/main/swext/mediawiki/src/com/sun/star/wiki/Helper.java
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/swext/mediawiki/src/com/sun/star/wiki/Helper.java?rev=1429072&r1=1429071&r2=1429072&view=diff
==============================================================================
--- openoffice/trunk/main/swext/mediawiki/src/com/sun/star/wiki/Helper.java
(original)
+++ openoffice/trunk/main/swext/mediawiki/src/com/sun/star/wiki/Helper.java Fri
Jan 4 19:58:16 2013
@@ -702,8 +702,7 @@ public class Helper
{
try
{
- Object oSystemShell =
xContext.getServiceManager().createInstanceWithContext(
"com.sun.star.system.SystemShellExecute", xContext );
- XSystemShellExecute xSystemShell =
(XSystemShellExecute)UnoRuntime.queryInterface( XSystemShellExecute.class,
oSystemShell );
+ XSystemShellExecute xSystemShell =
com.sun.star.system.SystemShellExecute.create( xContext );
if ( xSystemShell != null )
xSystemShell.execute( sURL, "",
SystemShellExecuteFlags.DEFAULTS );
}
Modified: openoffice/trunk/main/toolkit/source/awt/vclxwindows.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/toolkit/source/awt/vclxwindows.cxx?rev=1429072&r1=1429071&r2=1429072&view=diff
==============================================================================
--- openoffice/trunk/main/toolkit/source/awt/vclxwindows.cxx (original)
+++ openoffice/trunk/main/toolkit/source/awt/vclxwindows.cxx Fri Jan 4
19:58:16 2013
@@ -37,7 +37,7 @@
#include <cppuhelper/typeprovider.hxx>
#include <com/sun/star/awt/VisualEffect.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/system/XSystemShellExecute.hpp>
+#include <com/sun/star/system/SystemShellExecute.hpp>
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <com/sun/star/resource/XStringResourceResolver.hpp>
#include <com/sun/star/awt/ImageScaleMode.hpp>
@@ -2626,8 +2626,8 @@ void VCLXFixedHyperlink::ProcessWindowEv
if ( pBase )
sURL = pBase->GetURL();
Reference< ::com::sun::star::system::XSystemShellExecute >
xSystemShellExecute(
- ::comphelper::getProcessServiceFactory()->createInstance(
- ::rtl::OUString::createFromAscii(
"com.sun.star.system.SystemShellExecute" )), uno::UNO_QUERY );
+ ::com::sun::star::system::SystemShellExecute::create(
+ ::comphelper::getProcessComponentContext() ) );
if ( sURL.getLength() > 0 && xSystemShellExecute.is() )
{
try
Modified: openoffice/trunk/main/uui/source/newerverwarn.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/uui/source/newerverwarn.cxx?rev=1429072&r1=1429071&r2=1429072&view=diff
==============================================================================
--- openoffice/trunk/main/uui/source/newerverwarn.cxx (original)
+++ openoffice/trunk/main/uui/source/newerverwarn.cxx Fri Jan 4 19:58:16 2013
@@ -27,7 +27,7 @@
#include <com/sun/star/frame/XDesktop.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <com/sun/star/system/XSystemShellExecute.hpp>
+#include <com/sun/star/system/SystemShellExecute.hpp>
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/container/XNameReplace.hpp>
@@ -98,12 +98,9 @@ IMPL_LINK( NewerVersionWarningDialog, Up
{
if ( ( sNotifyURL.getLength() > 0 ) && ( m_sVersion.getLength() > 0 ) )
{
- uno::Reference< lang::XMultiServiceFactory > xSMGR =
- ::comphelper::getProcessServiceFactory();
uno::Reference< XSystemShellExecute > xSystemShell(
- xSMGR->createInstance( ::rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.system.SystemShellExecute" ) ) ),
- uno::UNO_QUERY_THROW );
+ com::sun::star::system::SystemShellExecute::create(
+ ::comphelper::getProcessComponentContext() ) );
sNotifyURL += m_sVersion;
if ( xSystemShell.is() && sNotifyURL.getLength() )
{