diff options
author | panoskorovesis <panoskorovesis@outlook.com> | 2021-07-15 09:31:12 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-07-15 13:27:29 +0200 |
commit | df9ca514d4e9ea87bbf0a96d99181ed8965cd45a (patch) | |
tree | c9f2bb9285dccfe096ffdb3af1957a9cb4505901 /vcl | |
parent | f07e428f76c3498583cf4870e96a3b759bcc364c (diff) |
Add Handler for TextAlign Read
The handler separates MetaTextAlignAction::Read from metaact.hxx
Read implementation is now in SvmReader.hxx
Change-Id: I71953850d7bde50a552e0dc0a568175f15746e00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118967
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/filter/svm/SvmReader.cxx | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/vcl/source/filter/svm/SvmReader.cxx b/vcl/source/filter/svm/SvmReader.cxx index 29f2e5516681..004565f3e563 100644 --- a/vcl/source/filter/svm/SvmReader.cxx +++ b/vcl/source/filter/svm/SvmReader.cxx @@ -280,7 +280,7 @@ rtl::Reference<MetaAction> SvmReader::MetaActionHandler(ImplMetaReadData* pData) return OverlineColorHandler(); break; case MetaActionType::TEXTALIGN: - pAction = new MetaTextAlignAction; + return TextAlignHandler(); break; case MetaActionType::MAPMODE: pAction = new MetaMapModeAction; @@ -1215,4 +1215,18 @@ rtl::Reference<MetaAction> SvmReader::OverlineColorHandler() return pAction; } + +rtl::Reference<MetaAction> SvmReader::TextAlignHandler() +{ + auto pAction = new MetaTextAlignAction(); + + sal_uInt16 nTmp16(0); + + VersionCompatRead aCompat(mrStream); + mrStream.ReadUInt16(nTmp16); + + pAction->SetTextAlign(static_cast<TextAlign>(nTmp16)); + + return pAction; +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |