[Libreoffice-commits] core.git: include/vcl vcl/source
panoskorovesis (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jul 14 14:11:07 UTC 2021
include/vcl/filter/SvmReader.hxx | 1 +
include/vcl/metaact.hxx | 2 ++
vcl/source/filter/svm/SvmReader.cxx | 16 +++++++++++++++-
3 files changed, 18 insertions(+), 1 deletion(-)
New commits:
commit 8f00b018cd035db040ec18bff5c53571e3f86f93
Author: panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Wed Jul 14 13:07:41 2021 +0300
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Jul 14 16:10:32 2021 +0200
Add Handler for MoveClipRegion Read
The handler separates the MetaMoveClipRegion::Read from metaact.hxx
Read implementation is now in SvmReader.hxx
Change-Id: I12f987a2887060b30ae0496a5785baffe8550dfa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118895
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 23c2bee11698..2f953bac201c 100644
--- a/include/vcl/filter/SvmReader.hxx
+++ b/include/vcl/filter/SvmReader.hxx
@@ -72,6 +72,7 @@ public:
rtl::Reference<MetaAction> ClipRegionHandler();
rtl::Reference<MetaAction> ISectRectClipRegionHandler();
rtl::Reference<MetaAction> ISectRegionClipRegionHandler();
+ rtl::Reference<MetaAction> MoveClipRegionHandler();
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index 259b813b4db2..e8219081ad38 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -1284,6 +1284,8 @@ public:
tools::Long GetHorzMove() const { return mnHorzMove; }
tools::Long GetVertMove() const { return mnVertMove; }
+ void SetHorzMove(tools::Long nHorzMove) { mnHorzMove = nHorzMove; }
+ void SetVertMove(tools::Long nVertMove) { mnVertMove = nVertMove; }
};
class VCL_DLLPUBLIC MetaLineColorAction final : public MetaAction
diff --git a/vcl/source/filter/svm/SvmReader.cxx b/vcl/source/filter/svm/SvmReader.cxx
index 47683276eab4..1c009e093b56 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -259,7 +259,7 @@ rtl::Reference<MetaAction> SvmReader::MetaActionHandler(ImplMetaReadData* pData)
return ISectRegionClipRegionHandler();
break;
case MetaActionType::MOVECLIPREGION:
- pAction = new MetaMoveClipRegionAction;
+ return MoveClipRegionHandler();
break;
case MetaActionType::LINECOLOR:
return LineColorHandler();
@@ -1131,4 +1131,18 @@ rtl::Reference<MetaAction> SvmReader::ISectRegionClipRegionHandler()
return pAction;
}
+
+rtl::Reference<MetaAction> SvmReader::MoveClipRegionHandler()
+{
+ auto pAction = new MetaMoveClipRegionAction();
+
+ VersionCompatRead aCompat(mrStream);
+ sal_Int32 nTmpHM(0), nTmpVM(0);
+ mrStream.ReadInt32(nTmpHM).ReadInt32(nTmpVM);
+
+ pAction->SetHorzMove(nTmpHM);
+ pAction->SetVertMove(nTmpVM);
+
+ return pAction;
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list