diff options
author | panoskorovesis <panoskorovesis@outlook.com> | 2021-08-05 10:07:27 +0300 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2021-08-12 02:22:46 +0200 |
commit | b0d1f39266ec0a3bef63e66c8d97ba1d6652734b (patch) | |
tree | c86e72d3e37918e78df16a7dbe8d11fb0667447b | |
parent | f6032e23bbedebcbf32eeb56627d89489b52f024 (diff) |
Add Handler for ClipRegion Write
The handler separates MetaClipRegionAction::Write from metaact.hxx
Write implementation is now in SvmWriter.hxx
Change-Id: If3f4682dbdef6a2a0bd11a51c4a4eb3a6ab8b0d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120307
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
-rw-r--r-- | include/vcl/filter/SvmWriter.hxx | 1 | ||||
-rw-r--r-- | vcl/source/filter/svm/SvmWriter.cxx | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/include/vcl/filter/SvmWriter.hxx b/include/vcl/filter/SvmWriter.hxx index c98570ff491a..e7c2a0adfbfe 100644 --- a/include/vcl/filter/SvmWriter.hxx +++ b/include/vcl/filter/SvmWriter.hxx @@ -69,6 +69,7 @@ public: void GradientExHandler(MetaGradientExAction* pAction); void HatchHandler(MetaHatchAction* pAction); void WallpaperHandler(MetaWallpaperAction* pAction); + void ClipRegionHandler(MetaClipRegionAction* 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 765bcb10e354..b310824f1beb 100644 --- a/vcl/source/filter/svm/SvmWriter.cxx +++ b/vcl/source/filter/svm/SvmWriter.cxx @@ -291,6 +291,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData) } break; + case MetaActionType::CLIPREGION: + { + auto* pMetaAction = static_cast<MetaClipRegionAction*>(pAction); + ClipRegionHandler(pMetaAction); + } + break; + case MetaActionType::OVERLINECOLOR: { auto* pMetaAction = static_cast<MetaOverlineColorAction*>(pAction); @@ -806,6 +813,14 @@ void SvmWriter::WallpaperHandler(MetaWallpaperAction* pAction) WriteWallpaper(mrStream, pAction->GetWallpaper()); } +void SvmWriter::ClipRegionHandler(MetaClipRegionAction* pAction) +{ + mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); + VersionCompatWrite aCompat(mrStream, 1); + WriteRegion(mrStream, pAction->GetRegion()); + mrStream.WriteBool(pAction->IsClipping()); +} + void SvmWriter::OverlineColorHandler(MetaOverlineColorAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); |