[Libreoffice-commits] core.git: include/vcl vcl/source

panoskorovesis (via logerrit) logerrit at kemper.freedesktop.org
Thu Aug 12 10:54:10 UTC 2021


 include/vcl/filter/SvmWriter.hxx    |    1 +
 vcl/source/filter/svm/SvmWriter.cxx |   15 +++++++++++++++
 2 files changed, 16 insertions(+)

New commits:
commit 7ce78320b7bcf60ec2a2d661f3d91ab5ee89622e
Author:     panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Thu Aug 5 10:47:10 2021 +0300
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Thu Aug 12 12:53:20 2021 +0200

    Add Handler for TextFillColor Write
    
    The handler separates MetaTextFillColorAction::Write from metaact.hxx
    Write implementation is now in SvmWriter.hxx
    
    Change-Id: I9f67def86f0c189bed880f790760c18098611c45
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120351
    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 299e2c802471..073113bdeaad 100644
--- a/include/vcl/filter/SvmWriter.hxx
+++ b/include/vcl/filter/SvmWriter.hxx
@@ -76,6 +76,7 @@ public:
     void LineColorHandler(MetaLineColorAction* pAction);
     void FillColorHandler(MetaFillColorAction* pAction);
     void TextColorHandler(MetaTextColorAction* pAction);
+    void TextFillColorHandler(MetaTextFillColorAction* 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 fcf474019ecc..9d3fbb26a494 100644
--- a/vcl/source/filter/svm/SvmWriter.cxx
+++ b/vcl/source/filter/svm/SvmWriter.cxx
@@ -340,6 +340,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData)
         }
         break;
 
+        case MetaActionType::TEXTFILLCOLOR:
+        {
+            auto* pMetaAction = static_cast<MetaTextFillColorAction*>(pAction);
+            TextFillColorHandler(pMetaAction);
+        }
+        break;
+
         case MetaActionType::OVERLINECOLOR:
         {
             auto* pMetaAction = static_cast<MetaOverlineColorAction*>(pAction);
@@ -908,6 +915,14 @@ void SvmWriter::TextColorHandler(MetaTextColorAction* pAction)
     WriteColor(pAction->GetColor());
 }
 
+void SvmWriter::TextFillColorHandler(MetaTextFillColorAction* 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