diff options
author | panoskorovesis <panoskorovesis@outlook.com> | 2021-07-28 11:38:45 +0300 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2021-07-31 08:49:31 +0200 |
commit | 620f9649ae55e01700419876ce25ab4e45ed859f (patch) | |
tree | fc3f09215167aec639ed4d573803dcb4ad6bda88 | |
parent | 78b74ddc3da9dbc4d728b71f93626b0528870f31 (diff) |
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 <quikee@gmail.com>
-rw-r--r-- | include/vcl/filter/SvmWriter.hxx | 1 | ||||
-rw-r--r-- | vcl/source/filter/svm/SvmWriter.cxx | 17 |
2 files changed, 18 insertions, 0 deletions
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: */ |