[Libreoffice-commits] core.git: include/vcl vcl/source
panoskorovesis (via logerrit)
logerrit at kemper.freedesktop.org
Fri Aug 6 23:01:29 UTC 2021
include/vcl/filter/SvmWriter.hxx | 1 +
vcl/source/filter/svm/SvmWriter.cxx | 14 ++++++++++++++
2 files changed, 15 insertions(+)
New commits:
commit dded839196aa8ed20253025dd8200fb2ee50bcea
Author: panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Wed Aug 4 13:18:08 2021 +0300
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Sat Aug 7 01:00:51 2021 +0200
Add Handler for TextLanguage Write
The handler separates MetaTextLanguageAction::Write from metaact.hxx
Write implementation is now in SvmWriter.hxx
Change-Id: I1671a299e84f5575359474e0fc4f9128c738b1e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120111
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/include/vcl/filter/SvmWriter.hxx b/include/vcl/filter/SvmWriter.hxx
index 9162dc1af0e8..93d907a36522 100644
--- a/include/vcl/filter/SvmWriter.hxx
+++ b/include/vcl/filter/SvmWriter.hxx
@@ -69,4 +69,5 @@ public:
void RefPointHandler(MetaRefPointAction* pAction);
void CommentHandler(MetaCommentAction* pAction);
void LayoutModeHandler(MetaLayoutModeAction* pAction);
+ void TextLanguageHandler(MetaTextLanguageAction* pAction);
};
\ No newline at end of file
diff --git a/vcl/source/filter/svm/SvmWriter.cxx b/vcl/source/filter/svm/SvmWriter.cxx
index 3cddbd48edb5..c9f4ad52ec97 100644
--- a/vcl/source/filter/svm/SvmWriter.cxx
+++ b/vcl/source/filter/svm/SvmWriter.cxx
@@ -290,6 +290,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData)
}
break;
+ case MetaActionType::TEXTLANGUAGE:
+ {
+ auto* pMetaAction = static_cast<MetaTextLanguageAction*>(pAction);
+ TextLanguageHandler(pMetaAction);
+ }
+ break;
+
/* default case prevents test failure and will be
removed once all the handlers are completed */
default:
@@ -672,4 +679,11 @@ void SvmWriter::LayoutModeHandler(MetaLayoutModeAction* pAction)
VersionCompatWrite aCompat(mrStream, 1);
mrStream.WriteUInt32(static_cast<sal_uInt32>(pAction->GetLayoutMode()));
}
+
+void SvmWriter::TextLanguageHandler(MetaTextLanguageAction* pAction)
+{
+ mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType()));
+ VersionCompatWrite aCompat(mrStream, 1);
+ mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetTextLanguage()));
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list