[Libreoffice-commits] core.git: include/vcl vcl/source
panoskorovesis (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jul 14 14:10:18 UTC 2021
include/vcl/filter/SvmReader.hxx | 1 +
include/vcl/metaact.hxx | 1 +
vcl/source/filter/svm/SvmReader.cxx | 14 +++++++++++++-
3 files changed, 15 insertions(+), 1 deletion(-)
New commits:
commit ce30918cfe59a702dfe5f69ed84d13a0cc3de4bc
Author: panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Wed Jul 14 12:58:31 2021 +0300
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Jul 14 16:09:44 2021 +0200
Add Handler for ISectRegionClipRegion Read
The handler separates MetaISectRegionClipRegionAction::Read from
metaact.hxx. Read implementation is now in SvmReader.hxx
Change-Id: I49f6667f2e439c18ec4bc0cbc8d74b8203fc1472
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118894
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 a295990821c6..23c2bee11698 100644
--- a/include/vcl/filter/SvmReader.hxx
+++ b/include/vcl/filter/SvmReader.hxx
@@ -71,6 +71,7 @@ public:
rtl::Reference<MetaAction> WallpaperHandler();
rtl::Reference<MetaAction> ClipRegionHandler();
rtl::Reference<MetaAction> ISectRectClipRegionHandler();
+ rtl::Reference<MetaAction> ISectRegionClipRegionHandler();
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index 2d5ca05f7181..259b813b4db2 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -1254,6 +1254,7 @@ public:
virtual void Scale( double fScaleX, double fScaleY ) override;
const vcl::Region& GetRegion() const { return maRegion; }
+ void SetRegion(vcl::Region& rRegion) { maRegion = rRegion; }
};
class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaMoveClipRegionAction final : public MetaAction
diff --git a/vcl/source/filter/svm/SvmReader.cxx b/vcl/source/filter/svm/SvmReader.cxx
index 87d6157a7734..47683276eab4 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -256,7 +256,7 @@ rtl::Reference<MetaAction> SvmReader::MetaActionHandler(ImplMetaReadData* pData)
return ISectRectClipRegionHandler();
break;
case MetaActionType::ISECTREGIONCLIPREGION:
- pAction = new MetaISectRegionClipRegionAction;
+ return ISectRegionClipRegionHandler();
break;
case MetaActionType::MOVECLIPREGION:
pAction = new MetaMoveClipRegionAction;
@@ -1119,4 +1119,16 @@ rtl::Reference<MetaAction> SvmReader::ISectRectClipRegionHandler()
return pAction;
}
+
+rtl::Reference<MetaAction> SvmReader::ISectRegionClipRegionHandler()
+{
+ auto pAction = new MetaISectRegionClipRegionAction();
+
+ VersionCompatRead aCompat(mrStream);
+ vcl::Region aRegion;
+ ReadRegion(mrStream, aRegion);
+ pAction->SetRegion(aRegion);
+
+ return pAction;
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list