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 --- sd/source/ui/unoidl/unopage.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sd/source/ui') diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index f774fad439ef..e80bf3f20591 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -1105,8 +1106,11 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName ) // Preview: WMF format. ConvertGDIMetaFileToWMF(*xMetaFile, aDestStrm, nullptr, false); else + { // PreviewMetafile: SVM format. - xMetaFile->Write(aDestStrm); + SvmWriter aWriter(aDestStrm); + aWriter.Write(*xMetaFile); + } Sequence aSeq( static_cast(aDestStrm.GetData()), aDestStrm.Tell() ); aAny <<= aSeq; } -- cgit