include/vcl/filter/SvmReader.hxx | 1 + include/vcl/metaact.hxx | 1 + vcl/source/filter/svm/SvmReader.cxx | 16 +++++++++++++++- 3 files changed, 17 insertions(+), 1 deletion(-)
New commits: commit 14c778017f79370e07b8acb5b801980ae9c7af02 Author: panoskorovesis <panoskorove...@outlook.com> AuthorDate: Thu Jul 15 10:58:00 2021 +0300 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Mon Jul 19 10:04:11 2021 +0200 Add Handler for RasterOp Read The handler separates MetaRasterOpAction::Read from metaact.hxx Read implementation is now in SvmReader.hxx Change-Id: I6beb3c546775c70b0f6a7fdcb9ca3e589bda099f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119092 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/include/vcl/filter/SvmReader.hxx b/include/vcl/filter/SvmReader.hxx index 5f44ece9f1ef..eda2a2547532 100644 --- a/include/vcl/filter/SvmReader.hxx +++ b/include/vcl/filter/SvmReader.hxx @@ -82,6 +82,7 @@ public: rtl::Reference<MetaAction> FontHandler(ImplMetaReadData* pData); rtl::Reference<MetaAction> PushHandler(); rtl::Reference<MetaAction> PopHandler(); + rtl::Reference<MetaAction> RasterOpHandler(); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx index 084944340450..2d1dde5e09b3 100644 --- a/include/vcl/metaact.hxx +++ b/include/vcl/metaact.hxx @@ -1619,6 +1619,7 @@ public: explicit MetaRasterOpAction( RasterOp eRasterOp ); RasterOp GetRasterOp() const { return meRasterOp; } + void SetRasterOp(const RasterOp eRasterOp) { meRasterOp = eRasterOp; } }; class SAL_DLLPUBLIC_RTTI MetaTransparentAction final : public MetaAction diff --git a/vcl/source/filter/svm/SvmReader.cxx b/vcl/source/filter/svm/SvmReader.cxx index d4d5953959e6..633be2a96105 100644 --- a/vcl/source/filter/svm/SvmReader.cxx +++ b/vcl/source/filter/svm/SvmReader.cxx @@ -296,7 +296,7 @@ rtl::Reference<MetaAction> SvmReader::MetaActionHandler(ImplMetaReadData* pData) return PopHandler(); break; case MetaActionType::RASTEROP: - pAction = new MetaRasterOpAction; + return RasterOpHandler(); break; case MetaActionType::Transparent: pAction = new MetaTransparentAction; @@ -1282,4 +1282,18 @@ rtl::Reference<MetaAction> SvmReader::PopHandler() return pAction; } + +rtl::Reference<MetaAction> SvmReader::RasterOpHandler() +{ + auto pAction = new MetaRasterOpAction(); + + sal_uInt16 nTmp16(0); + + VersionCompatRead aCompat(mrStream); + mrStream.ReadUInt16(nTmp16); + + pAction->SetRasterOp(static_cast<RasterOp>(nTmp16)); + + return pAction; +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits