include/vcl/filter/SvmReader.hxx | 1 + include/vcl/metaact.hxx | 2 ++ vcl/source/filter/svm/SvmReader.cxx | 18 +++++++++++++++++- 3 files changed, 20 insertions(+), 1 deletion(-)
New commits: commit ac42d6d01fcb64e8093d7f7b2833e9f9e3538369 Author: panoskorovesis <panoskorove...@outlook.com> AuthorDate: Wed Jul 14 23:06:33 2021 +0300 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Thu Jul 15 11:50:03 2021 +0200 Add Handler for TextLineColor Read The handler separates MetaTextLineColorAction::Read from metaact.hxx Read implementation is now in SvmReader.hxx Change-Id: I30848cea0d4f22f8d9fe327dc74f9ef16ae45d09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118956 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/include/vcl/filter/SvmReader.hxx b/include/vcl/filter/SvmReader.hxx index ce35d15c8165..c9439ecb6c06 100644 --- a/include/vcl/filter/SvmReader.hxx +++ b/include/vcl/filter/SvmReader.hxx @@ -75,6 +75,7 @@ public: rtl::Reference<MetaAction> MoveClipRegionHandler(); rtl::Reference<MetaAction> TextColorHandler(); rtl::Reference<MetaAction> TextFillColorHandler(); + rtl::Reference<MetaAction> TextLineColorHandler(); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx index b1c1b42e1bbf..81adb9c0cd1a 100644 --- a/include/vcl/metaact.hxx +++ b/include/vcl/metaact.hxx @@ -1427,6 +1427,8 @@ public: MetaTextLineColorAction( const Color& rColor, bool bSet ); const Color& GetColor() const { return maColor; } + void SetColor(const Color& rColor) { maColor = rColor; } + void SetSetting(bool bSet) { mbSet = bSet; } bool IsSetting() const { return mbSet; } }; diff --git a/vcl/source/filter/svm/SvmReader.cxx b/vcl/source/filter/svm/SvmReader.cxx index 2a0af4cd9441..663fd3955c30 100644 --- a/vcl/source/filter/svm/SvmReader.cxx +++ b/vcl/source/filter/svm/SvmReader.cxx @@ -274,7 +274,7 @@ rtl::Reference<MetaAction> SvmReader::MetaActionHandler(ImplMetaReadData* pData) return TextFillColorHandler(); break; case MetaActionType::TEXTLINECOLOR: - pAction = new MetaTextLineColorAction; + return TextLineColorHandler(); break; case MetaActionType::OVERLINECOLOR: pAction = new MetaOverlineColorAction; @@ -1183,4 +1183,20 @@ rtl::Reference<MetaAction> SvmReader::TextFillColorHandler() return pAction; } + +rtl::Reference<MetaAction> SvmReader::TextLineColorHandler() +{ + auto pAction = new MetaTextLineColorAction(); + + VersionCompatRead aCompat(mrStream); + Color aColor; + ReadColor(aColor); + bool bSet; + mrStream.ReadCharAsBool(bSet); + + pAction->SetColor(aColor); + pAction->SetSetting(bSet); + + return pAction; +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits