summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-08-23 17:23:26 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-08-27 15:40:08 +0200
commit206c70eef30f7b6f538b88f7fb9505f397bef073 (patch)
treed311561f2eb90b57aeed5c1642882a90ddbd4c6a /ucb
parent7634d064adc2c773288cec751674ff691de20b2b (diff)
fdo#46808, Adapt TempFile UNO service to new style
Change-Id: Ia448d6d74201e2be487c6d8317f94be3745808aa
Diffstat (limited to 'ucb')
-rw-r--r--ucb/Library_ucpgvfs1.mk1
-rw-r--r--ucb/source/ucp/gvfs/gvfs_content.cxx7
2 files changed, 5 insertions, 3 deletions
diff --git a/ucb/Library_ucpgvfs1.mk b/ucb/Library_ucpgvfs1.mk
index 213c7fc789de..577b65d6eec1 100644
--- a/ucb/Library_ucpgvfs1.mk
+++ b/ucb/Library_ucpgvfs1.mk
@@ -41,6 +41,7 @@ $(eval $(call gb_Library_add_libs,ucpgvfs1,\
))
$(eval $(call gb_Library_use_libraries,ucpgvfs1,\
+ comphelper \
cppu \
cppuhelper \
sal \
diff --git a/ucb/source/ucp/gvfs/gvfs_content.cxx b/ucb/source/ucp/gvfs/gvfs_content.cxx
index fd51030dbfc5..037a8379db09 100644
--- a/ucb/source/ucp/gvfs/gvfs_content.cxx
+++ b/ucb/source/ucp/gvfs/gvfs_content.cxx
@@ -42,6 +42,7 @@
#include <com/sun/star/beans/PropertySetInfoChangeEvent.hpp>
#include <com/sun/star/io/XActiveDataSink.hpp>
#include <com/sun/star/io/XOutputStream.hpp>
+#include <com/sun/star/io/TempFile.hpp>
#include <com/sun/star/lang/IllegalAccessException.hpp>
#include <com/sun/star/ucb/ContentInfoAttribute.hpp>
#include <com/sun/star/ucb/InsertCommandArgument.hpp>
@@ -68,6 +69,7 @@
#include <com/sun/star/ucb/UnsupportedOpenModeException.hpp>
#include <com/sun/star/ucb/UnsupportedOpenModeException.hpp>
#include <com/sun/star/ucb/NameClashException.hpp>
+#include <comphelper/componentcontext.hxx>
#include <ucbhelper/contentidentifier.hxx>
#include <ucbhelper/propertyvalueset.hxx>
#include <ucbhelper/interactionrequest.hxx>
@@ -1444,12 +1446,11 @@ Content::createTempStream(
GnomeVFSHandle *handle = NULL;
::rtl::OString aURI = getOURI();
- osl::Guard< osl::Mutex > aGuard( m_aMutex );
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
// Something badly wrong happened - can't seek => stream to a temporary file
- const rtl::OUString sServiceName ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.io.TempFile" ) );
uno::Reference < io::XOutputStream > xTempOut =
uno::Reference < io::XOutputStream >
- ( m_xSMgr->createInstance( sServiceName ), uno::UNO_QUERY );
+ ( io::TempFile::create(comphelper::ComponentContext(m_xSMgr).getUNOContext()), uno::UNO_QUERY );
if ( !xTempOut.is() )
cancelCommandExecution( GNOME_VFS_ERROR_IO, xEnv );