include/vcl/filter/SvmWriter.hxx | 1 + vcl/source/filter/svm/SvmWriter.cxx | 17 +++++++++++++++++ 2 files changed, 18 insertions(+)
New commits: commit 1a04ee2643ba970ededf1259918dea0122b9166c Author: panoskorovesis <panoskorove...@outlook.com> AuthorDate: Wed Aug 4 12:56:49 2021 +0300 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Sat Aug 7 00:59:38 2021 +0200 Add Handler for RefPoint Write The handler separates MetaRefPointAction::Write from metaact.hxx Write implementation is now in SvmWriter.hxx Change-Id: I04e666748ff75a145af8e3c1e44ae4f119cc1b1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120108 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/include/vcl/filter/SvmWriter.hxx b/include/vcl/filter/SvmWriter.hxx index 014b59afbec5..ae2a690079c4 100644 --- a/include/vcl/filter/SvmWriter.hxx +++ b/include/vcl/filter/SvmWriter.hxx @@ -66,4 +66,5 @@ public: void TransparentHandler(MetaTransparentAction* pAction); void FloatTransparentHandler(MetaFloatTransparentAction* pAction); void EPSHandler(MetaEPSAction* pAction); + void RefPointHandler(MetaRefPointAction* pAction); }; \ No newline at end of file diff --git a/vcl/source/filter/svm/SvmWriter.cxx b/vcl/source/filter/svm/SvmWriter.cxx index 057a5e7c1bc0..eb2ea4835282 100644 --- a/vcl/source/filter/svm/SvmWriter.cxx +++ b/vcl/source/filter/svm/SvmWriter.cxx @@ -269,6 +269,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData) } break; + case MetaActionType::REFPOINT: + { + auto* pMetaAction = static_cast<MetaRefPointAction*>(pAction); + RefPointHandler(pMetaAction); + } + break; + /* default case prevents test failure and will be removed once all the handlers are completed */ default: @@ -623,4 +630,14 @@ void SvmWriter::EPSHandler(MetaEPSAction* pAction) GDIMetaFile aMtf = pAction->GetSubstitute(); aWriter.Write(aMtf); } + +void SvmWriter::RefPointHandler(MetaRefPointAction* pAction) +{ + mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); + VersionCompatWrite aCompat(mrStream, 1); + + TypeSerializer aSerializer(mrStream); + aSerializer.writePoint(pAction->GetRefPoint()); + mrStream.WriteBool(pAction->IsSetting()); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */