summaryrefslogtreecommitdiff
path: root/svx/source/xml/xmlgrhlp.cxx
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 /svx/source/xml/xmlgrhlp.cxx
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 'svx/source/xml/xmlgrhlp.cxx')
-rw-r--r--svx/source/xml/xmlgrhlp.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 27db089871a2..f6731422f0da 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -39,6 +39,7 @@
#include <unotools/streamwrap.hxx>
#include <unotools/tempfile.hxx>
#include <unotools/saveopt.hxx>
+#include <vcl/filter/SvmWriter.hxx>
#include <vcl/gfxlink.hxx>
#include <vcl/metaact.hxx>
#include <tools/zcodec.hxx>
@@ -152,7 +153,8 @@ GraphicInputStream::GraphicInputStream(GraphicObject const & aGraphicObject, con
{
pStream->SetVersion(SOFFICE_FILEFORMAT_8);
pStream->SetCompressMode(SvStreamCompressFlags::ZBITMAP);
- const_cast<GDIMetaFile&>(aGraphic.GetGDIMetaFile()).Write(*pStream);
+ SvmWriter aWriter(*pStream);
+ aWriter.Write(aGraphic.GetGDIMetaFile());
bRet = (pStream->GetError() == ERRCODE_NONE);
}
else if (!rMimeType.isEmpty())
@@ -808,7 +810,8 @@ OUString SvXMLGraphicHelper::implSaveGraphic(css::uno::Reference<css::graphic::X
}
else
{
- rMtf.Write(*pStream);
+ SvmWriter aWriter(*pStream);
+ aWriter.Write(rMtf);
}
bSuccess = (pStream->GetError() == ERRCODE_NONE);