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 /sot/source | |
parent | 7634d064adc2c773288cec751674ff691de20b2b (diff) |
fdo#46808, Adapt TempFile UNO service to new style
Change-Id: Ia448d6d74201e2be487c6d8317f94be3745808aa
Diffstat (limited to 'sot/source')
-rw-r--r-- | sot/source/unoolestorage/xolesimplestorage.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sot/source/unoolestorage/xolesimplestorage.cxx b/sot/source/unoolestorage/xolesimplestorage.cxx index bd845c49552c..a1a93ae5f3d5 100644 --- a/sot/source/unoolestorage/xolesimplestorage.cxx +++ b/sot/source/unoolestorage/xolesimplestorage.cxx @@ -22,8 +22,10 @@ #include <com/sun/star/io/XInputStream.hpp> #include <com/sun/star/io/XSeekable.hpp> #include <com/sun/star/io/XTruncate.hpp> +#include <com/sun/star/io/TempFile.hpp> #include <comphelper/storagehelper.hxx> +#include <comphelper/componentcontext.hxx> #include <unotools/ucbstreamhelper.hxx> @@ -256,7 +258,7 @@ void SAL_CALL OLESimpleStorage::initialize( const uno::Sequence< uno::Any >& aAr else { uno::Reference < io::XStream > xTempFile( - m_xFactory->createInstance( ::rtl::OUString("com.sun.star.io.TempFile") ), + io::TempFile::create(comphelper::ComponentContext(m_xFactory).getUNOContext()), uno::UNO_QUERY_THROW ); uno::Reference < io::XSeekable > xTempSeek( xTempFile, uno::UNO_QUERY_THROW ); uno::Reference< io::XOutputStream > xTempOut = xTempFile->getOutputStream(); @@ -441,7 +443,7 @@ uno::Any SAL_CALL OLESimpleStorage::getByName( const ::rtl::OUString& aName ) uno::Any aResult; uno::Reference< io::XStream > xTempFile( - m_xFactory->createInstance( ::rtl::OUString("com.sun.star.io.TempFile") ), + io::TempFile::create(comphelper::ComponentContext(m_xFactory).getUNOContext()), uno::UNO_QUERY ); uno::Reference< io::XSeekable > xSeekable( xTempFile, uno::UNO_QUERY_THROW ); uno::Reference< io::XOutputStream > xOutputStream = xTempFile->getOutputStream(); |