[Libreoffice-commits] core.git: include/vcl vcl/source
panoskorovesis (via logerrit)
logerrit at kemper.freedesktop.org
Thu Aug 12 10:40:22 UTC 2021
include/vcl/filter/SvmWriter.hxx | 1 +
vcl/source/filter/svm/SvmWriter.cxx | 14 ++++++++++++++
2 files changed, 15 insertions(+)
New commits:
commit e1806bc9bb1704f9ee969271417a0cae98285fcd
Author: panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Thu Aug 5 10:45:13 2021 +0300
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Thu Aug 12 12:39:41 2021 +0200
Add Handler for TextColor Write
The handler separates MetaTextColorAction::Write from metaact.hxx
Write implementation is now in SvmWriter.hxx
Change-Id: I58f7102edeae6f9a712a79ed5de8ce9b3e27510a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120350
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 be1c133fc403..299e2c802471 100644
--- a/include/vcl/filter/SvmWriter.hxx
+++ b/include/vcl/filter/SvmWriter.hxx
@@ -75,6 +75,7 @@ public:
void MoveClipRegionHandler(MetaMoveClipRegionAction* pAction);
void LineColorHandler(MetaLineColorAction* pAction);
void FillColorHandler(MetaFillColorAction* pAction);
+ void TextColorHandler(MetaTextColorAction* 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 b8991575a0b0..fcf474019ecc 100644
--- a/vcl/source/filter/svm/SvmWriter.cxx
+++ b/vcl/source/filter/svm/SvmWriter.cxx
@@ -333,6 +333,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData)
}
break;
+ case MetaActionType::TEXTCOLOR:
+ {
+ auto* pMetaAction = static_cast<MetaTextColorAction*>(pAction);
+ TextColorHandler(pMetaAction);
+ }
+ break;
+
case MetaActionType::OVERLINECOLOR:
{
auto* pMetaAction = static_cast<MetaOverlineColorAction*>(pAction);
@@ -894,6 +901,13 @@ void SvmWriter::FillColorHandler(MetaFillColorAction* pAction)
mrStream.WriteBool(pAction->IsSetting());
}
+void SvmWriter::TextColorHandler(MetaTextColorAction* pAction)
+{
+ mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType()));
+ VersionCompatWrite aCompat(mrStream, 1);
+ WriteColor(pAction->GetColor());
+}
+
void SvmWriter::OverlineColorHandler(MetaOverlineColorAction* pAction)
{
mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType()));
More information about the Libreoffice-commits
mailing list