summaryrefslogtreecommitdiff
path: root/ucb/source/ucp/file/shell.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-10-31 16:08:53 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-11-05 16:43:14 +0100
commit8ec2fed7c88674258ce716e69ae31d8f9be7223c (patch)
treee6d6a9657a247bb787fb2bc17688cef456efa288 /ucb/source/ucp/file/shell.cxx
parent1dedb15b17a8e8bf04f248809ef48db663034254 (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.cxx17
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() );
}
}