diff options
author | Noel Grandin <noel@peralex.com> | 2013-01-04 11:20:21 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-01-09 08:08:15 +0200 |
commit | 77d215ae2ed9bd08444a5128729066b6025bef27 (patch) | |
tree | 581ee6dc7eaaedd2cea591f64cbed17e3da507ac /unotools | |
parent | fd5a2eb07011e8aedfd5ef0a82edaf07221554ba (diff) |
fdo#46808, use new method OConfigurationTreeRoot::createWithComponentContext
.. everywhere that was using createWithServiceFactory, and delete the old
method.
Change-Id: I02cb2bfbcc2390494383579d2f14caa4fc5b8014
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/inc/unotools/confignode.hxx | 15 | ||||
-rw-r--r-- | unotools/inc/unotools/configvaluecontainer.hxx | 4 | ||||
-rw-r--r-- | unotools/source/config/confignode.cxx | 6 | ||||
-rw-r--r-- | unotools/source/config/configvaluecontainer.cxx | 8 |
4 files changed, 6 insertions, 27 deletions
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, |