[Libreoffice-commits] core.git: include/vcl vcl/source
panoskorovesis (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jul 27 12:14:23 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 d2e47f496da7871e2f714bd39e7dc0b7428752bc
Author: panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Thu Jul 15 12:56:20 2021 +0300
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Tue Jul 27 14:13:47 2021 +0200
Add Handler for TextLanguage Read
The handler separates MetaTextLanguageAction::Read from metaact.hxx
Read implementation is now in SvmReader.hxx
Change-Id: I9862c21ab2f75a1365bdbc609e4c399694d0a9a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119538
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 1324cf54b622..ae655485a1af 100644
--- a/include/vcl/filter/SvmReader.hxx
+++ b/include/vcl/filter/SvmReader.hxx
@@ -89,6 +89,7 @@ public:
rtl::Reference<MetaAction> RefPointHandler();
rtl::Reference<MetaAction> CommentHandler();
rtl::Reference<MetaAction> LayoutModeHandler();
+ rtl::Reference<MetaAction> TextLanguageHandler();
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index c0a45d6bd426..a33cc6c13a8e 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -1851,6 +1851,7 @@ public:
explicit MetaTextLanguageAction( LanguageType );
LanguageType GetTextLanguage() const { return meTextLanguage; }
+ void SetTextLanguage(const LanguageType eTextLanguage) { meTextLanguage = eTextLanguage; }
};
#endif // INCLUDED_VCL_METAACT_HXX
diff --git a/vcl/source/filter/svm/SvmReader.cxx b/vcl/source/filter/svm/SvmReader.cxx
index fdfd3d23bbe6..875aaee733df 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -317,7 +317,7 @@ rtl::Reference<MetaAction> SvmReader::MetaActionHandler(ImplMetaReadData* pData)
return LayoutModeHandler();
break;
case MetaActionType::TEXTLANGUAGE:
- pAction = new MetaTextLanguageAction;
+ return TextLanguageHandler();
break;
default:
@@ -1427,4 +1427,17 @@ rtl::Reference<MetaAction> SvmReader::LayoutModeHandler()
return pAction;
}
+
+rtl::Reference<MetaAction> SvmReader::TextLanguageHandler()
+{
+ auto pAction = new MetaTextLanguageAction();
+
+ VersionCompatRead aCompat(mrStream);
+ sal_uInt16 nTmp = 0;
+ mrStream.ReadUInt16(nTmp);
+
+ pAction->SetTextLanguage(static_cast<LanguageType>(nTmp));
+
+ return pAction;
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list