[Libreoffice-commits] core.git: include/vcl vcl/source
panoskorovesis (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jul 27 12:14:40 UTC 2021
include/vcl/filter/SvmReader.hxx | 1 +
vcl/source/filter/svm/SvmReader.cxx | 12 ++++++++----
2 files changed, 9 insertions(+), 4 deletions(-)
New commits:
commit a66dc788d92d9ef0ab6a5a0339f02df0c39b97fb
Author: panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Sat Jul 17 10:13:18 2021 +0300
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Tue Jul 27 14:14:07 2021 +0200
Add Handler for MetaAction Read
The handler separates MetaAction::Read from metaact.hxx
Read implementation is now in SvmReader.hxx In this case the
handler doesn't read anything. It creates and returns a MetaAction
Change-Id: I01b23bd836c88f07dc9adde90a7e2da322b832f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119539
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/include/vcl/filter/SvmReader.hxx b/include/vcl/filter/SvmReader.hxx
index ae655485a1af..9ff9eda61e75 100644
--- a/include/vcl/filter/SvmReader.hxx
+++ b/include/vcl/filter/SvmReader.hxx
@@ -90,6 +90,7 @@ public:
rtl::Reference<MetaAction> CommentHandler();
rtl::Reference<MetaAction> LayoutModeHandler();
rtl::Reference<MetaAction> TextLanguageHandler();
+ static rtl::Reference<MetaAction> DefaultHandler();
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/filter/svm/SvmReader.cxx b/vcl/source/filter/svm/SvmReader.cxx
index 875aaee733df..a078c5694b1b 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -158,7 +158,7 @@ rtl::Reference<MetaAction> SvmReader::MetaActionHandler(ImplMetaReadData* pData)
switch (nType)
{
case MetaActionType::NONE:
- pAction = new MetaAction;
+ return DefaultHandler();
break;
case MetaActionType::PIXEL:
return PixelHandler();
@@ -327,9 +327,6 @@ rtl::Reference<MetaAction> SvmReader::MetaActionHandler(ImplMetaReadData* pData)
break;
}
- if (pAction)
- pAction->Read(mrStream, pData);
-
return pAction;
}
@@ -1440,4 +1437,11 @@ rtl::Reference<MetaAction> SvmReader::TextLanguageHandler()
return pAction;
}
+
+rtl::Reference<MetaAction> SvmReader::DefaultHandler()
+{
+ auto pAction = new MetaAction();
+
+ return pAction;
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list