summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorpanoskorovesis <panoskorovesis@outlook.com>2021-08-05 17:37:13 +0300
committerTomaž Vajngerl <quikee@gmail.com>2021-08-17 04:40:46 +0200
commite7b6205bcf127d8afab8dfd015fef7573b296a22 (patch)
treec73551370ada11d7e208afe550bd4a922377d889 /sfx2
parentdd3ab0fd737ff84657ff34eebafe2628f489e5a1 (diff)
Replace GDIMetaFile::Write and WriteGDIMetaFile with SvmWriter::Write
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 <quikee@gmail.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx7
1 files changed, 5 insertions, 2 deletions
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 <unotools/tempfile.hxx>
#include <osl/mutex.hxx>
#include <vcl/errcode.hxx>
+#include <vcl/filter/SvmWriter.hxx>
#include <vcl/salctype.hxx>
#include <vcl/gdimtf.hxx>
#include <comphelper/fileformat.h>
@@ -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() );
}