fdo#46808, simplify OConfigurationTreeRoot constructor

.. doesn't need to take comphelper::ComponentContext as a param
anymore, can now use Reference<XComponentContext>

Change-Id: Ie5fbe0c9e8459cc612426ffa9474f955b28593e3
This commit is contained in:
Noel Grandin
2013-03-05 15:44:41 +02:00
parent e721452988
commit f084fc5c80
2 changed files with 5 additions and 5 deletions

View File

@@ -249,7 +249,7 @@ namespace utl
/** creates a configuration tree for the given path in the given mode /** creates a configuration tree for the given path in the given mode
*/ */
OConfigurationTreeRoot( OConfigurationTreeRoot(
const ::comphelper::ComponentContext& i_rContext, const css::uno::Reference<css::uno::XComponentContext> & i_rContext,
const ::rtl::OUString& i_rNodePath, const ::rtl::OUString& i_rNodePath,
const bool i_bUpdatable const bool i_bUpdatable
); );

View File

@@ -482,11 +482,11 @@ namespace utl
namespace namespace
{ {
//-------------------------------------------------------------------- //--------------------------------------------------------------------
Reference< XMultiServiceFactory > lcl_getConfigProvider( const ::comphelper::ComponentContext& i_rContext ) Reference< XMultiServiceFactory > lcl_getConfigProvider( const Reference<XComponentContext> & i_rContext )
{ {
try try
{ {
Reference< XMultiServiceFactory > xProvider = theDefaultProvider::get( i_rContext.getUNOContext() ); Reference< XMultiServiceFactory > xProvider = theDefaultProvider::get( i_rContext );
return xProvider; return xProvider;
} }
catch ( const Exception& ) catch ( const Exception& )
@@ -534,8 +534,8 @@ namespace utl
} }
//------------------------------------------------------------------------ //------------------------------------------------------------------------
OConfigurationTreeRoot::OConfigurationTreeRoot( const ::comphelper::ComponentContext& i_rContext, const ::rtl::OUString& i_rNodePath, const bool i_bUpdatable ) OConfigurationTreeRoot::OConfigurationTreeRoot( const Reference<XComponentContext> & i_rContext, const ::rtl::OUString& i_rNodePath, const bool i_bUpdatable )
:OConfigurationNode( lcl_createConfigurationRoot( lcl_getConfigProvider( i_rContext.getLegacyServiceFactory() ), :OConfigurationNode( lcl_createConfigurationRoot( lcl_getConfigProvider( i_rContext ),
i_rNodePath, i_bUpdatable, -1, false ).get() ) i_rNodePath, i_bUpdatable, -1, false ).get() )
,m_xCommitter() ,m_xCommitter()
{ {