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 /svl | |
parent | 7634d064adc2c773288cec751674ff691de20b2b (diff) |
fdo#46808, Adapt TempFile UNO service to new style
Change-Id: Ia448d6d74201e2be487c6d8317f94be3745808aa
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/fsstor/fsstorage.cxx | 3 | ||||
-rw-r--r-- | svl/source/misc/documentlockfile.cxx | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx index 2272e72a62b4..03ad05bdfba8 100644 --- a/svl/source/fsstor/fsstorage.cxx +++ b/svl/source/fsstor/fsstorage.cxx @@ -39,6 +39,7 @@ #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> #include <com/sun/star/io/IOException.hpp> #include <com/sun/star/io/XTruncate.hpp> +#include <com/sun/star/io/TempFile.hpp> #include <com/sun/star/sdbc/XResultSet.hpp> #include <com/sun/star/sdbc/XRow.hpp> @@ -685,7 +686,7 @@ uno::Reference< io::XStream > SAL_CALL FSStorage::cloneStreamElement( const ::rt uno::Reference< io::XInputStream > xInStream = aResultContent.openStream(); xTempResult = uno::Reference < io::XStream >( - m_pImpl->m_xFactory->createInstance ( ::rtl::OUString("com.sun.star.io.TempFile") ), + io::TempFile::create(comphelper::ComponentContext(m_pImpl->m_xFactory).getUNOContext()), uno::UNO_QUERY_THROW ); uno::Reference < io::XOutputStream > xTempOut = xTempResult->getOutputStream(); uno::Reference < io::XInputStream > xTempIn = xTempResult->getInputStream(); diff --git a/svl/source/misc/documentlockfile.cxx b/svl/source/misc/documentlockfile.cxx index 3c77b261b929..17d9e7ca239e 100644 --- a/svl/source/misc/documentlockfile.cxx +++ b/svl/source/misc/documentlockfile.cxx @@ -25,6 +25,7 @@ #include <com/sun/star/ucb/InsertCommandArgument.hpp> #include <com/sun/star/ucb/NameClashException.hpp> #include <com/sun/star/io/WrongFormatException.hpp> +#include <com/sun/star/io/TempFile.hpp> #include <osl/time.h> #include <osl/security.hxx> @@ -36,6 +37,7 @@ #include <rtl/ustrbuf.hxx> #include <comphelper/processfactory.hxx> +#include <comphelper/componentcontext.hxx> #include <unotools/bootstrap.hxx> @@ -91,7 +93,7 @@ sal_Bool DocumentLockFile::CreateOwnLockFile() try { 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 > xSeekable( xTempFile, uno::UNO_QUERY_THROW ); |