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 6cb0afa58048773bf3c3f6bbd28496e44e7d12c5 Author: panoskorovesis <panoskorove...@outlook.com> AuthorDate: Thu Jul 15 12:40:31 2021 +0300 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Tue Jul 27 10:35:59 2021 +0200 Add Handler for LayoutMode Read The handler separates MetaLayoutAction::Read from metaact.hxx Read implementation is now in SvmReader.hxx Change-Id: Idd9e8f2db42b0fc6028c192f3fcba11c59917e17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119537 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/include/vcl/filter/SvmReader.hxx b/include/vcl/filter/SvmReader.hxx index f075e2899f6f..1324cf54b622 100644 --- a/include/vcl/filter/SvmReader.hxx +++ b/include/vcl/filter/SvmReader.hxx @@ -88,6 +88,7 @@ public: rtl::Reference<MetaAction> EPSHandler(); rtl::Reference<MetaAction> RefPointHandler(); rtl::Reference<MetaAction> CommentHandler(); + rtl::Reference<MetaAction> LayoutModeHandler(); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx index be174299d1f1..c0a45d6bd426 100644 --- a/include/vcl/metaact.hxx +++ b/include/vcl/metaact.hxx @@ -1825,6 +1825,7 @@ public: explicit MetaLayoutModeAction( ComplexTextLayoutFlags nLayoutMode ); ComplexTextLayoutFlags GetLayoutMode() const { return mnLayoutMode; } + void SetLayoutMode(const ComplexTextLayoutFlags nLayoutMode) { mnLayoutMode = nLayoutMode; } }; class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaTextLanguageAction final : public MetaAction diff --git a/vcl/source/filter/svm/SvmReader.cxx b/vcl/source/filter/svm/SvmReader.cxx index 587b31809c7d..fdfd3d23bbe6 100644 --- a/vcl/source/filter/svm/SvmReader.cxx +++ b/vcl/source/filter/svm/SvmReader.cxx @@ -314,7 +314,7 @@ rtl::Reference<MetaAction> SvmReader::MetaActionHandler(ImplMetaReadData* pData) return CommentHandler(); break; case MetaActionType::LAYOUTMODE: - pAction = new MetaLayoutModeAction; + return LayoutModeHandler(); break; case MetaActionType::TEXTLANGUAGE: pAction = new MetaTextLanguageAction; @@ -1414,4 +1414,17 @@ rtl::Reference<MetaAction> SvmReader::CommentHandler() return pAction; } + +rtl::Reference<MetaAction> SvmReader::LayoutModeHandler() +{ + auto pAction = new MetaLayoutModeAction(); + + VersionCompatRead aCompat(mrStream); + sal_uInt32 tmp; + mrStream.ReadUInt32(tmp); + + pAction->SetLayoutMode(static_cast<ComplexTextLayoutFlags>(tmp)); + + return pAction; +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits