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

panoskorovesis (via logerrit) logerrit at kemper.freedesktop.org
Wed Jul 14 14:07:19 UTC 2021


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

New commits:
commit 8a13231580a806e3ee9b2d197d4cc118f30ab157
Author:     panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Wed Jul 14 12:40:11 2021 +0300
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Jul 14 16:06:43 2021 +0200

    Add Handler for ISectRectClipRegion Read
    
    The handler separates MetaISectRectClipRegionAction::Read from
    metaact.hxx. Read implementation is now in SvmReader.hxx
    
    Change-Id: I5db6d405ac926d8881acbb17b47610f24ce77994
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118892
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/include/vcl/filter/SvmReader.hxx b/include/vcl/filter/SvmReader.hxx
index 002157ff932b..a295990821c6 100644
--- a/include/vcl/filter/SvmReader.hxx
+++ b/include/vcl/filter/SvmReader.hxx
@@ -70,6 +70,7 @@ public:
     rtl::Reference<MetaAction> HatchHandler();
     rtl::Reference<MetaAction> WallpaperHandler();
     rtl::Reference<MetaAction> ClipRegionHandler();
+    rtl::Reference<MetaAction> ISectRectClipRegionHandler();
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index 40d31a6f452b..2d5ca05f7181 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -1225,6 +1225,7 @@ public:
     virtual void        Scale( double fScaleX, double fScaleY ) override;
 
     const tools::Rectangle&    GetRect() const { return maRect; }
+    void                SetRect(tools::Rectangle& rRect) { maRect = rRect; }
 };
 
 class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaISectRegionClipRegionAction final : public MetaAction
diff --git a/vcl/source/filter/svm/SvmReader.cxx b/vcl/source/filter/svm/SvmReader.cxx
index b01acffd92ad..87d6157a7734 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -253,7 +253,7 @@ rtl::Reference<MetaAction> SvmReader::MetaActionHandler(ImplMetaReadData* pData)
             return ClipRegionHandler();
             break;
         case MetaActionType::ISECTRECTCLIPREGION:
-            pAction = new MetaISectRectClipRegionAction;
+            return ISectRectClipRegionHandler();
             break;
         case MetaActionType::ISECTREGIONCLIPREGION:
             pAction = new MetaISectRegionClipRegionAction;
@@ -1105,4 +1105,18 @@ rtl::Reference<MetaAction> SvmReader::ClipRegionHandler()
 
     return pAction;
 }
+
+rtl::Reference<MetaAction> SvmReader::ISectRectClipRegionHandler()
+{
+    auto pAction = new MetaISectRectClipRegionAction();
+
+    VersionCompatRead aCompat(mrStream);
+    TypeSerializer aSerializer(mrStream);
+    tools::Rectangle aRect;
+    aSerializer.readRectangle(aRect);
+
+    pAction->SetRect(aRect);
+
+    return pAction;
+}
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list