diff options
author | panoskorovesis <panoskorovesis@outlook.com> | 2021-07-31 13:55:49 +0300 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2021-08-02 15:51:04 +0200 |
commit | 7f8f8163a2cc0ee0a0c08d3c915a8627908d5862 (patch) | |
tree | 5cfe0e36b5e801eecdc2d74fe9aa18dcc2a3c18b /vcl | |
parent | c878a2227192021eeabb1143b0f374df43d32a56 (diff) |
Add Handler for Pie Write
The handler separates MetaPieAction::Write from metaact.hxx
Write implementation is now in SvmWriter.hxx
Change-Id: I3ef877eea9fbd5c615a871c021ec600d6ab12e63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119735
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/filter/svm/SvmWriter.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/vcl/source/filter/svm/SvmWriter.cxx b/vcl/source/filter/svm/SvmWriter.cxx index c9f0bb6f6e3e..685230726836 100644 --- a/vcl/source/filter/svm/SvmWriter.cxx +++ b/vcl/source/filter/svm/SvmWriter.cxx @@ -127,6 +127,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData) } break; + case MetaActionType::PIE: + { + auto* pMetaAction = static_cast<MetaPieAction*>(pAction); + PieHandler(pMetaAction); + } + break; + /* default case prevents test failure and will be removed once all the handlers are completed */ default: @@ -208,4 +215,15 @@ void SvmWriter::ArcHandler(MetaArcAction* pAction) aSerializer.writePoint(pAction->GetStartPoint()); aSerializer.writePoint(pAction->GetEndPoint()); } + +void SvmWriter::PieHandler(MetaPieAction* pAction) +{ + mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); + + VersionCompatWrite aCompat(mrStream, 1); + TypeSerializer aSerializer(mrStream); + aSerializer.writeRectangle(pAction->GetRect()); + aSerializer.writePoint(pAction->GetStartPoint()); + aSerializer.writePoint(pAction->GetEndPoint()); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |