From 76b619cca484fb681a8f3c175337fda3aabe3c0f Mon Sep 17 00:00:00 2001 From: panoskorovesis Date: Sat, 31 Jul 2021 13:38:05 +0300 Subject: Add Handler for Ellipse Write MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- vcl/source/filter/svm/SvmWriter.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'vcl') 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(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(pAction->GetType())); + + VersionCompatWrite aCompat(mrStream, 1); + TypeSerializer aSerializer(mrStream); + aSerializer.writeRectangle(pAction->GetRect()); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit