summaryrefslogtreecommitdiff
path: root/uui
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-01-04 11:20:21 +0200
committerNoel Grandin <noel@peralex.com>2013-01-09 08:08:15 +0200
commit77d215ae2ed9bd08444a5128729066b6025bef27 (patch)
tree581ee6dc7eaaedd2cea591f64cbed17e3da507ac /uui
parentfd5a2eb07011e8aedfd5ef0a82edaf07221554ba (diff)
fdo#46808, use new method OConfigurationTreeRoot::createWithComponentContext
.. everywhere that was using createWithServiceFactory, and delete the old method. Change-Id: I02cb2bfbcc2390494383579d2f14caa4fc5b8014
Diffstat (limited to 'uui')
-rw-r--r--uui/source/iahndl-authentication.cxx8
-rw-r--r--uui/source/iahndl-filter.cxx28
-rw-r--r--uui/source/iahndl-ssl.cxx28
-rw-r--r--uui/source/iahndl.cxx18
-rw-r--r--uui/source/iahndl.hxx10
-rw-r--r--uui/source/interactionhandler.cxx13
-rw-r--r--uui/source/interactionhandler.hxx6
-rw-r--r--uui/source/requeststringresolver.cxx10
-rw-r--r--uui/source/requeststringresolver.hxx7
-rw-r--r--uui/source/sslwarndlg.cxx6
-rw-r--r--uui/source/sslwarndlg.hxx8
-rw-r--r--uui/source/unknownauthdlg.cxx6
-rw-r--r--uui/source/unknownauthdlg.hxx8
13 files changed, 77 insertions, 79 deletions
diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx
index 7df39cd85c75..2068ee80b77c 100644
--- a/uui/source/iahndl-authentication.cxx
+++ b/uui/source/iahndl-authentication.cxx
@@ -186,7 +186,7 @@ void
handleAuthenticationRequest_(
Window * pParent,
uno::Reference< task::XInteractionHandler2 > const & xIH,
- uno::Reference< lang::XMultiServiceFactory > const & xServiceFactory,
+ uno::Reference< uno::XComponentContext > const & xContext,
ucb::AuthenticationRequest const & rRequest,
uno::Sequence< uno::Reference< task::XInteractionContinuation > > const &
rContinuations,
@@ -205,7 +205,7 @@ handleAuthenticationRequest_(
//////////////////////////
// First, try to obtain credentials from password container service.
- uui::PasswordContainerHelper aPwContainerHelper(comphelper::getComponentContext(xServiceFactory));
+ uui::PasswordContainerHelper aPwContainerHelper(xContext);
if (aPwContainerHelper.handleAuthenticationRequest(rRequest,
xSupplyAuthentication,
rURL,
@@ -632,7 +632,7 @@ UUIInteractionHelper::handleAuthenticationRequest(
{
handleAuthenticationRequest_(getParentProperty(),
getInteractionHandler(),
- m_xServiceFactory,
+ m_xContext,
aURLAuthenticationRequest,
rRequest->getContinuations(),
aURLAuthenticationRequest.URL);
@@ -644,7 +644,7 @@ UUIInteractionHelper::handleAuthenticationRequest(
{
handleAuthenticationRequest_(getParentProperty(),
getInteractionHandler(),
- m_xServiceFactory,
+ m_xContext,
aAuthenticationRequest,
rRequest->getContinuations(),
rtl::OUString());
diff --git a/uui/source/iahndl-filter.cxx b/uui/source/iahndl-filter.cxx
index 067d7035a8e6..71ffda8fd620 100644
--- a/uui/source/iahndl-filter.cxx
+++ b/uui/source/iahndl-filter.cxx
@@ -81,7 +81,7 @@ executeFilterDialog(
void
handleNoSuchFilterRequest_(
Window * pParent,
- uno::Reference< lang::XMultiServiceFactory > const & xServiceFactory,
+ uno::Reference< uno::XComponentContext > const & xContext,
document::NoSuchFilterRequest const & rRequest,
uno::Sequence< uno::Reference< task::XInteractionContinuation > > const &
rContinuations )
@@ -105,8 +105,8 @@ handleNoSuchFilterRequest_(
uno::Reference< container::XContainerQuery > xFilterContainer;
try
{
- xFilterContainer.set( xServiceFactory->createInstance(
- ::rtl::OUString( "com.sun.star.document.FilterFactory") ),
+ xFilterContainer.set( xContext->getServiceManager()->createInstanceWithContext(
+ ::rtl::OUString( "com.sun.star.document.FilterFactory"), xContext ),
uno::UNO_QUERY );
}
catch ( uno::Exception const & )
@@ -195,7 +195,7 @@ handleNoSuchFilterRequest_(
void
handleAmbigousFilterRequest_(
Window * pParent,
- uno::Reference< lang::XMultiServiceFactory > const & xServiceFactory,
+ uno::Reference< uno::XComponentContext > const & xContext,
document::AmbigousFilterRequest const & rRequest,
uno::Sequence<
uno::Reference<
@@ -211,8 +211,8 @@ handleAmbigousFilterRequest_(
uno::Reference< container::XNameContainer > xFilterContainer;
try
{
- xFilterContainer.set( xServiceFactory->createInstance(
- ::rtl::OUString( "com.sun.star.document.FilterFactory") ),
+ xFilterContainer.set( xContext->getServiceManager()->createInstanceWithContext(
+ ::rtl::OUString( "com.sun.star.document.FilterFactory"), xContext ),
uno::UNO_QUERY );
}
catch ( uno::Exception & )
@@ -298,7 +298,7 @@ handleAmbigousFilterRequest_(
void
handleFilterOptionsRequest_(
- uno::Reference< lang::XMultiServiceFactory > const & xServiceFactory,
+ uno::Reference< uno::XComponentContext > const & xContext,
document::FilterOptionsRequest const & rRequest,
uno::Sequence< uno::Reference< task::XInteractionContinuation > > const &
rContinuations)
@@ -311,8 +311,8 @@ handleFilterOptionsRequest_(
uno::Reference< container::XNameAccess > xFilterCFG;
try
{
- xFilterCFG.set( xServiceFactory->createInstance(
- ::rtl::OUString( "com.sun.star.document.FilterFactory" ) ),
+ xFilterCFG.set( xContext->getServiceManager()->createInstanceWithContext(
+ ::rtl::OUString( "com.sun.star.document.FilterFactory" ), xContext ),
uno::UNO_QUERY );
}
catch ( uno::Exception const & )
@@ -351,8 +351,8 @@ handleFilterOptionsRequest_(
{
uno::Reference<
ui::dialogs::XExecutableDialog > xFilterDialog(
- xServiceFactory->createInstance(
- aServiceName ),
+ xContext->getServiceManager()->createInstanceWithContext(
+ aServiceName, xContext ),
uno::UNO_QUERY );
uno::Reference< beans::XPropertyAccess >
xFilterProperties( xFilterDialog,
@@ -409,7 +409,7 @@ UUIInteractionHelper::handleNoSuchFilterRequest(
if (aAnyRequest >>= aNoSuchFilterRequest)
{
handleNoSuchFilterRequest_(getParentProperty(),
- m_xServiceFactory,
+ m_xContext,
aNoSuchFilterRequest,
rRequest->getContinuations());
return true;
@@ -428,7 +428,7 @@ UUIInteractionHelper::handleAmbigousFilterRequest(
if (aAnyRequest >>= aAmbigousFilterRequest)
{
handleAmbigousFilterRequest_(getParentProperty(),
- m_xServiceFactory,
+ m_xContext,
aAmbigousFilterRequest,
rRequest->getContinuations());
return true;
@@ -446,7 +446,7 @@ UUIInteractionHelper::handleFilterOptionsRequest(
document::FilterOptionsRequest aFilterOptionsRequest;
if (aAnyRequest >>= aFilterOptionsRequest)
{
- handleFilterOptionsRequest_(m_xServiceFactory,
+ handleFilterOptionsRequest_(m_xContext,
aFilterOptionsRequest,
rRequest->getContinuations());
return true;
diff --git a/uui/source/iahndl-ssl.cxx b/uui/source/iahndl-ssl.cxx
index 5f220a4d9626..4e34999bd611 100644
--- a/uui/source/iahndl-ssl.cxx
+++ b/uui/source/iahndl-ssl.cxx
@@ -103,7 +103,7 @@ isDomainMatch(
rtl::OUString
getLocalizedDatTimeStr(
- uno::Reference< lang::XMultiServiceFactory > const & xServiceFactory,
+ uno::Reference< uno::XComponentContext> const & xContext,
util::DateTime const & rDateTime )
{
rtl::OUString aDateTimeStr;
@@ -115,7 +115,7 @@ getLocalizedDatTimeStr(
LanguageType eUILang = Application::GetSettings().GetUILanguageTag().getLanguageType();
SvNumberFormatter *pNumberFormatter
- = new SvNumberFormatter( xServiceFactory, eUILang );
+ = new SvNumberFormatter( uno::Reference<lang::XMultiServiceFactory>(xContext->getServiceManager(), uno::UNO_QUERY_THROW), eUILang );
String aTmpStr;
Color* pColor = NULL;
Date* pNullDate = pNumberFormatter->GetNullDate();
@@ -137,7 +137,7 @@ getLocalizedDatTimeStr(
sal_Bool
executeUnknownAuthDialog(
Window * pParent,
- uno::Reference< lang::XMultiServiceFactory > const & xServiceFactory,
+ uno::Reference< uno::XComponentContext > const & xContext,
const uno::Reference< security::XCertificate >& rXCert)
SAL_THROW((uno::RuntimeException))
{
@@ -149,7 +149,7 @@ executeUnknownAuthDialog(
boost::scoped_ptr< UnknownAuthDialog > xDialog(
new UnknownAuthDialog( pParent,
rXCert,
- xServiceFactory,
+ xContext,
xManager.get()));
// Get correct resource string
@@ -183,7 +183,7 @@ executeUnknownAuthDialog(
sal_Bool
executeSSLWarnDialog(
Window * pParent,
- uno::Reference< lang::XMultiServiceFactory > const & xServiceFactory,
+ uno::Reference< uno::XComponentContext > const & xContext,
const uno::Reference< security::XCertificate >& rXCert,
sal_Int32 const & failure,
const rtl::OUString & hostName )
@@ -197,7 +197,7 @@ executeSSLWarnDialog(
boost::scoped_ptr< SSLWarnDialog > xDialog(
new SSLWarnDialog( pParent,
rXCert,
- xServiceFactory,
+ xContext,
xManager.get()));
// Get correct resource string
@@ -216,10 +216,10 @@ executeSSLWarnDialog(
aArguments_1.push_back(
getContentPart( rXCert->getSubjectName()) );
aArguments_1.push_back(
- getLocalizedDatTimeStr( xServiceFactory,
+ getLocalizedDatTimeStr( xContext,
rXCert->getNotValidAfter() ) );
aArguments_1.push_back(
- getLocalizedDatTimeStr( xServiceFactory,
+ getLocalizedDatTimeStr( xContext,
rXCert->getNotValidAfter() ) );
break;
case SSLWARN_TYPE_INVALID:
@@ -257,7 +257,7 @@ executeSSLWarnDialog(
void
handleCertificateValidationRequest_(
Window * pParent,
- uno::Reference< lang::XMultiServiceFactory > const & xServiceFactory,
+ uno::Reference< uno::XComponentContext > const & xContext,
ucb::CertificateValidationRequest const & rRequest,
uno::Sequence< uno::Reference< task::XInteractionContinuation > > const &
rContinuations)
@@ -278,7 +278,7 @@ handleCertificateValidationRequest_(
== security::CertificateValidity::ROOT_UNTRUSTED) )
{
trustCert = executeUnknownAuthDialog( pParent,
- xServiceFactory,
+ xContext,
rRequest.Certificate );
}
@@ -313,7 +313,7 @@ handleCertificateValidationRequest_(
trustCert )
{
trustCert = executeSSLWarnDialog( pParent,
- xServiceFactory,
+ xContext,
rRequest.Certificate,
SSLWARN_TYPE_DOMAINMISMATCH,
rRequest.HostName );
@@ -326,7 +326,7 @@ handleCertificateValidationRequest_(
trustCert )
{
trustCert = executeSSLWarnDialog( pParent,
- xServiceFactory,
+ xContext,
rRequest.Certificate,
SSLWARN_TYPE_EXPIRED,
rRequest.HostName );
@@ -343,7 +343,7 @@ handleCertificateValidationRequest_(
trustCert )
{
trustCert = executeSSLWarnDialog( pParent,
- xServiceFactory,
+ xContext,
rRequest.Certificate,
SSLWARN_TYPE_INVALID,
rRequest.HostName );
@@ -374,7 +374,7 @@ UUIInteractionHelper::handleCertificateValidationRequest(
if (aAnyRequest >>= aCertificateValidationRequest)
{
handleCertificateValidationRequest_(getParentProperty(),
- m_xServiceFactory,
+ m_xContext,
aCertificateValidationRequest,
rRequest->getContinuations());
return true;
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index f12ae0c0d99e..713e565b2cce 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -130,20 +130,20 @@ public:
} /* namespace */
UUIInteractionHelper::UUIInteractionHelper(
- uno::Reference< lang::XMultiServiceFactory > const & rServiceFactory,
+ uno::Reference< uno::XComponentContext > const & rxContext,
uno::Reference< awt::XWindow > const & rxWindowParam,
const OUString & rContextParam)
SAL_THROW(()):
- m_xServiceFactory(rServiceFactory),
+ m_xContext(rxContext),
m_xWindowParam(rxWindowParam),
m_aContextParam(rContextParam)
{
}
UUIInteractionHelper::UUIInteractionHelper(
- uno::Reference< lang::XMultiServiceFactory > const & rServiceFactory)
+ uno::Reference< uno::XComponentContext > const & rxContext)
SAL_THROW(()):
- m_xServiceFactory(rServiceFactory)
+ m_xContext(rxContext)
{
}
@@ -370,7 +370,7 @@ bool UUIInteractionHelper::handleCustomRequest( const Reference< XInteractionReq
{
try
{
- Reference< XInteractionHandler2 > xHandler( m_xServiceFactory->createInstance( i_rServiceName ), UNO_QUERY_THROW );
+ Reference< XInteractionHandler2 > xHandler( m_xContext->getServiceManager()->createInstanceWithContext( i_rServiceName, m_xContext ), UNO_QUERY_THROW );
Reference< XInitialization > xHandlerInit( xHandler, UNO_QUERY );
if ( xHandlerInit.is() )
@@ -401,8 +401,8 @@ bool UUIInteractionHelper::handleTypedHandlerImplementations( Reference< XIntera
return handleCustomRequest( rRequest, aCacheHitTest->second );
// the base registration node for "typed" interaction handlers
- const ::utl::OConfigurationTreeRoot aConfigRoot( ::utl::OConfigurationTreeRoot::createWithServiceFactory(
- m_xServiceFactory,
+ const ::utl::OConfigurationTreeRoot aConfigRoot( ::utl::OConfigurationTreeRoot::createWithComponentContext(
+ m_xContext,
OUString( "/org.openoffice.Interaction/InteractionHandlers" ),
-1,
::utl::OConfigurationTreeRoot::CM_READONLY
@@ -926,7 +926,7 @@ UUIInteractionHelper::getInteractionHandlerList(
try
{
uno::Reference< lang::XMultiServiceFactory > xConfigProv =
- configuration::theDefaultProvider::get( comphelper::getComponentContext(m_xServiceFactory) );
+ configuration::theDefaultProvider::get( m_xContext );
rtl::OUStringBuffer aFullPath;
aFullPath.appendAscii(
@@ -1046,7 +1046,7 @@ UUIInteractionHelper::getInteractionHandler()
SAL_THROW((uno::RuntimeException))
{
return InteractionHandler::createWithParentAndContext(
- comphelper::getComponentContext(m_xServiceFactory), m_xWindowParam,
+ m_xContext, m_xWindowParam,
m_aContextParam);
}
diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx
index eee766753f92..8abe1fcb4b20 100644
--- a/uui/source/iahndl.hxx
+++ b/uui/source/iahndl.hxx
@@ -27,6 +27,7 @@
#include "com/sun/star/uno/Reference.hxx"
#include "com/sun/star/uno/Sequence.hxx"
+#include "com/sun/star/uno/XComponentContext.hpp"
#include "com/sun/star/beans/Optional.hpp"
#include "com/sun/star/task/InteractionClassification.hpp"
@@ -87,7 +88,7 @@ class UUIInteractionHelper
{
private:
mutable osl::Mutex m_aPropertyMutex;
- ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceFactory;
+ ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xContext;
::com::sun::star::uno::Reference< com::sun::star::awt::XWindow > m_xWindowParam;
const OUString m_aContextParam;
StringHashMap m_aTypedCustomHandlers;
@@ -97,14 +98,14 @@ private:
public:
UUIInteractionHelper(
com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > const & rServiceFactory,
+ com::sun::star::uno::XComponentContext > const & rxContext,
com::sun::star::uno::Reference<
com::sun::star::awt::XWindow > const & rxWindow,
const OUString & rContextParam)
SAL_THROW(());
UUIInteractionHelper(
com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > const & rServiceFactory)
+ com::sun::star::uno::XComponentContext > const & rxContext)
SAL_THROW(());
~UUIInteractionHelper() SAL_THROW(());
@@ -127,6 +128,9 @@ public:
::rtl::OUString aMessage,
std::vector< rtl::OUString > const & rArguments );
+ ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
+ getORB() const
+ { return m_xContext; }
private:
bool
handleRequest_impl(
diff --git a/uui/source/interactionhandler.cxx b/uui/source/interactionhandler.cxx
index 76d23c355df2..bb5177e9c103 100644
--- a/uui/source/interactionhandler.cxx
+++ b/uui/source/interactionhandler.cxx
@@ -20,16 +20,16 @@
#include "iahndl.hxx"
#include "interactionhandler.hxx"
#include "comphelper/namedvaluecollection.hxx"
+#include "comphelper/processfactory.hxx"
#include "com/sun/star/awt/XWindow.hpp"
using namespace com::sun::star;
UUIInteractionHandler::UUIInteractionHandler(
- uno::Reference< lang::XMultiServiceFactory > const &
- rServiceFactory)
+ uno::Reference< uno::XComponentContext > const &
+ rxContext)
SAL_THROW(())
- : m_xServiceFactory(rServiceFactory),
- m_pImpl(new UUIInteractionHelper(m_xServiceFactory))
+ : m_pImpl(new UUIInteractionHelper(rxContext))
{
}
@@ -68,6 +68,7 @@ UUIInteractionHandler::initialize(
uno::Sequence< uno::Any > const & rArguments)
throw (uno::Exception)
{
+ uno::Reference<uno::XComponentContext> xContext = m_pImpl->getORB();
delete m_pImpl;
// The old-style InteractionHandler service supported a sequence of
@@ -91,7 +92,7 @@ UUIInteractionHandler::initialize(
}
}
- m_pImpl = new UUIInteractionHelper(m_xServiceFactory, xWindow, aContext);
+ m_pImpl = new UUIInteractionHelper(xContext, xWindow, aContext);
}
void SAL_CALL
@@ -145,7 +146,7 @@ UUIInteractionHandler::createInstance(
{
try
{
- return *new UUIInteractionHandler(rServiceFactory);
+ return *new UUIInteractionHandler(comphelper::getComponentContext(rServiceFactory));
}
catch (std::bad_alloc const &)
{
diff --git a/uui/source/interactionhandler.hxx b/uui/source/interactionhandler.hxx
index 39acd8624a22..c044fb48091c 100644
--- a/uui/source/interactionhandler.hxx
+++ b/uui/source/interactionhandler.hxx
@@ -47,16 +47,14 @@ public:
SAL_THROW((com::sun::star::uno::Exception));
private:
- com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > m_xServiceFactory;
UUIInteractionHelper * m_pImpl;
UUIInteractionHandler(UUIInteractionHandler &); // not implemented
void operator =(UUIInteractionHandler); // not implemented
UUIInteractionHandler(com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory >
- const & rServiceFactory)
+ com::sun::star::uno::XComponentContext >
+ const & rxContext)
SAL_THROW(());
virtual ~UUIInteractionHandler() SAL_THROW(());
diff --git a/uui/source/requeststringresolver.cxx b/uui/source/requeststringresolver.cxx
index 35b87446065f..ea00c4d785d7 100644
--- a/uui/source/requeststringresolver.cxx
+++ b/uui/source/requeststringresolver.cxx
@@ -19,15 +19,15 @@
#include "requeststringresolver.hxx"
#include "iahndl.hxx"
+#include <comphelper/processfactory.hxx>
using namespace com::sun;
UUIInteractionRequestStringResolver::UUIInteractionRequestStringResolver(
- star::uno::Reference< star::lang::XMultiServiceFactory > const &
- rServiceFactory)
+ star::uno::Reference< star::uno::XComponentContext > const &
+ rxContext)
SAL_THROW(())
- : m_xServiceFactory(rServiceFactory),
- m_pImpl(new UUIInteractionHelper(rServiceFactory))
+ : m_pImpl(new UUIInteractionHelper(rxContext))
{
}
@@ -98,7 +98,7 @@ UUIInteractionRequestStringResolver::createInstance(
{
try
{
- return *new UUIInteractionRequestStringResolver(rServiceFactory);
+ return *new UUIInteractionRequestStringResolver(comphelper::getComponentContext(rServiceFactory));
}
catch (std::bad_alloc const &)
{
diff --git a/uui/source/requeststringresolver.hxx b/uui/source/requeststringresolver.hxx
index 127194d12119..a476c560f0ac 100644
--- a/uui/source/requeststringresolver.hxx
+++ b/uui/source/requeststringresolver.hxx
@@ -22,6 +22,7 @@
#include "com/sun/star/lang/XServiceInfo.hpp"
#include "com/sun/star/task/XInteractionRequestStringResolver.hpp"
+#include "com/sun/star/uno/XComponentContext.hpp"
#include "cppuhelper/implbase2.hxx"
class UUIInteractionHelper;
@@ -46,8 +47,6 @@ public:
SAL_THROW((com::sun::star::uno::Exception));
private:
- com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > m_xServiceFactory;
UUIInteractionHelper * m_pImpl;
UUIInteractionRequestStringResolver(UUIInteractionRequestStringResolver &); // not implemented
@@ -55,8 +54,8 @@ private:
UUIInteractionRequestStringResolver(
com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory >
- const & rServiceFactory)
+ com::sun::star::uno::XComponentContext >
+ const & rxContext)
SAL_THROW(());
virtual ~UUIInteractionRequestStringResolver() SAL_THROW(());
diff --git a/uui/source/sslwarndlg.cxx b/uui/source/sslwarndlg.cxx
index b00ca79fa160..0a56d8516b96 100644
--- a/uui/source/sslwarndlg.cxx
+++ b/uui/source/sslwarndlg.cxx
@@ -40,7 +40,7 @@ IMPL_LINK_NOARG(SSLWarnDialog, ViewCertHdl_Impl)
{
uno::Reference< ::com::sun::star::security::XDocumentDigitalSignatures > xDocumentDigitalSignatures;
- xDocumentDigitalSignatures = ::com::sun::star::security::DocumentDigitalSignatures::createDefault( comphelper::getComponentContext(getServiceFactory()) );
+ xDocumentDigitalSignatures = ::com::sun::star::security::DocumentDigitalSignatures::createDefault( m_xContext );
xDocumentDigitalSignatures.get()->showCertificate(getCert());
@@ -53,7 +53,7 @@ SSLWarnDialog::SSLWarnDialog
(
Window* pParent,
const cssu::Reference< dcss::security::XCertificate >& rXCert,
- const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
+ const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xContext,
ResMgr* pResMgr
) :
@@ -64,7 +64,7 @@ SSLWarnDialog::SSLWarnDialog
m_aCommandButtonViewCert ( this, ResId( PB_VIEW__CERTIFICATE, *pResMgr ) ),
m_aLine ( this, ResId( FL_LINE, *pResMgr ) ),
m_aWarnImage ( this, ResId( IMG_WARN, *pResMgr ) ),
- m_xServiceFactory ( xServiceFactory ),
+ m_xContext ( xContext ),
m_rXCert ( rXCert )
{
FreeResource();
diff --git a/uui/source/sslwarndlg.hxx b/uui/source/sslwarndlg.hxx
index ab2b8c07754c..9cfa924ae4b4 100644
--- a/uui/source/sslwarndlg.hxx
+++ b/uui/source/sslwarndlg.hxx
@@ -26,7 +26,7 @@
#include <vcl/button.hxx>
#include <com/sun/star/security/XCertificate.hpp>
#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
namespace cssu = com::sun::star::uno;
namespace dcss = ::com::sun::star;
@@ -48,7 +48,7 @@ private:
FixedImage m_aWarnImage;
- const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& m_xServiceFactory;
+ const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& m_xContext;
const cssu::Reference< dcss::security::XCertificate >& m_rXCert;
Window* m_pParent;
@@ -58,11 +58,9 @@ private:
public:
SSLWarnDialog( Window* pParent,
const cssu::Reference< dcss::security::XCertificate >& rXCert,
- const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
+ const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xContext,
ResMgr * pResMgr );
- const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > getServiceFactory() { return m_xServiceFactory; };
-
cssu::Reference< dcss::security::XCertificate > getCert() { return m_rXCert; };
Window* getParent() { return m_pParent; };
diff --git a/uui/source/unknownauthdlg.cxx b/uui/source/unknownauthdlg.cxx
index dc0e551ac163..a28a4bf7bcca 100644
--- a/uui/source/unknownauthdlg.cxx
+++ b/uui/source/unknownauthdlg.cxx
@@ -48,7 +48,7 @@ IMPL_LINK_NOARG(UnknownAuthDialog, ViewCertHdl_Impl)
uno::Reference< ::com::sun::star::security::XDocumentDigitalSignatures > xDocumentDigitalSignatures;
xDocumentDigitalSignatures = uno::Reference< ::com::sun::star::security::XDocumentDigitalSignatures >(
- ::com::sun::star::security::DocumentDigitalSignatures::createDefault(comphelper::getComponentContext(getServiceFactory())) );
+ ::com::sun::star::security::DocumentDigitalSignatures::createDefault(m_xContext) );
xDocumentDigitalSignatures.get()->showCertificate(getCert());
@@ -61,7 +61,7 @@ UnknownAuthDialog::UnknownAuthDialog
(
Window* pParent,
const cssu::Reference< dcss::security::XCertificate >& rXCert,
- const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
+ const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xContext,
ResMgr* pResMgr
) :
ModalDialog( pParent, ResId( DLG_UUI_UNKNOWNAUTH, *pResMgr ) ),
@@ -75,7 +75,7 @@ UnknownAuthDialog::UnknownAuthDialog
m_aLine ( this, ResId( FL_LINE, *pResMgr ) ),
m_aLabel1 ( this, ResId( FT_LABEL_1, *pResMgr ) ),
m_aWarnImage ( this, ResId( IMG_WARN, *pResMgr ) ),
- m_xServiceFactory ( xServiceFactory ),
+ m_xContext ( xContext ),
m_rXCert ( rXCert )
{
FreeResource();
diff --git a/uui/source/unknownauthdlg.hxx b/uui/source/unknownauthdlg.hxx
index 6ab3eba42d29..ea982fc52b99 100644
--- a/uui/source/unknownauthdlg.hxx
+++ b/uui/source/unknownauthdlg.hxx
@@ -26,7 +26,7 @@
#include <vcl/button.hxx>
#include <com/sun/star/security/XCertificate.hpp>
#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
namespace cssu = com::sun::star::uno;
namespace dcss = ::com::sun::star;
@@ -50,7 +50,7 @@ private:
FixedText m_aLabel1;
FixedImage m_aWarnImage;
- const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& m_xServiceFactory;
+ const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& m_xContext;
const cssu::Reference< dcss::security::XCertificate >& m_rXCert;
Window* m_pParent;
@@ -60,11 +60,9 @@ private:
public:
UnknownAuthDialog( Window* pParent,
const cssu::Reference< dcss::security::XCertificate >& rXCert,
- const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
+ const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xContext,
ResMgr * pResMgr );
- const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > getServiceFactory() { return m_xServiceFactory; };
-
cssu::Reference< dcss::security::XCertificate > getCert() { return m_rXCert; };
Window* getParent() { return m_pParent; };