[Libreoffice-commits] core.git: include/vcl vcl/source
panoskorovesis (via logerrit)
logerrit at kemper.freedesktop.org
Thu Aug 12 10:38:46 UTC 2021
include/vcl/filter/SvmWriter.hxx | 1 +
vcl/source/filter/svm/SvmWriter.cxx | 15 +++++++++++++++
2 files changed, 16 insertions(+)
New commits:
commit 54edce8503deeef41e712cf75ef975884389105e
Author: panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Thu Aug 5 10:39:51 2021 +0300
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Thu Aug 12 12:38:06 2021 +0200
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 at gmail.com>
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()));
More information about the Libreoffice-commits
mailing list