[Libreoffice-commits] core.git: include/vcl vcl/source
panoskorovesis (via logerrit)
logerrit at kemper.freedesktop.org
Wed Aug 11 07:20:55 UTC 2021
include/vcl/filter/SvmWriter.hxx | 1 +
vcl/source/filter/svm/SvmWriter.cxx | 16 ++++++++++++++++
2 files changed, 17 insertions(+)
New commits:
commit 33243f20831f6efac14047f38d3e7d987aa632e0
Author: panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Thu Aug 5 09:50:02 2021 +0300
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Wed Aug 11 09:20:23 2021 +0200
Add Handler for Gradient Write
The handler separates MetaGradientAction::Write from metaact.hxx
Write implementation is now in SvmWriter.hxx
Change-Id: I31ae5f5331f780e095caaf200ea289332233fb52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120259
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 3763ef8ab8c2..c1dccf57525b 100644
--- a/include/vcl/filter/SvmWriter.hxx
+++ b/include/vcl/filter/SvmWriter.hxx
@@ -65,6 +65,7 @@ public:
void MaskHandler(MetaMaskAction* pAction);
void MaskScaleHandler(MetaMaskScaleAction* pAction);
void MaskScalePartHandler(MetaMaskScalePartAction* pAction);
+ void GradientHandler(MetaGradientAction* pAction);
void OverlineColorHandler(MetaOverlineColorAction* pAction);
void TextAlignHandler(MetaTextAlignAction* pAction);
void MapModeHandler(MetaMapModeAction* pAction);
diff --git a/vcl/source/filter/svm/SvmWriter.cxx b/vcl/source/filter/svm/SvmWriter.cxx
index 879909267071..3296221d6f11 100644
--- a/vcl/source/filter/svm/SvmWriter.cxx
+++ b/vcl/source/filter/svm/SvmWriter.cxx
@@ -263,6 +263,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData)
}
break;
+ case MetaActionType::GRADIENT:
+ {
+ auto* pMetaAction = static_cast<MetaGradientAction*>(pAction);
+ GradientHandler(pMetaAction);
+ }
+ break;
+
case MetaActionType::OVERLINECOLOR:
{
auto* pMetaAction = static_cast<MetaOverlineColorAction*>(pAction);
@@ -734,6 +741,15 @@ void SvmWriter::MaskScalePartHandler(MetaMaskScalePartAction* pAction)
}
}
+void SvmWriter::GradientHandler(MetaGradientAction* pAction)
+{
+ mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType()));
+ VersionCompatWrite aCompat(mrStream, 1);
+ TypeSerializer aSerializer(mrStream);
+ aSerializer.writeRectangle(pAction->GetRect());
+ aSerializer.writeGradient(pAction->GetGradient());
+}
+
void SvmWriter::OverlineColorHandler(MetaOverlineColorAction* pAction)
{
mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType()));
More information about the Libreoffice-commits
mailing list