[Libreoffice-commits] core.git: include/vcl vcl/source
panoskorovesis (via logerrit)
logerrit at kemper.freedesktop.org
Sat Jul 31 06:48:11 UTC 2021
include/vcl/filter/SvmWriter.hxx | 1 +
vcl/source/filter/svm/SvmWriter.cxx | 15 +++++++++++++++
2 files changed, 16 insertions(+)
New commits:
commit 7c18bfa1709147562ad045729d8a0a1a9b1f67ab
Author: panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Wed Jul 28 11:31:16 2021 +0300
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Sat Jul 31 08:47:37 2021 +0200
Add Handler for Point Write
The handler separates MetaPointAction::Write from metaact.hxx
Write implementation is now in SvmWriter.hxx
Change-Id: I771f7abbcf21ec34aae46d7232ca352de4ba75a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119591
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/include/vcl/filter/SvmWriter.hxx b/include/vcl/filter/SvmWriter.hxx
index c3502e3979c5..3273e12e7fe2 100644
--- a/include/vcl/filter/SvmWriter.hxx
+++ b/include/vcl/filter/SvmWriter.hxx
@@ -40,4 +40,5 @@ public:
void MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData);
void ActionHandler(MetaAction* pAction);
void PixelHandler(MetaPixelAction* pAction);
+ void PointHandler(MetaPointAction* pAction);
};
\ No newline at end of file
diff --git a/vcl/source/filter/svm/SvmWriter.cxx b/vcl/source/filter/svm/SvmWriter.cxx
index 37720b5d385e..c8abf09115f9 100644
--- a/vcl/source/filter/svm/SvmWriter.cxx
+++ b/vcl/source/filter/svm/SvmWriter.cxx
@@ -85,6 +85,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData)
}
break;
+ case MetaActionType::POINT:
+ {
+ auto pMetaAction = static_cast<MetaPointAction*>(pAction);
+ PointHandler(pMetaAction);
+ }
+ break;
+
/* default case prevents test failure and will be
removed once all the handlers are completed */
default:
@@ -105,4 +112,12 @@ void SvmWriter::PixelHandler(MetaPixelAction* pAction)
aSerializer.writePoint(pAction->GetPoint());
WriteColor(pAction->GetColor());
}
+
+void SvmWriter::PointHandler(MetaPointAction* pAction)
+{
+ mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType()));
+ VersionCompatWrite aCompat(mrStream, 1);
+ TypeSerializer aSerializer(mrStream);
+ aSerializer.writePoint(pAction->GetPoint());
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list