[Libreoffice-commits] core.git: include/vcl vcl/source
panoskorovesis (via logerrit)
logerrit at kemper.freedesktop.org
Thu Aug 12 10:54:34 UTC 2021
include/vcl/filter/SvmWriter.hxx | 1 +
vcl/source/filter/svm/SvmWriter.cxx | 20 +++++++++++++++-----
2 files changed, 16 insertions(+), 5 deletions(-)
New commits:
commit a129b138043ee167f1043725f5d918bb8535a292
Author: panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Thu Aug 5 10:49:29 2021 +0300
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Thu Aug 12 12:53:39 2021 +0200
Add Handler for TextLineColor Write
The handler separates MetaTextLineColorAction::Write from metaact.hxx
Remove default case as it's not needed anymore.
Write implementation is now in SvmWriter.hxx'
Change-Id: If0c23649d9fef49e07c558c8f7fddb028d5da9ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120372
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 073113bdeaad..8d2a195695b5 100644
--- a/include/vcl/filter/SvmWriter.hxx
+++ b/include/vcl/filter/SvmWriter.hxx
@@ -77,6 +77,7 @@ public:
void FillColorHandler(MetaFillColorAction* pAction);
void TextColorHandler(MetaTextColorAction* pAction);
void TextFillColorHandler(MetaTextFillColorAction* pAction);
+ void TextLineColorHandler(MetaTextLineColorAction* 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 9d3fbb26a494..bb1901f19dc2 100644
--- a/vcl/source/filter/svm/SvmWriter.cxx
+++ b/vcl/source/filter/svm/SvmWriter.cxx
@@ -347,6 +347,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData)
}
break;
+ case MetaActionType::TEXTLINECOLOR:
+ {
+ auto* pMetaAction = static_cast<MetaTextLineColorAction*>(pAction);
+ TextLineColorHandler(pMetaAction);
+ }
+ break;
+
case MetaActionType::OVERLINECOLOR:
{
auto* pMetaAction = static_cast<MetaOverlineColorAction*>(pAction);
@@ -444,11 +451,6 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData)
TextLanguageHandler(pMetaAction);
}
break;
-
- /* default case prevents test failure and will be
- removed once all the handlers are completed */
- default:
- pAction->Write(mrStream, pData);
}
}
@@ -923,6 +925,14 @@ void SvmWriter::TextFillColorHandler(MetaTextFillColorAction* pAction)
mrStream.WriteBool(pAction->IsSetting());
}
+void SvmWriter::TextLineColorHandler(MetaTextLineColorAction* 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