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

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


 include/vcl/filter/SvmWriter.hxx    |    2 ++
 vcl/source/filter/svm/SvmWriter.cxx |   30 ++++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+)

New commits:
commit b0d1f39266ec0a3bef63e66c8d97ba1d6652734b
Author:     panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Thu Aug 5 10:07:27 2021 +0300
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Thu Aug 12 02:22:46 2021 +0200

    Add Handler for ClipRegion Write
    
    The handler separates MetaClipRegionAction::Write from metaact.hxx
    Write implementation is now in SvmWriter.hxx
    
    Change-Id: If3f4682dbdef6a2a0bd11a51c4a4eb3a6ab8b0d1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120307
    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 c98570ff491a..e7c2a0adfbfe 100644
--- a/include/vcl/filter/SvmWriter.hxx
+++ b/include/vcl/filter/SvmWriter.hxx
@@ -69,6 +69,7 @@ public:
     void GradientExHandler(MetaGradientExAction* pAction);
     void HatchHandler(MetaHatchAction* pAction);
     void WallpaperHandler(MetaWallpaperAction* pAction);
+    void ClipRegionHandler(MetaClipRegionAction* 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 765bcb10e354..b310824f1beb 100644
--- a/vcl/source/filter/svm/SvmWriter.cxx
+++ b/vcl/source/filter/svm/SvmWriter.cxx
@@ -291,6 +291,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData)
         }
         break;
 
+        case MetaActionType::CLIPREGION:
+        {
+            auto* pMetaAction = static_cast<MetaClipRegionAction*>(pAction);
+            ClipRegionHandler(pMetaAction);
+        }
+        break;
+
         case MetaActionType::OVERLINECOLOR:
         {
             auto* pMetaAction = static_cast<MetaOverlineColorAction*>(pAction);
@@ -806,6 +813,14 @@ void SvmWriter::WallpaperHandler(MetaWallpaperAction* pAction)
     WriteWallpaper(mrStream, pAction->GetWallpaper());
 }
 
+void SvmWriter::ClipRegionHandler(MetaClipRegionAction* pAction)
+{
+    mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType()));
+    VersionCompatWrite aCompat(mrStream, 1);
+    WriteRegion(mrStream, pAction->GetRegion());
+    mrStream.WriteBool(pAction->IsClipping());
+}
+
 void SvmWriter::OverlineColorHandler(MetaOverlineColorAction* pAction)
 {
     mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType()));
commit f6032e23bbedebcbf32eeb56627d89489b52f024
Author:     panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Thu Aug 5 10:05:26 2021 +0300
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Thu Aug 12 02:22:29 2021 +0200

    Add Handler for Wallpaper Write
    
    The handler separates MetaWallpaperAction::Write from metaact.hxx
    Write implementation is now in SvmWriter.hxx
    
    Change-Id: Icfbb4ab5cf3d7ea803cb55405e82dc262f3958c9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120306
    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 5bd4ea67dde3..c98570ff491a 100644
--- a/include/vcl/filter/SvmWriter.hxx
+++ b/include/vcl/filter/SvmWriter.hxx
@@ -68,6 +68,7 @@ public:
     void GradientHandler(MetaGradientAction* pAction);
     void GradientExHandler(MetaGradientExAction* pAction);
     void HatchHandler(MetaHatchAction* pAction);
+    void WallpaperHandler(MetaWallpaperAction* 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 93f0c2b2baa6..765bcb10e354 100644
--- a/vcl/source/filter/svm/SvmWriter.cxx
+++ b/vcl/source/filter/svm/SvmWriter.cxx
@@ -284,6 +284,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData)
         }
         break;
 
+        case MetaActionType::WALLPAPER:
+        {
+            auto* pMetaAction = static_cast<MetaWallpaperAction*>(pAction);
+            WallpaperHandler(pMetaAction);
+        }
+        break;
+
         case MetaActionType::OVERLINECOLOR:
         {
             auto* pMetaAction = static_cast<MetaOverlineColorAction*>(pAction);
@@ -791,6 +798,14 @@ void SvmWriter::HatchHandler(MetaHatchAction* pAction)
     WriteHatch(mrStream, pAction->GetHatch());
 }
 
+void SvmWriter::WallpaperHandler(MetaWallpaperAction* pAction)
+{
+    mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType()));
+    VersionCompatWrite aCompat(mrStream, 1);
+
+    WriteWallpaper(mrStream, pAction->GetWallpaper());
+}
+
 void SvmWriter::OverlineColorHandler(MetaOverlineColorAction* pAction)
 {
     mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType()));


More information about the Libreoffice-commits mailing list