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

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


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

New commits:
commit 9c0b114d1487868f4af189838c3136ce0cc6b751
Author:     panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Thu Aug 5 10:33:17 2021 +0300
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Thu Aug 12 02:24:00 2021 +0200

    Add Handler for MoveClipRegion Write
    
    The handler separates MetaMoveClipRegionAction::Write from metaact.hxx
    Write implementation is now in SvmWriter.hxx
    
    Change-Id: Ida80faec0c2389b267d77d5d12e4bde5ece24de8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120312
    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 c89b93fb52e7..0eb559b46366 100644
--- a/include/vcl/filter/SvmWriter.hxx
+++ b/include/vcl/filter/SvmWriter.hxx
@@ -72,6 +72,7 @@ public:
     void ClipRegionHandler(MetaClipRegionAction* pAction);
     void ISectRectClipRegionHandler(MetaISectRectClipRegionAction* pAction);
     void ISectRegionClipRegionHandler(MetaISectRegionClipRegionAction* pAction);
+    void MoveClipRegionHandler(MetaMoveClipRegionAction* 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 402d397dc21b..017cdb770185 100644
--- a/vcl/source/filter/svm/SvmWriter.cxx
+++ b/vcl/source/filter/svm/SvmWriter.cxx
@@ -312,6 +312,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData)
         }
         break;
 
+        case MetaActionType::MOVECLIPREGION:
+        {
+            auto* pMetaAction = static_cast<MetaMoveClipRegionAction*>(pAction);
+            MoveClipRegionHandler(pMetaAction);
+        }
+        break;
+
         case MetaActionType::OVERLINECOLOR:
         {
             auto* pMetaAction = static_cast<MetaOverlineColorAction*>(pAction);
@@ -850,6 +857,13 @@ void SvmWriter::ISectRegionClipRegionHandler(MetaISectRegionClipRegionAction* pA
     WriteRegion(mrStream, pAction->GetRegion());
 }
 
+void SvmWriter::MoveClipRegionHandler(MetaMoveClipRegionAction* pAction)
+{
+    mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType()));
+    VersionCompatWrite aCompat(mrStream, 1);
+    mrStream.WriteInt32(pAction->GetHorzMove()).WriteInt32(pAction->GetVertMove());
+}
+
 void SvmWriter::OverlineColorHandler(MetaOverlineColorAction* pAction)
 {
     mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType()));


More information about the Libreoffice-commits mailing list