chart2/source/model/main/ChartModel_Persistence.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
New commits: commit ac5f11d86cd290deaed3565c558aced9f5eb6fca Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Fri Oct 21 19:49:22 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat Oct 22 08:28:11 2022 +0200 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.gran...@collabora.co.uk> 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 ); } }