summaryrefslogtreecommitdiff
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
parentfd5a2eb07011e8aedfd5ef0a82edaf07221554ba (diff)
fdo#46808, use new method OConfigurationTreeRoot::createWithComponentContext
.. everywhere that was using createWithServiceFactory, and delete the old method. Change-Id: I02cb2bfbcc2390494383579d2f14caa4fc5b8014
-rw-r--r--cui/source/options/connpoolconfig.cxx8
-rw-r--r--extensions/source/abpilot/abspilot.cxx9
-rw-r--r--extensions/source/abpilot/fieldmappingimpl.cxx24
-rw-r--r--extensions/source/abpilot/fieldmappingimpl.hxx11
-rw-r--r--extensions/source/propctrlr/propertyhandler.cxx4
-rw-r--r--fpicker/source/office/iodlg.cxx4
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx2
-rw-r--r--reportdesign/source/ui/report/propbrw.cxx6
-rw-r--r--sfx2/source/dialog/filtergrouping.cxx4
-rw-r--r--svx/source/form/databaselocationinput.cxx4
-rw-r--r--svx/source/form/fmPropBrw.cxx6
-rw-r--r--svx/source/form/fmcontrollayout.cxx4
-rw-r--r--svx/source/form/fmsrccfg.cxx2
-rw-r--r--sw/source/ui/fldui/fldtdlg.cxx4
-rw-r--r--unotools/inc/unotools/confignode.hxx15
-rw-r--r--unotools/inc/unotools/configvaluecontainer.hxx4
-rw-r--r--unotools/source/config/confignode.cxx6
-rw-r--r--unotools/source/config/configvaluecontainer.cxx8
-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
31 files changed, 131 insertions, 150 deletions
diff --git a/cui/source/options/connpoolconfig.cxx b/cui/source/options/connpoolconfig.cxx
index a20f4f38af09..b5de0772b08b 100644
--- a/cui/source/options/connpoolconfig.cxx
+++ b/cui/source/options/connpoolconfig.cxx
@@ -85,8 +85,8 @@ namespace offapp
void ConnectionPoolConfig::GetOptions(SfxItemSet& _rFillItems)
{
// the config node where all pooling relevant info are stored under
- OConfigurationTreeRoot aConnectionPoolRoot = OConfigurationTreeRoot::createWithServiceFactory(
- ::comphelper::getProcessServiceFactory(), getConnectionPoolNodeName(), -1, OConfigurationTreeRoot::CM_READONLY);
+ OConfigurationTreeRoot aConnectionPoolRoot = OConfigurationTreeRoot::createWithComponentContext(
+ ::comphelper::getProcessComponentContext(), getConnectionPoolNodeName(), -1, OConfigurationTreeRoot::CM_READONLY);
// the global "enabled" flag
Any aEnabled = aConnectionPoolRoot.getNodeValue(getEnablePoolingNodeName());
@@ -150,8 +150,8 @@ namespace offapp
void ConnectionPoolConfig::SetOptions(const SfxItemSet& _rSourceItems)
{
// the config node where all pooling relevant info are stored under
- OConfigurationTreeRoot aConnectionPoolRoot = OConfigurationTreeRoot::createWithServiceFactory(
- ::comphelper::getProcessServiceFactory(), getConnectionPoolNodeName(), -1, OConfigurationTreeRoot::CM_UPDATABLE);
+ OConfigurationTreeRoot aConnectionPoolRoot = OConfigurationTreeRoot::createWithComponentContext(
+ ::comphelper::getProcessComponentContext(), getConnectionPoolNodeName(), -1, OConfigurationTreeRoot::CM_UPDATABLE);
if (!aConnectionPoolRoot.isValid())
// already asserted by the OConfigurationTreeRoot
diff --git a/extensions/source/abpilot/abspilot.cxx b/extensions/source/abpilot/abspilot.cxx
index 236a05cace52..f6789bb08dc8 100644
--- a/extensions/source/abpilot/abspilot.cxx
+++ b/extensions/source/abpilot/abspilot.cxx
@@ -21,6 +21,7 @@
#include "abpilot.hrc"
#include "abpresid.hrc"
#include "componentmodule.hxx"
+#include <comphelper/processfactory.hxx>
#include <tools/debug.hxx>
#include <svtools/localresaccess.hxx>
#include "typeselectionpage.hxx"
@@ -171,10 +172,10 @@ namespace abp
m_aNewDataSource.registerDataSource(m_aSettings.sRegisteredDataSourceName);
// 3. write the data source / table names into the configuration
- addressconfig::writeTemplateAddressSource( getORB(), m_aSettings.bRegisterDataSource ? m_aSettings.sRegisteredDataSourceName : m_aSettings.sDataSourceName, m_aSettings.sSelectedTable );
+ addressconfig::writeTemplateAddressSource( comphelper::getComponentContext(getORB()), m_aSettings.bRegisterDataSource ? m_aSettings.sRegisteredDataSourceName : m_aSettings.sDataSourceName, m_aSettings.sSelectedTable );
// 4. write the field mapping
- fieldmapping::writeTemplateAddressFieldMapping( getORB(), m_aSettings.aFieldMapping );
+ fieldmapping::writeTemplateAddressFieldMapping( comphelper::getComponentContext(getORB()), m_aSettings.aFieldMapping );
}
//---------------------------------------------------------------------
@@ -214,7 +215,7 @@ namespace abp
implCommitAll();
- addressconfig::markPilotSuccess( getORB() );
+ addressconfig::markPilotSuccess( comphelper::getComponentContext(getORB()) );
return sal_True;
}
@@ -326,7 +327,7 @@ namespace abp
{
DBG_ASSERT( !needManualFieldMapping( ), "OAddessBookSourcePilot::implDoAutoFieldMapping: invalid call!" );
- fieldmapping::defaultMapping( getORB(), m_aSettings.aFieldMapping );
+ fieldmapping::defaultMapping( comphelper::getComponentContext(getORB()), m_aSettings.aFieldMapping );
}
//---------------------------------------------------------------------
diff --git a/extensions/source/abpilot/fieldmappingimpl.cxx b/extensions/source/abpilot/fieldmappingimpl.cxx
index dbea7040b9dd..e4e20f84dbd2 100644
--- a/extensions/source/abpilot/fieldmappingimpl.cxx
+++ b/extensions/source/abpilot/fieldmappingimpl.cxx
@@ -143,7 +143,7 @@ namespace abp
}
//-----------------------------------------------------------------
- void defaultMapping( const Reference< XMultiServiceFactory >& _rxORB, MapString2String& _rFieldAssignment ) SAL_THROW ( ( ) )
+ void defaultMapping( const Reference< XComponentContext >& _rxContext, MapString2String& _rFieldAssignment ) SAL_THROW ( ( ) )
{
_rFieldAssignment.clear();
@@ -191,8 +191,8 @@ namespace abp
sDriverAliasesNodeName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/ColumnAliases" ));
// create a config node for this
- OConfigurationTreeRoot aDriverFieldAliasing = OConfigurationTreeRoot::createWithServiceFactory(
- _rxORB, sDriverAliasesNodeName, -1, OConfigurationTreeRoot::CM_READONLY);
+ OConfigurationTreeRoot aDriverFieldAliasing = OConfigurationTreeRoot::createWithComponentContext(
+ _rxContext, sDriverAliasesNodeName, -1, OConfigurationTreeRoot::CM_READONLY);
// loop through all programmatic pairs
DBG_ASSERT( 0 == SAL_N_ELEMENTS( pMappingProgrammatics ) % 2,
@@ -236,7 +236,7 @@ namespace abp
}
//-----------------------------------------------------------------
- void writeTemplateAddressFieldMapping( const Reference< XMultiServiceFactory >& _rxORB, const MapString2String& _rFieldAssignment ) SAL_THROW ( ( ) )
+ void writeTemplateAddressFieldMapping( const Reference< XComponentContext >& _rxContext, const MapString2String& _rFieldAssignment ) SAL_THROW ( ( ) )
{
// want to have a non-const map for easier handling
MapString2String aFieldAssignment( _rFieldAssignment );
@@ -245,8 +245,8 @@ namespace abp
const ::rtl::OUString& sAddressBookNodeName = lcl_getAddressBookNodeName();
// create a config node for this
- OConfigurationTreeRoot aAddressBookSettings = OConfigurationTreeRoot::createWithServiceFactory(
- _rxORB, sAddressBookNodeName, -1, OConfigurationTreeRoot::CM_UPDATABLE);
+ OConfigurationTreeRoot aAddressBookSettings = OConfigurationTreeRoot::createWithComponentContext(
+ _rxContext, sAddressBookNodeName, -1, OConfigurationTreeRoot::CM_UPDATABLE);
OConfigurationNode aFields = aAddressBookSettings.openNode( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Fields" )) );
@@ -315,15 +315,15 @@ namespace abp
//.....................................................................
//-----------------------------------------------------------------
- void writeTemplateAddressSource( const Reference< XMultiServiceFactory >& _rxORB,
+ void writeTemplateAddressSource( const Reference< XComponentContext >& _rxContext,
const ::rtl::OUString& _rDataSourceName, const ::rtl::OUString& _rTableName ) SAL_THROW ( ( ) )
{
// access the configuration information which the driver uses for determining it's column names
const ::rtl::OUString& sAddressBookNodeName = lcl_getAddressBookNodeName();
// create a config node for this
- OConfigurationTreeRoot aAddressBookSettings = OConfigurationTreeRoot::createWithServiceFactory(
- _rxORB, sAddressBookNodeName, -1, OConfigurationTreeRoot::CM_UPDATABLE);
+ OConfigurationTreeRoot aAddressBookSettings = OConfigurationTreeRoot::createWithComponentContext(
+ _rxContext, sAddressBookNodeName, -1, OConfigurationTreeRoot::CM_UPDATABLE);
aAddressBookSettings.setNodeValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DataSourceName" )), makeAny( _rDataSourceName ) );
aAddressBookSettings.setNodeValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Command" )), makeAny( _rTableName ) );
@@ -334,14 +334,14 @@ namespace abp
}
//-----------------------------------------------------------------
- void markPilotSuccess( const Reference< XMultiServiceFactory >& _rxORB ) SAL_THROW ( ( ) )
+ void markPilotSuccess( const Reference< XComponentContext >& _rxContext ) SAL_THROW ( ( ) )
{
// access the configuration information which the driver uses for determining it's column names
const ::rtl::OUString& sAddressBookNodeName = lcl_getAddressBookNodeName();
// create a config node for this
- OConfigurationTreeRoot aAddressBookSettings = OConfigurationTreeRoot::createWithServiceFactory(
- _rxORB, sAddressBookNodeName, -1, OConfigurationTreeRoot::CM_UPDATABLE);
+ OConfigurationTreeRoot aAddressBookSettings = OConfigurationTreeRoot::createWithComponentContext(
+ _rxContext, sAddressBookNodeName, -1, OConfigurationTreeRoot::CM_UPDATABLE);
// set the flag
aAddressBookSettings.setNodeValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "AutoPilotCompleted" )), makeAny( (sal_Bool)sal_True ) );
diff --git a/extensions/source/abpilot/fieldmappingimpl.hxx b/extensions/source/abpilot/fieldmappingimpl.hxx
index c6d0e2a7ec75..ffafaec1ac29 100644
--- a/extensions/source/abpilot/fieldmappingimpl.hxx
+++ b/extensions/source/abpilot/fieldmappingimpl.hxx
@@ -29,6 +29,9 @@ namespace com { namespace sun { namespace star {
namespace lang {
class XMultiServiceFactory;
}
+ namespace uno {
+ class XComponentContext;
+ }
namespace beans {
class XPropertySet;
}
@@ -69,7 +72,7 @@ namespace abp
and this function creates a mapping which uses this configuration information.</p>
*/
void defaultMapping(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
MapString2String& /* [out] */ _rFieldAssignment
) SAL_THROW ( ( ) );
@@ -77,7 +80,7 @@ namespace abp
/** writes a field mapping for the template document address source
*/
void writeTemplateAddressFieldMapping(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
const MapString2String& _rFieldAssignment
) SAL_THROW ( ( ) );
@@ -95,7 +98,7 @@ namespace abp
expect it.
*/
void writeTemplateAddressSource(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
const ::rtl::OUString& _rDataSourceName,
const ::rtl::OUString& _rTableName
) SAL_THROW ( ( ) );
@@ -103,7 +106,7 @@ namespace abp
/** writes the configuration entry which states the the pilot has been completed successfully
*/
void markPilotSuccess(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext
) SAL_THROW ( ( ) );
//.....................................................................
diff --git a/extensions/source/propctrlr/propertyhandler.cxx b/extensions/source/propctrlr/propertyhandler.cxx
index 1bedb7c889c6..54a50c0476ba 100644
--- a/extensions/source/propctrlr/propertyhandler.cxx
+++ b/extensions/source/propctrlr/propertyhandler.cxx
@@ -406,8 +406,8 @@ namespace pcr
// read the measurement unit from the configuration
if ( !(sConfigurationLocation.isEmpty() || sConfigurationProperty.isEmpty()) )
{
- ::utl::OConfigurationTreeRoot aConfigTree( ::utl::OConfigurationTreeRoot::createWithServiceFactory(
- m_aContext.getLegacyServiceFactory(), sConfigurationLocation, -1, ::utl::OConfigurationTreeRoot::CM_READONLY ) );
+ ::utl::OConfigurationTreeRoot aConfigTree( ::utl::OConfigurationTreeRoot::createWithComponentContext(
+ m_aContext.getUNOContext(), sConfigurationLocation, -1, ::utl::OConfigurationTreeRoot::CM_READONLY ) );
sal_Int32 nUnitAsInt = (sal_Int32)FUNIT_NONE;
aConfigTree.getNodeValue( sConfigurationProperty ) >>= nUnitAsInt;
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index f64e3c950761..19268a708c35 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -776,8 +776,8 @@ void SvtFileDialog::Init_Impl
implArrangeControls();
/// read our settings from the configuration
- m_aConfiguration = OConfigurationTreeRoot::createWithServiceFactory(
- ::comphelper::getProcessServiceFactory(),
+ m_aConfiguration = OConfigurationTreeRoot::createWithComponentContext(
+ ::comphelper::getProcessComponentContext(),
OUString( "/org.openoffice.Office.UI/FilePicker" )
);
}
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index a8e7bcf3736f..22fec5990be5 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -4001,7 +4001,7 @@ void OReportController::checkChartEnabled()
try
{
::utl::OConfigurationTreeRoot aConfiguration(
- ::utl::OConfigurationTreeRoot::createWithServiceFactory( m_xServiceFactory, sConfigName ) );
+ ::utl::OConfigurationTreeRoot::createWithComponentContext( m_xContext, sConfigName ) );
sal_Bool bChartEnabled = sal_False;
if ( aConfiguration.hasByHierarchicalName(sPropertyName) )
diff --git a/reportdesign/source/ui/report/propbrw.cxx b/reportdesign/source/ui/report/propbrw.cxx
index 719691817efd..213a3985cd7a 100644
--- a/reportdesign/source/ui/report/propbrw.cxx
+++ b/reportdesign/source/ui/report/propbrw.cxx
@@ -70,13 +70,13 @@ using namespace ::comphelper;
//-----------------------------------------------------------------------
namespace
{
- static bool lcl_shouldEnableHelpSection( const Reference< XMultiServiceFactory >& _rxFactory )
+ static bool lcl_shouldEnableHelpSection( const Reference< XComponentContext >& _rxContext )
{
const ::rtl::OUString sConfigName( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.ReportDesign/PropertyBrowser/" ) );
const ::rtl::OUString sPropertyName( RTL_CONSTASCII_USTRINGPARAM( "DirectHelp" ) );
::utl::OConfigurationTreeRoot aConfiguration(
- ::utl::OConfigurationTreeRoot::createWithServiceFactory( _rxFactory, sConfigName ) );
+ ::utl::OConfigurationTreeRoot::createWithComponentContext( _rxContext, sConfigName ) );
bool bEnabled = false;
OSL_VERIFY( aConfiguration.getNodeValue( sPropertyName ) >>= bEnabled );
@@ -137,7 +137,7 @@ PropBrw::PropBrw(const Reference< XMultiServiceFactory >& _xORB,Window* pParen
::cppu::createComponentContext( aHandlerContextInfo, sizeof( aHandlerContextInfo ) / sizeof( aHandlerContextInfo[0] ),
xOwnContext ) );
// create a property browser controller
- bool bEnableHelpSection = lcl_shouldEnableHelpSection( m_xORB );
+ bool bEnableHelpSection = lcl_shouldEnableHelpSection( xOwnContext );
Reference< inspection::XObjectInspectorModel> xInspectorModel( bEnableHelpSection
? report::inspection::DefaultComponentInspectorModel::createWithHelpSection( m_xInspectorContext, 3, 8 )
: report::inspection::DefaultComponentInspectorModel::createDefault( m_xInspectorContext ) );
diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx
index 3cbfd6a32028..8b841ff8739b 100644
--- a/sfx2/source/dialog/filtergrouping.cxx
+++ b/sfx2/source/dialog/filtergrouping.cxx
@@ -315,8 +315,8 @@ namespace sfx2
{
//================================================================
// open our config node
- OConfigurationTreeRoot aFilterClassification = OConfigurationTreeRoot::createWithServiceFactory(
- ::comphelper::getProcessServiceFactory(),
+ OConfigurationTreeRoot aFilterClassification = OConfigurationTreeRoot::createWithComponentContext(
+ ::comphelper::getProcessComponentContext(),
DEFINE_CONST_OUSTRING( "org.openoffice.Office.UI/FilterClassification" ),
-1,
OConfigurationTreeRoot::CM_READONLY
diff --git a/svx/source/form/databaselocationinput.cxx b/svx/source/form/databaselocationinput.cxx
index e168ed60ad0c..a9b315d49429 100644
--- a/svx/source/form/databaselocationinput.cxx
+++ b/svx/source/form/databaselocationinput.cxx
@@ -161,8 +161,8 @@ namespace svx
{
// get the name of the default filter for database documents
::utl::OConfigurationTreeRoot aConfig(
- ::utl::OConfigurationTreeRoot::createWithServiceFactory(
- m_aContext.getLegacyServiceFactory(),
+ ::utl::OConfigurationTreeRoot::createWithComponentContext(
+ m_aContext.getUNOContext(),
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Setup/Office/Factories/com.sun.star.sdb.OfficeDatabaseDocument" ) )
) );
::rtl::OUString sDatabaseFilter;
diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx
index a0322a0b1630..29337638e2f5 100644
--- a/svx/source/form/fmPropBrw.cxx
+++ b/svx/source/form/fmPropBrw.cxx
@@ -513,13 +513,13 @@ IMPL_LINK( FmPropBrw, OnAsyncGetFocus, void*, /*NOTINTERESTEDIN*/ )
//-----------------------------------------------------------------------
namespace
{
- static bool lcl_shouldEnableHelpSection( const Reference< XMultiServiceFactory >& _rxFactory )
+ static bool lcl_shouldEnableHelpSection( const Reference< XComponentContext >& _rxContext )
{
const ::rtl::OUString sConfigName( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.Common/Forms/PropertyBrowser/" ) );
const ::rtl::OUString sPropertyName( RTL_CONSTASCII_USTRINGPARAM( "DirectHelp" ) );
::utl::OConfigurationTreeRoot aConfiguration(
- ::utl::OConfigurationTreeRoot::createWithServiceFactory( _rxFactory, sConfigName ) );
+ ::utl::OConfigurationTreeRoot::createWithComponentContext( _rxContext, sConfigName ) );
bool bEnabled = false;
OSL_VERIFY( aConfiguration.getNodeValue( sPropertyName ) >>= bEnabled );
@@ -576,7 +576,7 @@ void FmPropBrw::impl_createPropertyBrowser_throw( FmFormShell* _pFormShell )
::cppu::createComponentContext( aHandlerContextInfo, sizeof( aHandlerContextInfo ) / sizeof( aHandlerContextInfo[0] ),
xOwnContext ) );
- bool bEnableHelpSection = lcl_shouldEnableHelpSection( m_xORB );
+ bool bEnableHelpSection = lcl_shouldEnableHelpSection( xOwnContext );
// an object inspector model
m_xInspectorModel =
diff --git a/svx/source/form/fmcontrollayout.cxx b/svx/source/form/fmcontrollayout.cxx
index b10521e205c0..85c9f3f06d4c 100644
--- a/svx/source/form/fmcontrollayout.cxx
+++ b/svx/source/form/fmcontrollayout.cxx
@@ -285,8 +285,8 @@ namespace svxform
{
::rtl::OUString sConfigName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.Common/Forms/ControlLayout/" ) );
sConfigName += DocumentClassification::getModuleIdentifierForDocumentType( _eDocType );
- return OConfigurationTreeRoot::createWithServiceFactory(
- ::comphelper::getProcessServiceFactory(), // TODO
+ return OConfigurationTreeRoot::createWithComponentContext(
+ ::comphelper::getProcessComponentContext(), // TODO
sConfigName );
}
diff --git a/svx/source/form/fmsrccfg.cxx b/svx/source/form/fmsrccfg.cxx
index 3074c6858691..effb1bd4336b 100644
--- a/svx/source/form/fmsrccfg.cxx
+++ b/svx/source/form/fmsrccfg.cxx
@@ -163,7 +163,7 @@ namespace svxform
#define TA( c ) &c, getCppuType( &c )
FmSearchConfigItem::FmSearchConfigItem()
- :OConfigurationValueContainer( ::comphelper::getProcessServiceFactory(), m_aMutex, "/org.openoffice.Office.DataAccess/FormSearchOptions", CVC_UPDATE_ACCESS | CVC_LAZY_UPDATE, 2 )
+ :OConfigurationValueContainer( ::comphelper::getProcessComponentContext(), m_aMutex, "/org.openoffice.Office.DataAccess/FormSearchOptions", CVC_UPDATE_ACCESS | CVC_LAZY_UPDATE, 2 )
{
// register our members so the data exchange with the node values is done automatically
diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx
index 521ecf153caf..684a5662a524 100644
--- a/sw/source/ui/fldui/fldtdlg.cxx
+++ b/sw/source/ui/fldui/fldtdlg.cxx
@@ -87,8 +87,8 @@ SwFldDlg::SwFldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, Window *pParent)
AddTabPage(TP_FLD_FUNC, SwFldFuncPage::Create, 0);
utl::OConfigurationTreeRoot aCfgRoot
- = utl::OConfigurationTreeRoot::createWithServiceFactory(
- ::comphelper::getProcessServiceFactory(),
+ = utl::OConfigurationTreeRoot::createWithComponentContext(
+ ::comphelper::getProcessComponentContext(),
rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM(
"/org.openoffice.Office.DataAccess/Policies/Features/Writer" ) ),
diff --git a/unotools/inc/unotools/confignode.hxx b/unotools/inc/unotools/confignode.hxx
index 51ce1e05c904..765a5ecb23b6 100644
--- a/unotools/inc/unotools/confignode.hxx
+++ b/unotools/inc/unotools/confignode.hxx
@@ -288,21 +288,6 @@ namespace utl
In opposite to <method>createWithProvider</method>, createWithProvider expects a service factory. This factory
is used to create a configuration provider, and this provider is used to retrieve the node
@see createWithProvider
- @param _rxORB service factory to use to create the configuration provider.
- @param _rPath path to the node the object should represent
- @param _nDepth depth for node retrieval
- @param _eMode specifies which privileges should be applied when retrieving the node
- */
- static OConfigurationTreeRoot createWithServiceFactory(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
- const ::rtl::OUString& _rPath, sal_Int32 _nDepth = -1, CREATION_MODE _eMode = CM_UPDATABLE, sal_Bool _bLazyWrite = sal_True);
-
- /** open a new top-level configuration node<p/>
- opens a new node which is the root if an own configuration sub tree. This is what "top level" means: The
- node does not have a parent. It does not mean that the node represents a module tree (like org.openoffice.Office.Writer
- or such).<br/>
- In opposite to <method>createWithProvider</method>, createWithProvider expects a service factory. This factory
- is used to create a configuration provider, and this provider is used to retrieve the node
- @see createWithProvider
@param _rxContext service factory to use to create the configuration provider.
@param _rPath path to the node the object should represent
@param _nDepth depth for node retrieval
diff --git a/unotools/inc/unotools/configvaluecontainer.hxx b/unotools/inc/unotools/configvaluecontainer.hxx
index 42da163916c1..b01eb9e8119c 100644
--- a/unotools/inc/unotools/configvaluecontainer.hxx
+++ b/unotools/inc/unotools/configvaluecontainer.hxx
@@ -20,7 +20,7 @@
#ifndef UNOTOOLS_CONFIGVALUECONTAINER_HXX
#define UNOTOOLS_CONFIGVALUECONTAINER_HXX
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <osl/mutex.hxx>
//.........................................................................
@@ -84,7 +84,7 @@ namespace utl
specifies the number of levels to access under the node given by <arg>_pConfigLocation</arg>
*/
OConfigurationValueContainer(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB,
::osl::Mutex& _rAccessSafety,
const sal_Char* _pConfigLocation,
const sal_uInt16 _nAccessFlags = CVC_UPDATE_ACCESS | CVC_LAZY_UPDATE,
diff --git a/unotools/source/config/confignode.cxx b/unotools/source/config/confignode.cxx
index 6d118d2d1910..08cc4e16fdbe 100644
--- a/unotools/source/config/confignode.cxx
+++ b/unotools/source/config/confignode.cxx
@@ -586,12 +586,6 @@ namespace utl
}
//------------------------------------------------------------------------
- OConfigurationTreeRoot OConfigurationTreeRoot::createWithServiceFactory( const Reference< XMultiServiceFactory >& _rxORB, const ::rtl::OUString& _rPath, sal_Int32 _nDepth, CREATION_MODE _eMode, sal_Bool _bLazyWrite )
- {
- return createWithProvider( lcl_getConfigProvider( _rxORB ), _rPath, _nDepth, _eMode, _bLazyWrite );
- }
-
- //------------------------------------------------------------------------
OConfigurationTreeRoot OConfigurationTreeRoot::createWithComponentContext( const Reference< XComponentContext >& _rxContext, const ::rtl::OUString& _rPath, sal_Int32 _nDepth, CREATION_MODE _eMode, sal_Bool _bLazyWrite )
{
return createWithProvider( lcl_getConfigProvider( _rxContext ), _rPath, _nDepth, _eMode, _bLazyWrite );
diff --git a/unotools/source/config/configvaluecontainer.cxx b/unotools/source/config/configvaluecontainer.cxx
index fd3ca175df87..d41083b6cd21 100644
--- a/unotools/source/config/configvaluecontainer.cxx
+++ b/unotools/source/config/configvaluecontainer.cxx
@@ -212,13 +212,13 @@ namespace utl
//=====================================================================
struct OConfigurationValueContainerImpl
{
- Reference< XMultiServiceFactory > xORB; // the service factory
+ Reference< XComponentContext > xORB; // the service factory
::osl::Mutex& rMutex; // the mutex for accessing the data containers
OConfigurationTreeRoot aConfigRoot; // the configuration node we're accessing
NodeValueAccessors aAccessors; // the accessors to the node values
- OConfigurationValueContainerImpl( const Reference< XMultiServiceFactory >& _rxORB, ::osl::Mutex& _rMutex )
+ OConfigurationValueContainerImpl( const Reference< XComponentContext >& _rxORB, ::osl::Mutex& _rMutex )
:xORB( _rxORB )
,rMutex( _rMutex )
{
@@ -230,7 +230,7 @@ namespace utl
//=====================================================================
OConfigurationValueContainer::OConfigurationValueContainer(
- const Reference< XMultiServiceFactory >& _rxORB, ::osl::Mutex& _rAccessSafety,
+ const Reference< XComponentContext >& _rxORB, ::osl::Mutex& _rAccessSafety,
const sal_Char* _pConfigLocation, const sal_uInt16 _nAccessFlags, const sal_Int32 _nLevels )
:m_pImpl( new OConfigurationValueContainerImpl( _rxORB, _rAccessSafety ) )
{
@@ -249,7 +249,7 @@ namespace utl
// .................................
// create the configuration node we're about to work with
- m_pImpl->aConfigRoot = OConfigurationTreeRoot::createWithServiceFactory(
+ m_pImpl->aConfigRoot = OConfigurationTreeRoot::createWithComponentContext(
m_pImpl->xORB,
_rConfigLocation,
_nLevels,
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; };