summaryrefslogtreecommitdiff
path: root/sot/source/unoolestorage/xolesimplestorage.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sot/source/unoolestorage/xolesimplestorage.cxx')
-rw-r--r--sot/source/unoolestorage/xolesimplestorage.cxx6
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();