diff options
author | panoskorovesis <panoskorovesis@outlook.com> | 2021-07-15 12:40:31 +0300 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2021-07-27 10:35:59 +0200 |
commit | 6cb0afa58048773bf3c3f6bbd28496e44e7d12c5 (patch) | |
tree | bd7c5fe3313ff47507b6e39ecd8324a373e30718 | |
parent | 3acb69e376f36952cc07827214b048d2d6196632 (diff) |
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 <quikee@gmail.com>
-rw-r--r-- | include/vcl/filter/SvmReader.hxx | 1 | ||||
-rw-r--r-- | include/vcl/metaact.hxx | 1 | ||||
-rw-r--r-- | vcl/source/filter/svm/SvmReader.cxx | 15 |
3 files changed, 16 insertions, 1 deletions
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: */ |