[Libreoffice-commits] core.git: include/vcl vcl/source
panoskorovesis (via logerrit)
logerrit at kemper.freedesktop.org
Wed Aug 11 07:24:13 UTC 2021
include/vcl/filter/SvmWriter.hxx | 1 +
vcl/source/filter/svm/SvmWriter.cxx | 20 ++++++++++++++++++++
2 files changed, 21 insertions(+)
New commits:
commit b50ea6333e31757ab7fb365299351d6aabe4c101
Author: panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Thu Aug 5 10:02:19 2021 +0300
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Wed Aug 11 09:23:40 2021 +0200
Add Handler for Hatch Write
The handler separates MetaHatchAction::Write from metaact.hxx
Write implementation is now in SvmWriter.hxx
Change-Id: I29587d4a9e9129c5425792e2f8873ee7414bdaa0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120264
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 c52b7387d79a..5bd4ea67dde3 100644
--- a/include/vcl/filter/SvmWriter.hxx
+++ b/include/vcl/filter/SvmWriter.hxx
@@ -67,6 +67,7 @@ public:
void MaskScalePartHandler(MetaMaskScalePartAction* pAction);
void GradientHandler(MetaGradientAction* pAction);
void GradientExHandler(MetaGradientExAction* pAction);
+ void HatchHandler(MetaHatchAction* 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 8e9972e08a0d..93f0c2b2baa6 100644
--- a/vcl/source/filter/svm/SvmWriter.cxx
+++ b/vcl/source/filter/svm/SvmWriter.cxx
@@ -277,6 +277,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData)
}
break;
+ case MetaActionType::HATCH:
+ {
+ auto* pMetaAction = static_cast<MetaHatchAction*>(pAction);
+ HatchHandler(pMetaAction);
+ }
+ break;
+
case MetaActionType::OVERLINECOLOR:
{
auto* pMetaAction = static_cast<MetaOverlineColorAction*>(pAction);
@@ -771,6 +778,19 @@ void SvmWriter::GradientExHandler(MetaGradientExAction* pAction)
aSerializer.writeGradient(pAction->GetGradient());
}
+void SvmWriter::HatchHandler(MetaHatchAction* pAction)
+{
+ mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType()));
+ VersionCompatWrite aCompat(mrStream, 1);
+
+ // #i105373# see comment at MetaTransparentAction::Write
+ tools::PolyPolygon aNoCurvePolyPolygon;
+ pAction->GetPolyPolygon().AdaptiveSubdivide(aNoCurvePolyPolygon);
+
+ WritePolyPolygon(mrStream, aNoCurvePolyPolygon);
+ WriteHatch(mrStream, pAction->GetHatch());
+}
+
void SvmWriter::OverlineColorHandler(MetaOverlineColorAction* pAction)
{
mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType()));
More information about the Libreoffice-commits
mailing list