include/vcl/filter/SvmReader.hxx    |    1 +
 include/vcl/metaact.hxx             |    1 +
 vcl/source/filter/svm/SvmReader.cxx |   15 ++++++++++++++-
 3 files changed, 16 insertions(+), 1 deletion(-)

New commits:
commit e49ffd9ea4f3e183004f9f4aa4749f8fec46eb7f
Author:     panoskorovesis <panoskorove...@outlook.com>
AuthorDate: Wed Jul 14 13:20:44 2021 +0300
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Wed Jul 14 16:11:29 2021 +0200

    Add Handler for TextColor Read
    
    The handler separates MetaTextColorAction::Read from metaact.hxx
    Read implementation is now in SvmReader.hxx
    
    Change-Id: Ibff3c33b273efb581b8dbb03bddef9fd7c64f7fa
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118896
    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 2f953bac201c..66ec96b1afce 100644
--- a/include/vcl/filter/SvmReader.hxx
+++ b/include/vcl/filter/SvmReader.hxx
@@ -73,6 +73,7 @@ public:
     rtl::Reference<MetaAction> ISectRectClipRegionHandler();
     rtl::Reference<MetaAction> ISectRegionClipRegionHandler();
     rtl::Reference<MetaAction> MoveClipRegionHandler();
+    rtl::Reference<MetaAction> TextColorHandler();
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index e8219081ad38..bfbd08c3b0d9 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -1370,6 +1370,7 @@ public:
     explicit            MetaTextColorAction( const Color& );
 
     const Color&        GetColor() const { return maColor; }
+    void                SetColor(Color& rColor) { maColor = rColor; }
 };
 
 class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaTextFillColorAction final : public 
MetaAction
diff --git a/vcl/source/filter/svm/SvmReader.cxx 
b/vcl/source/filter/svm/SvmReader.cxx
index 1c009e093b56..56197443757d 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -268,7 +268,7 @@ rtl::Reference<MetaAction> 
SvmReader::MetaActionHandler(ImplMetaReadData* pData)
             return FillColorHandler();
             break;
         case MetaActionType::TEXTCOLOR:
-            pAction = new MetaTextColorAction;
+            return TextColorHandler();
             break;
         case MetaActionType::TEXTFILLCOLOR:
             pAction = new MetaTextFillColorAction;
@@ -1145,4 +1145,17 @@ rtl::Reference<MetaAction> 
SvmReader::MoveClipRegionHandler()
 
     return pAction;
 }
+
+rtl::Reference<MetaAction> SvmReader::TextColorHandler()
+{
+    auto pAction = new MetaTextColorAction();
+
+    VersionCompatRead aCompat(mrStream);
+    Color aColor;
+    ReadColor(aColor);
+
+    pAction->SetColor(aColor);
+
+    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