[Libreoffice-commits] core.git: include/vcl vcl/source
panoskorovesis (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jul 19 08:03:12 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 4c525a0ec8734c09474395f887e7f58d0410605f
Author: panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Thu Jul 15 10:39:23 2021 +0300
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Jul 19 10:02:38 2021 +0200
Add Handler for Push Read
The handler separates MetaPushAction::Read from metaact.hxx
Read implementation is now in SvmReader.hxx
Change-Id: I16a36af9dfea7526d429675b7b0d39d1bd1d6dcb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118980
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 aa0fcda1aa20..1a7960d322f9 100644
--- a/include/vcl/filter/SvmReader.hxx
+++ b/include/vcl/filter/SvmReader.hxx
@@ -80,6 +80,7 @@ public:
rtl::Reference<MetaAction> TextAlignHandler();
rtl::Reference<MetaAction> MapModeHandler();
rtl::Reference<MetaAction> FontHandler(ImplMetaReadData* pData);
+ rtl::Reference<MetaAction> PushHandler();
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index 03631e6000a1..084944340450 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -1575,6 +1575,7 @@ public:
explicit MetaPushAction( PushFlags nFlags );
PushFlags GetFlags() const { return mnFlags; }
+ void SetPushFlags(const PushFlags nFlags) { mnFlags = nFlags; }
};
class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaPopAction final : public MetaAction
diff --git a/vcl/source/filter/svm/SvmReader.cxx b/vcl/source/filter/svm/SvmReader.cxx
index 7c1b101e925a..0a8a4ebf2dfd 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -290,7 +290,7 @@ rtl::Reference<MetaAction> SvmReader::MetaActionHandler(ImplMetaReadData* pData)
return FontHandler(pData);
break;
case MetaActionType::PUSH:
- pAction = new MetaPushAction;
+ return PushHandler();
break;
case MetaActionType::POP:
pAction = new MetaPopAction;
@@ -1260,4 +1260,17 @@ rtl::Reference<MetaAction> SvmReader::FontHandler(ImplMetaReadData* pData)
return pAction;
}
+
+rtl::Reference<MetaAction> SvmReader::PushHandler()
+{
+ auto pAction = new MetaPushAction();
+
+ VersionCompatRead aCompat(mrStream);
+ sal_uInt16 tmp;
+ mrStream.ReadUInt16(tmp);
+
+ pAction->SetPushFlags(static_cast<PushFlags>(tmp));
+
+ return pAction;
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list