From e7b6205bcf127d8afab8dfd015fef7573b296a22 Mon Sep 17 00:00:00 2001 From: panoskorovesis Date: Thu, 5 Aug 2021 17:37:13 +0300 Subject: Replace GDIMetaFile::Write and WriteGDIMetaFile with SvmWriter::Write MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the new write functionality. This change also sets SvmWriter::Write second argument as const, as it's value does not change Change-Id: I1620756542a0bc54b5f8fc7ce3f57d0243a2ee55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120408 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl --- sfx2/source/doc/sfxbasemodel.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 50835238c40b..6d501fb4107b 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -76,6 +76,7 @@ #include #include #include +#include #include #include #include @@ -2058,7 +2059,8 @@ Any SAL_CALL SfxBaseModel::getTransferData( const datatransfer::DataFlavor& aFla SvMemoryStream aMemStm( 65535, 65535 ); aMemStm.SetVersion( SOFFICE_FILEFORMAT_CURRENT ); - xMetaFile->Write( aMemStm ); + SvmWriter aWriter( aMemStm ); + aWriter.Write( *xMetaFile ); aAny <<= Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.TellEnd() ); } @@ -2076,7 +2078,8 @@ Any SAL_CALL SfxBaseModel::getTransferData( const datatransfer::DataFlavor& aFla SvMemoryStream aMemStm( 65535, 65535 ); aMemStm.SetVersion( SOFFICE_FILEFORMAT_CURRENT ); - xMetaFile->Write( aMemStm ); + SvmWriter aWriter( aMemStm ); + aWriter.Write( *xMetaFile ); aAny <<= Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.TellEnd() ); } -- cgit