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

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


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

New commits:
commit 7ddf7375fb5a8c6699d4128a80b9f24ec6b914ae
Author:     panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Thu Aug 5 10:37:48 2021 +0300
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Thu Aug 12 02:24:25 2021 +0200

    Add Handler for LineColor Write
    
    The handler separates MetaLineColorAction::Write from metaact.hxx
    Write implementation is now in SvmWriter.hxx
    
    Change-Id: Id308ce7c1b2efc7c58caf8e492eed242ccfb5c66
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120313
    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 0eb559b46366..ff5e60d133b0 100644
--- a/include/vcl/filter/SvmWriter.hxx
+++ b/include/vcl/filter/SvmWriter.hxx
@@ -73,6 +73,7 @@ public:
     void ISectRectClipRegionHandler(MetaISectRectClipRegionAction* pAction);
     void ISectRegionClipRegionHandler(MetaISectRegionClipRegionAction* pAction);
     void MoveClipRegionHandler(MetaMoveClipRegionAction* pAction);
+    void LineColorHandler(MetaLineColorAction* 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 017cdb770185..401b86fd4b72 100644
--- a/vcl/source/filter/svm/SvmWriter.cxx
+++ b/vcl/source/filter/svm/SvmWriter.cxx
@@ -319,6 +319,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData)
         }
         break;
 
+        case MetaActionType::LINECOLOR:
+        {
+            auto* pMetaAction = static_cast<MetaLineColorAction*>(pAction);
+            LineColorHandler(pMetaAction);
+        }
+        break;
+
         case MetaActionType::OVERLINECOLOR:
         {
             auto* pMetaAction = static_cast<MetaOverlineColorAction*>(pAction);
@@ -864,6 +871,14 @@ void SvmWriter::MoveClipRegionHandler(MetaMoveClipRegionAction* pAction)
     mrStream.WriteInt32(pAction->GetHorzMove()).WriteInt32(pAction->GetVertMove());
 }
 
+void SvmWriter::LineColorHandler(MetaLineColorAction* 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