[Libreoffice-commits] core.git: include/vcl vcl/source
panoskorovesis (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jul 15 11:28:01 UTC 2021
include/vcl/filter/SvmReader.hxx | 1 +
include/vcl/metaact.hxx | 1 +
vcl/source/filter/svm/SvmReader.cxx | 16 +++++++++++++++-
3 files changed, 17 insertions(+), 1 deletion(-)
New commits:
commit df9ca514d4e9ea87bbf0a96d99181ed8965cd45a
Author: panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Thu Jul 15 09:31:12 2021 +0300
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Thu Jul 15 13:27:29 2021 +0200
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 at collabora.com>
diff --git a/include/vcl/filter/SvmReader.hxx b/include/vcl/filter/SvmReader.hxx
index cda79e0a9045..aab715edd408 100644
--- a/include/vcl/filter/SvmReader.hxx
+++ b/include/vcl/filter/SvmReader.hxx
@@ -77,6 +77,7 @@ public:
rtl::Reference<MetaAction> TextFillColorHandler();
rtl::Reference<MetaAction> TextLineColorHandler();
rtl::Reference<MetaAction> OverlineColorHandler();
+ rtl::Reference<MetaAction> TextAlignHandler();
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index 4fd9b39d98bb..4bf7c9b842c1 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -1484,6 +1484,7 @@ public:
explicit MetaTextAlignAction( TextAlign eAlign );
TextAlign GetTextAlign() const { return maAlign; }
+ void SetTextAlign(TextAlign eAlign) { maAlign = eAlign; }
};
class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaMapModeAction final : public MetaAction
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: */
More information about the Libreoffice-commits
mailing list