diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-10-21 19:49:22 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-10-22 08:28:11 +0200 |
commit | ac5f11d86cd290deaed3565c558aced9f5eb6fca (patch) | |
tree | 549bafccb75eb491cd7e951eea6644c17e32e9b2 /chart2 | |
parent | 66fcc9db0f7eacd0ebda06d9ee634af2d0e73d04 (diff) |
use more TempFileFastService in chart2
Change-Id: I064246a8b649bdd6a7751c456ec935c819505057
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141651
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/model/main/ChartModel_Persistence.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx index 1fc753eeb8c4..e91df2e705a5 100644 --- a/chart2/source/model/main/ChartModel_Persistence.cxx +++ b/chart2/source/model/main/ChartModel_Persistence.cxx @@ -56,6 +56,7 @@ #include <ucbhelper/content.hxx> #include <unotools/ucbstreamhelper.hxx> +#include <unotools/tempfile.hxx> #include <utility> #include <vcl/cvtgrf.hxx> #include <comphelper/processfactory.hxx> @@ -303,8 +304,7 @@ void SAL_CALL ChartModel::storeToURL( { if( m_xContext.is() && aMediaDescriptorHelper.ISSET_OutputStream ) { - Reference< io::XStream > xStream( - io::TempFile::create(m_xContext), uno::UNO_QUERY_THROW ); + rtl::Reference< utl::TempFileFastService > xStream = new utl::TempFileFastService; Reference< io::XInputStream > xInputStream( xStream->getInputStream()); Reference< embed::XStorage > xStorage( @@ -313,8 +313,7 @@ void SAL_CALL ChartModel::storeToURL( { impl_store( aReducedMediaDescriptor, xStorage ); - Reference< io::XSeekable > xSeekable( xStream, uno::UNO_QUERY_THROW ); - xSeekable->seek( 0 ); + xStream->seek( 0 ); ::comphelper::OStorageHelper::CopyInputToOutput( xInputStream, aMediaDescriptorHelper.OutputStream ); } } |