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

panoskorovesis (via logerrit) logerrit at kemper.freedesktop.org
Wed Jul 14 09:13:36 UTC 2021


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

New commits:
commit 250ac047f5aef05738600457354d4998a0456a51
Author:     panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Tue Jul 13 14:17:11 2021 +0300
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Jul 14 11:13:01 2021 +0200

    Add Handler for Wallpaper Read
    
    The handler separates MetaWallpaperAction::Read from metaact.hxx
    Read implementation is now in SvmReader.hxx
    
    Change-Id: I5878eb3c789dfa46ec6dbef358d26e69abc9e705
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118837
    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 d075955db479..c5c8568c25ef 100644
--- a/include/vcl/filter/SvmReader.hxx
+++ b/include/vcl/filter/SvmReader.hxx
@@ -68,6 +68,7 @@ public:
     rtl::Reference<MetaAction> GradientHandler();
     rtl::Reference<MetaAction> GradientExHandler();
     rtl::Reference<MetaAction> HatchHandler();
+    rtl::Reference<MetaAction> WallpaperHandler();
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index ccca055522df..df027889b4dd 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -1164,6 +1164,7 @@ public:
 
     const tools::Rectangle&    GetRect() const { return maRect; }
     const Wallpaper&    GetWallpaper() const { return maWallpaper; }
+    void                SetWallpaper(Wallpaper& rWallpaper) { maWallpaper = rWallpaper; }
 };
 
 class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaClipRegionAction final : public MetaAction
diff --git a/vcl/source/filter/svm/SvmReader.cxx b/vcl/source/filter/svm/SvmReader.cxx
index 357cd338db4c..5abf191a440a 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -247,7 +247,7 @@ rtl::Reference<MetaAction> SvmReader::MetaActionHandler(ImplMetaReadData* pData)
             return HatchHandler();
             break;
         case MetaActionType::WALLPAPER:
-            pAction = new MetaWallpaperAction;
+            return WallpaperHandler();
             break;
         case MetaActionType::CLIPREGION:
             pAction = new MetaClipRegionAction;
@@ -1076,4 +1076,17 @@ rtl::Reference<MetaAction> SvmReader::HatchHandler()
 
     return pAction;
 }
+
+rtl::Reference<MetaAction> SvmReader::WallpaperHandler()
+{
+    auto pAction = new MetaWallpaperAction();
+
+    VersionCompatRead aCompat(mrStream);
+    Wallpaper aWallpaper;
+    ReadWallpaper(mrStream, aWallpaper);
+
+    pAction->SetWallpaper(aWallpaper);
+
+    return pAction;
+}
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list