diff options
author | panoskorovesis <panoskorovesis@outlook.com> | 2021-07-31 13:46:39 +0300 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2021-08-02 15:50:20 +0200 |
commit | c878a2227192021eeabb1143b0f374df43d32a56 (patch) | |
tree | f70af9b9f4e5171a55ed601f1e62147c8f397ca6 /vcl | |
parent | 8de81db4e3fca488d50db2d74734109b31541a6f (diff) |
Add Handler for Arc Write
The handler separates MetaArcAction::Write from metaact.hxx
Write implementation is now in SvmWriter.hxx
Change-Id: I141ba52e591ba38880f67669a2fb38e8c3e57f45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119734
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 fcc79a81a958..c9f0bb6f6e3e 100644 --- a/vcl/source/filter/svm/SvmWriter.cxx +++ b/vcl/source/filter/svm/SvmWriter.cxx @@ -120,6 +120,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData) } break; + case MetaActionType::ARC: + { + auto* pMetaAction = static_cast<MetaArcAction*>(pAction); + ArcHandler(pMetaAction); + } + break; + /* default case prevents test failure and will be removed once all the handlers are completed */ default: @@ -190,4 +197,15 @@ void SvmWriter::EllipseHandler(MetaEllipseAction* pAction) TypeSerializer aSerializer(mrStream); aSerializer.writeRectangle(pAction->GetRect()); } + +void SvmWriter::ArcHandler(MetaArcAction* 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: */ |