summaryrefslogtreecommitdiff
path: root/linguistic/source/dlistimp.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-05-29 17:17:28 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-06-06 10:01:22 +0200
commitd08578912f2c9ef42d4349079422e25b951e544e (patch)
treed029b5a9110bcdc255e72ef9c98887f3f8521ea6 /linguistic/source/dlistimp.cxx
parent7d2a5b5114987f1ab415e32ebb5bb9a46b98dc17 (diff)
fdo#46808, Adapt UNO services to new style, Part 7, updating ::create
Update calls to factories to use new SimpleFileAccess::create method Change-Id: Ie5b0696fe2228a9033b19969245a53c21a61aa14 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, added some tweaks.
Diffstat (limited to 'linguistic/source/dlistimp.cxx')
-rw-r--r--linguistic/source/dlistimp.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index 316d86ddcc92..f5ac64054e0d 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.cxx
@@ -46,7 +46,8 @@
#include <com/sun/star/linguistic2/DictionaryEventFlags.hpp>
#include <com/sun/star/linguistic2/DictionaryListEventFlags.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
-#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
+#include <com/sun/star/ucb/SimpleFileAccess.hpp>
+#include <com/sun/star/ucb/XSimpleFileAccess2.hpp>
#include "defs.hxx"
#include "dlistimp.hxx"
@@ -899,14 +900,13 @@ static sal_Bool IsVers2OrNewer( const String& rFileURL, sal_uInt16& nLng, sal_Bo
return sal_False;
// get stream to be used
- uno::Reference< lang::XMultiServiceFactory > xServiceFactory( comphelper::getProcessServiceFactory() );
+ uno::Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext() );
// get XInputStream stream
uno::Reference< io::XInputStream > xStream;
try
{
- uno::Reference< ucb::XSimpleFileAccess > xAccess( xServiceFactory->createInstance(
- A2OU( "com.sun.star.ucb.SimpleFileAccess" ) ), uno::UNO_QUERY_THROW );
+ uno::Reference< ucb::XSimpleFileAccess2 > xAccess( ucb::SimpleFileAccess::create(xContext) );
xStream = xAccess->openFileRead( rFileURL );
}
catch (const uno::Exception &)