diff options
author | panoskorovesis <panoskorovesis@outlook.com> | 2021-08-05 10:39:51 +0300 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2021-08-12 12:38:06 +0200 |
commit | 54edce8503deeef41e712cf75ef975884389105e (patch) | |
tree | 1f3a72d681973c4f5ebf203d0cb8cc84c4ff6e1d | |
parent | afc0c718ec9ca6a4fbe1324f68eb292d9a67b058 (diff) |
Add Handler for FillColor Write
The handler separates MetaFillColorAction::Write from metaact.hxx
Write implementation is now in SvmWriter.hxx
Change-Id: I324b1a41f1be122367a69b8ac601bd12ca8401fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120349
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 ff5e60d133b0..be1c133fc403 100644 --- a/include/vcl/filter/SvmWriter.hxx +++ b/include/vcl/filter/SvmWriter.hxx @@ -74,6 +74,7 @@ public: void ISectRegionClipRegionHandler(MetaISectRegionClipRegionAction* pAction); void MoveClipRegionHandler(MetaMoveClipRegionAction* pAction); void LineColorHandler(MetaLineColorAction* pAction); + void FillColorHandler(MetaFillColorAction* 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 401b86fd4b72..b8991575a0b0 100644 --- a/vcl/source/filter/svm/SvmWriter.cxx +++ b/vcl/source/filter/svm/SvmWriter.cxx @@ -326,6 +326,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData) } break; + case MetaActionType::FILLCOLOR: + { + auto* pMetaAction = static_cast<MetaFillColorAction*>(pAction); + FillColorHandler(pMetaAction); + } + break; + case MetaActionType::OVERLINECOLOR: { auto* pMetaAction = static_cast<MetaOverlineColorAction*>(pAction); @@ -879,6 +886,14 @@ void SvmWriter::LineColorHandler(MetaLineColorAction* pAction) mrStream.WriteBool(pAction->IsSetting()); } +void SvmWriter::FillColorHandler(MetaFillColorAction* pAction) +{ + mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); + VersionCompatWrite aCompat(mrStream, 1); + WriteColor(pAction->GetColor()); + mrStream.WriteBool(pAction->IsSetting()); +} + void SvmWriter::OverlineColorHandler(MetaOverlineColorAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); |