diff options
author | Noel Grandin <noel@peralex.com> | 2012-08-17 14:55:54 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-08-23 09:58:25 +0200 |
commit | 3e7990faa4dda6022c63aebb2ac8f12b2bbc0731 (patch) | |
tree | b2daf5fcd8ffeb4ffc9b4c0183da590501d9d79c /comphelper/source | |
parent | 8b34ad6204ee35b7dca10d2b1c9761dfa72684a7 (diff) |
fdo#46808, Shiny UNO, Use factory to create XSimpleFileAccess instances
Change-Id: I86e2a8873e5646abd340015f500bf9e872e8e6c5
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'comphelper/source')
-rw-r--r-- | comphelper/source/misc/storagehelper.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
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 <com/sun/star/embed/XEncryptionProtectedSource2.hpp> #include <com/sun/star/embed/XTransactedObject.hpp> #include <com/sun/star/ucb/XSimpleFileAccess.hpp> +#include <com/sun/star/ucb/SimpleFileAccess.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/beans/NamedValue.hpp> @@ -34,6 +35,7 @@ #include <ucbhelper/content.hxx> +#include <comphelper/componentcontext.hxx> #include <comphelper/fileformat.h> #include <comphelper/processfactory.hxx> #include <comphelper/documentconstants.hxx> @@ -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(); |