summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpanoskorovesis <panoskorovesis@outlook.com>2021-08-04 10:12:09 +0300
committerMiklos Vajna <vmiklos@collabora.com>2021-08-06 10:48:08 +0200
commitfba03519001f606f5ed5e7ae892dd76f004931b2 (patch)
tree7eec8bef20269b05cebe5b1761f7704d9085c7f7
parentbb2828cebf05467d2c301a476b2d485467de0c51 (diff)
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 <vmiklos@collabora.com>
-rw-r--r--include/vcl/filter/SvmWriter.hxx1
-rw-r--r--vcl/source/filter/svm/SvmWriter.cxx14
2 files changed, 15 insertions, 0 deletions
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: */