diff options
author | panoskorovesis <panoskorovesis@outlook.com> | 2021-07-13 13:54:37 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-07-14 08:52:04 +0200 |
commit | 9eed620ab1ea4ad67598b6026132d964e2e430bd (patch) | |
tree | b372639e49a4471832c889c47046283aaa2c444f /vcl | |
parent | 1583371d1d39c63940a3f58d3d2e940f903baa88 (diff) |
Add Handler for GradientEx Read
The handler separates MetaGradientExAction::Read metaact.hxx
Read implementation is now in SvmReader.hxx
Change-Id: I01f0de7ab62cf658bc88cf2232622197b127cc9a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118834
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/filter/svm/SvmReader.cxx | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/vcl/source/filter/svm/SvmReader.cxx b/vcl/source/filter/svm/SvmReader.cxx index 70105cf517a9..3cfe762de652 100644 --- a/vcl/source/filter/svm/SvmReader.cxx +++ b/vcl/source/filter/svm/SvmReader.cxx @@ -241,7 +241,7 @@ rtl::Reference<MetaAction> SvmReader::MetaActionHandler(ImplMetaReadData* pData) return GradientHandler(); break; case MetaActionType::GRADIENTEX: - pAction = new MetaGradientExAction; + return GradientExHandler(); break; case MetaActionType::HATCH: pAction = new MetaHatchAction; @@ -1043,4 +1043,21 @@ rtl::Reference<MetaAction> SvmReader::GradientHandler() return pAction; } + +rtl::Reference<MetaAction> SvmReader::GradientExHandler() +{ + auto pAction = new MetaGradientExAction(); + + VersionCompatRead aCompat(mrStream); + tools::PolyPolygon aPolyPoly; + ReadPolyPolygon(mrStream, aPolyPoly); + TypeSerializer aSerializer(mrStream); + Gradient aGradient; + aSerializer.readGradient(aGradient); + + pAction->SetGradient(aGradient); + pAction->SetPolyPolygon(aPolyPoly); + + return pAction; +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |