summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorpanoskorovesis <panoskorovesis@outlook.com>2021-07-31 14:02:58 +0300
committerTomaž Vajngerl <quikee@gmail.com>2021-08-02 15:51:30 +0200
commitcada12ebaf09ed764ca9762949cd05c42f162d23 (patch)
treecada0e0287ce83d7fb99863d56e4f00d56901203 /vcl
parent7f8f8163a2cc0ee0a0c08d3c915a8627908d5862 (diff)
Add Handler for Chord Write
The handler separates MetaChordAction::Write from metaact.hxx Write implementation is now in SvmWriter.hxx Change-Id: Ifea8783a4cf6494440b4905563165af62276b1f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119736 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/filter/svm/SvmWriter.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/vcl/source/filter/svm/SvmWriter.cxx b/vcl/source/filter/svm/SvmWriter.cxx
index 685230726836..6b5843369d36 100644
--- a/vcl/source/filter/svm/SvmWriter.cxx
+++ b/vcl/source/filter/svm/SvmWriter.cxx
@@ -134,6 +134,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData)
}
break;
+ case MetaActionType::CHORD:
+ {
+ auto* pMetaAction = static_cast<MetaChordAction*>(pAction);
+ ChordHandler(pMetaAction);
+ }
+ break;
+
/* default case prevents test failure and will be
removed once all the handlers are completed */
default:
@@ -226,4 +233,15 @@ void SvmWriter::PieHandler(MetaPieAction* pAction)
aSerializer.writePoint(pAction->GetStartPoint());
aSerializer.writePoint(pAction->GetEndPoint());
}
+
+void SvmWriter::ChordHandler(MetaChordAction* 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: */