From 3e7990faa4dda6022c63aebb2ac8f12b2bbc0731 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 17 Aug 2012 14:55:54 +0200 Subject: fdo#46808, Shiny UNO, Use factory to create XSimpleFileAccess instances Change-Id: I86e2a8873e5646abd340015f500bf9e872e8e6c5 Signed-off-by: Stephan Bergmann --- comphelper/source/misc/storagehelper.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx index d43e68943855..ebe8c4146459 100644 --- a/comphelper/source/misc/storagehelper.cxx +++ b/comphelper/source/misc/storagehelper.cxx @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -34,6 +35,7 @@ #include +#include #include #include #include @@ -229,9 +231,8 @@ uno::Reference< io::XInputStream > OStorageHelper::GetInputStreamFromURL( if ( !xFactory.is() ) throw uno::RuntimeException(); - uno::Reference < ::com::sun::star::ucb::XSimpleFileAccess > xTempAccess( - xFactory->createInstance ( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" )) ), - uno::UNO_QUERY ); + uno::Reference < ucb::XSimpleFileAccess2 > xTempAccess( + ucb::SimpleFileAccess::create(comphelper::ComponentContext(xFactory).getUNOContext()) ); if ( !xTempAccess.is() ) throw uno::RuntimeException(); -- cgit