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 f07e428f76c3498583cf4870e96a3b759bcc364c
Author:     panoskorovesis <panoskorove...@outlook.com>
AuthorDate: Wed Jul 14 23:20:05 2021 +0300
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Thu Jul 15 13:26:40 2021 +0200

    Add Handler for OverlineColor Read
    
    The handler separates MetaOverlineColorAction::Read from metaact.hxx
    Read implementation is now in SvmReader.hxx
    
    Change-Id: I3d713e7579e45efd49249425108b74ca1d54eb0d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118957
    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 c9439ecb6c06..cda79e0a9045 100644
--- a/include/vcl/filter/SvmReader.hxx
+++ b/include/vcl/filter/SvmReader.hxx
@@ -76,6 +76,7 @@ public:
     rtl::Reference<MetaAction> TextColorHandler();
     rtl::Reference<MetaAction> TextFillColorHandler();
     rtl::Reference<MetaAction> TextLineColorHandler();
+    rtl::Reference<MetaAction> OverlineColorHandler();
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index 81adb9c0cd1a..4fd9b39d98bb 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -1456,6 +1456,8 @@ public:
                         MetaOverlineColorAction( 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 663fd3955c30..29f2e5516681 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -277,7 +277,7 @@ rtl::Reference<MetaAction> 
SvmReader::MetaActionHandler(ImplMetaReadData* pData)
             return TextLineColorHandler();
             break;
         case MetaActionType::OVERLINECOLOR:
-            pAction = new MetaOverlineColorAction;
+            return OverlineColorHandler();
             break;
         case MetaActionType::TEXTALIGN:
             pAction = new MetaTextAlignAction;
@@ -1199,4 +1199,20 @@ rtl::Reference<MetaAction> 
SvmReader::TextLineColorHandler()
 
     return pAction;
 }
+
+rtl::Reference<MetaAction> SvmReader::OverlineColorHandler()
+{
+    auto pAction = new MetaOverlineColorAction();
+
+    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

Reply via email to