include/vcl/filter/SvmWriter.hxx | 1 + vcl/source/filter/svm/SvmWriter.cxx | 14 ++++++++++++++ 2 files changed, 15 insertions(+)
New commits: commit fba03519001f606f5ed5e7ae892dd76f004931b2 Author: panoskorovesis <panoskorove...@outlook.com> AuthorDate: Wed Aug 4 10:12:09 2021 +0300 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Fri Aug 6 10:48:08 2021 +0200 Add Handler for RasterOp Write The handler separates MetaRasterOpAction::Write from metaact.hxx Write implementation is now in SvmWriter.hxx Change-Id: I80647d924f978b15682c18f8a27eff5e58b0fdd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119965 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/include/vcl/filter/SvmWriter.hxx b/include/vcl/filter/SvmWriter.hxx index 5c83bfd8913c..79c0eec8c94c 100644 --- a/include/vcl/filter/SvmWriter.hxx +++ b/include/vcl/filter/SvmWriter.hxx @@ -62,4 +62,5 @@ public: void FontHandler(MetaFontAction* pAction, ImplMetaWriteData* pData); void PushHandler(MetaPushAction* pAction); void PopHandler(MetaPopAction* pAction); + void RasterOpHandler(MetaRasterOpAction* pAction); }; \ No newline at end of file diff --git a/vcl/source/filter/svm/SvmWriter.cxx b/vcl/source/filter/svm/SvmWriter.cxx index 375cda5218fd..3648e5672c73 100644 --- a/vcl/source/filter/svm/SvmWriter.cxx +++ b/vcl/source/filter/svm/SvmWriter.cxx @@ -241,6 +241,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData) } break; + case MetaActionType::RASTEROP: + { + auto* pMetaAction = static_cast<MetaRasterOpAction*>(pAction); + RasterOpHandler(pMetaAction); + } + break; + /* default case prevents test failure and will be removed once all the handlers are completed */ default: @@ -538,4 +545,11 @@ void SvmWriter::PopHandler(MetaPopAction* pAction) mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); } + +void SvmWriter::RasterOpHandler(MetaRasterOpAction* pAction) +{ + mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); + VersionCompatWrite aCompat(mrStream, 1); + mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetRasterOp())); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */