include/vcl/filter/SvmWriter.hxx | 1 + vcl/source/filter/svm/SvmWriter.cxx | 17 +++++++++++++++++ 2 files changed, 18 insertions(+)
New commits: commit 620f9649ae55e01700419876ce25ab4e45ed859f Author: panoskorovesis <panoskorove...@outlook.com> AuthorDate: Wed Jul 28 11:38:45 2021 +0300 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Sat Jul 31 08:49:31 2021 +0200 Add Handler for RoundRect Write The handler separates MetaRoundRectAction::Write from metaact.hxx Write implementation is now in SvmWriter.hxx Change-Id: I2f0a25386d9d0de72469878199fa3cc5cc67e41b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119594 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/include/vcl/filter/SvmWriter.hxx b/include/vcl/filter/SvmWriter.hxx index 3ffaf0bf5f94..724051d2eee7 100644 --- a/include/vcl/filter/SvmWriter.hxx +++ b/include/vcl/filter/SvmWriter.hxx @@ -43,4 +43,5 @@ public: void PointHandler(MetaPointAction* pAction); void LineHandler(MetaLineAction* pAction); void RectHandler(MetaRectAction* pAction); + void RoundRectHandler(MetaRoundRectAction* pAction); }; \ No newline at end of file diff --git a/vcl/source/filter/svm/SvmWriter.cxx b/vcl/source/filter/svm/SvmWriter.cxx index f2fb33c6cd4a..73e5734297d9 100644 --- a/vcl/source/filter/svm/SvmWriter.cxx +++ b/vcl/source/filter/svm/SvmWriter.cxx @@ -106,6 +106,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData) } break; + case MetaActionType::ROUNDRECT: + { + auto* pMetaAction = static_cast<MetaRoundRectAction*>(pAction); + RoundRectHandler(pMetaAction); + } + break; + /* default case prevents test failure and will be removed once all the handlers are completed */ default: @@ -157,4 +164,14 @@ void SvmWriter::RectHandler(MetaRectAction* pAction) TypeSerializer aSerializer(mrStream); aSerializer.writeRectangle(pAction->GetRect()); } + +void SvmWriter::RoundRectHandler(MetaRoundRectAction* pAction) +{ + mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); + + VersionCompatWrite aCompat(mrStream, 1); + TypeSerializer aSerializer(mrStream); + aSerializer.writeRectangle(pAction->GetRect()); + mrStream.WriteUInt32(pAction->GetHorzRound()).WriteUInt32(pAction->GetVertRound()); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */