diff options
Diffstat (limited to 'ucb/source/ucp/file/shell.cxx')
-rw-r--r-- | ucb/source/ucp/file/shell.cxx | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx index 3410248d4e58..348810e37857 100644 --- a/ucb/source/ucp/file/shell.cxx +++ b/ucb/source/ucp/file/shell.cxx @@ -28,6 +28,7 @@ #include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp> #include <com/sun/star/ucb/InsertCommandArgument.hpp> #include <com/sun/star/ucb/NameClash.hpp> +#include <com/sun/star/ucb/Store.hpp> #include <com/sun/star/ucb/XContentIdentifier.hpp> #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/ucb/XContentAccess.hpp> @@ -146,12 +147,12 @@ shell::MyProperty::~MyProperty() #include "filinl.hxx" -shell::shell( const uno::Reference< lang::XMultiServiceFactory >& xMultiServiceFactory, +shell::shell( const uno::Reference< uno::XComponentContext >& rxContext, FileProvider* pProvider, sal_Bool bWithConfig ) : TaskManager(), m_bWithConfig( bWithConfig ), m_pProvider( pProvider ), - m_xMultiServiceFactory( xMultiServiceFactory ), + m_xContext( rxContext ), Title( "Title" ), CasePreservingURL( "CasePreservingURL" ), IsDocument( "IsDocument" ), @@ -386,15 +387,9 @@ shell::shell( const uno::Reference< lang::XMultiServiceFactory >& xMultiServiceF if(m_bWithConfig) { - rtl::OUString Store("com.sun.star.ucb.Store"); - uno::Reference< XPropertySetRegistryFactory > xRegFac( - m_xMultiServiceFactory->createInstance( Store ), - uno::UNO_QUERY ); - if ( xRegFac.is() ) - { - // Open/create a registry - m_xFileRegistry = xRegFac->createPropertySetRegistry( rtl::OUString() ); - } + uno::Reference< XPropertySetRegistryFactory > xRegFac = ucb::Store::create( m_xContext ); + // Open/create a registry + m_xFileRegistry = xRegFac->createPropertySetRegistry( rtl::OUString() ); } } |