diff options
author | Noel Grandin <noel@peralex.com> | 2012-10-31 16:08:53 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-11-05 16:43:14 +0100 |
commit | 8ec2fed7c88674258ce716e69ae31d8f9be7223c (patch) | |
tree | e6d6a9657a247bb787fb2bc17688cef456efa288 /ucb/source/ucp/file/shell.cxx | |
parent | 1dedb15b17a8e8bf04f248809ef48db663034254 (diff) |
fdo#46808, use service constructor for ucb::Store
Change-Id: I62719ef9d58215e287af3e1be52404993722ec67
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() ); } } |