diff options
author | Noel Grandin <noel@peralex.com> | 2012-08-23 17:23:26 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-08-27 15:40:08 +0200 |
commit | 206c70eef30f7b6f538b88f7fb9505f397bef073 (patch) | |
tree | d311561f2eb90b57aeed5c1642882a90ddbd4c6a /package/source/xstor/xfactory.cxx | |
parent | 7634d064adc2c773288cec751674ff691de20b2b (diff) |
fdo#46808, Adapt TempFile UNO service to new style
Change-Id: Ia448d6d74201e2be487c6d8317f94be3745808aa
Diffstat (limited to 'package/source/xstor/xfactory.cxx')
-rw-r--r-- | package/source/xstor/xfactory.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/package/source/xstor/xfactory.cxx b/package/source/xstor/xfactory.cxx index 8012c82072d5..302334646d25 100644 --- a/package/source/xstor/xfactory.cxx +++ b/package/source/xstor/xfactory.cxx @@ -22,6 +22,7 @@ #include <com/sun/star/embed/ElementModes.hpp> #include <com/sun/star/embed/StorageFormats.hpp> #include <com/sun/star/beans/PropertyValue.hpp> +#include <com/sun/star/io/TempFile.hpp> #include <com/sun/star/io/XSeekable.hpp> #include <comphelper/componentcontext.hxx> @@ -84,11 +85,8 @@ uno::Reference< uno::XInterface > SAL_CALL OStorageFactory::createInstance() { // TODO: reimplement TempStream service to support XStream interface uno::Reference < io::XStream > xTempStream( - m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.TempFile") ) ), - uno::UNO_QUERY ); - - if ( !xTempStream.is() ) - throw uno::RuntimeException(); // TODO: + io::TempFile::create(comphelper::ComponentContext(m_xFactory).getUNOContext()), + uno::UNO_QUERY_THROW ); return uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( new OStorage( xTempStream, |