include/vcl/filter/SvmWriter.hxx | 1 + vcl/source/filter/svm/SvmWriter.cxx | 15 +++++++++++++++ 2 files changed, 16 insertions(+)
New commits: commit afef5aece1424be8b3e186ae28fb2c26ffcad0ea Author: panoskorovesis <panoskorove...@outlook.com> AuthorDate: Tue Aug 3 09:41:49 2021 +0300 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Wed Aug 4 00:51:48 2021 +0200 Add Handler for OverlineColor Write The handler separates MetaOverlineColorAction::Write from metaact.hxx Write implementation is now in SvmWriter.hxx Change-Id: I928af66b250d5f898303fad46c6a7a7339ec0e69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119920 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/include/vcl/filter/SvmWriter.hxx b/include/vcl/filter/SvmWriter.hxx index 9c1cd0d1d23b..d7a66a3e5b27 100644 --- a/include/vcl/filter/SvmWriter.hxx +++ b/include/vcl/filter/SvmWriter.hxx @@ -56,4 +56,5 @@ public: void StretchTextHandler(MetaStretchTextAction* pAction, ImplMetaWriteData* pData); void TextRectHandler(MetaTextRectAction* pAction, ImplMetaWriteData* pData); void TextLineHandler(MetaTextLineAction* pAction); + void OverlineColorHandler(MetaOverlineColorAction* pAction); }; \ No newline at end of file diff --git a/vcl/source/filter/svm/SvmWriter.cxx b/vcl/source/filter/svm/SvmWriter.cxx index e3d6f3b4e791..bd2dae5c9926 100644 --- a/vcl/source/filter/svm/SvmWriter.cxx +++ b/vcl/source/filter/svm/SvmWriter.cxx @@ -197,6 +197,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData) } break; + case MetaActionType::OVERLINECOLOR: + { + auto* pMetaAction = static_cast<MetaOverlineColorAction*>(pAction); + OverlineColorHandler(pMetaAction); + } + break; + /* default case prevents test failure and will be removed once all the handlers are completed */ default: @@ -448,4 +455,12 @@ void SvmWriter::TextLineHandler(MetaTextLineAction* pAction) // new in version 2 mrStream.WriteUInt32(pAction->GetOverline()); } + +void SvmWriter::OverlineColorHandler(MetaOverlineColorAction* pAction) +{ + mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); + VersionCompatWrite aCompat(mrStream, 1); + WriteColor(pAction->GetColor()); + mrStream.WriteBool(pAction->IsSetting()); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */