diff options
author | panoskorovesis <panoskorovesis@outlook.com> | 2021-07-31 13:38:05 +0300 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2021-08-02 15:48:52 +0200 |
commit | 76b619cca484fb681a8f3c175337fda3aabe3c0f (patch) | |
tree | b9eb2bb4f1ca11312c2f01ff28fceecca9c067e0 /vcl | |
parent | 11c2aa79bd80a05cd77eafe5cb1a60db1f4f0742 (diff) |
Add Handler for Ellipse Write
The handler separates MetaEllipseAction::Write from metaact.hxx
Write implementation is now in SvmWriter.hxx
Change-Id: Iad944c41a88b2303abbdba8ce53528895773b01c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119733
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/filter/svm/SvmWriter.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vcl/source/filter/svm/SvmWriter.cxx b/vcl/source/filter/svm/SvmWriter.cxx index 73e5734297d9..fcc79a81a958 100644 --- a/vcl/source/filter/svm/SvmWriter.cxx +++ b/vcl/source/filter/svm/SvmWriter.cxx @@ -113,6 +113,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData) } break; + case MetaActionType::ELLIPSE: + { + auto* pMetaAction = static_cast<MetaEllipseAction*>(pAction); + EllipseHandler(pMetaAction); + } + break; + /* default case prevents test failure and will be removed once all the handlers are completed */ default: @@ -174,4 +181,13 @@ void SvmWriter::RoundRectHandler(MetaRoundRectAction* pAction) aSerializer.writeRectangle(pAction->GetRect()); mrStream.WriteUInt32(pAction->GetHorzRound()).WriteUInt32(pAction->GetVertRound()); } + +void SvmWriter::EllipseHandler(MetaEllipseAction* pAction) +{ + mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); + + VersionCompatWrite aCompat(mrStream, 1); + TypeSerializer aSerializer(mrStream); + aSerializer.writeRectangle(pAction->GetRect()); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |