[Libreoffice-commits] core.git: include/vcl vcl/source

panoskorovesis (via logerrit) logerrit at kemper.freedesktop.org
Mon Aug 2 13:51:42 UTC 2021


 include/vcl/filter/SvmWriter.hxx    |    1 +
 vcl/source/filter/svm/SvmWriter.cxx |   18 ++++++++++++++++++
 2 files changed, 19 insertions(+)

New commits:
commit 7f8f8163a2cc0ee0a0c08d3c915a8627908d5862
Author:     panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Sat Jul 31 13:55:49 2021 +0300
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Mon Aug 2 15:51:04 2021 +0200

    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 at gmail.com>

diff --git a/include/vcl/filter/SvmWriter.hxx b/include/vcl/filter/SvmWriter.hxx
index 9729c562d485..e83afee8b5c1 100644
--- a/include/vcl/filter/SvmWriter.hxx
+++ b/include/vcl/filter/SvmWriter.hxx
@@ -46,4 +46,5 @@ public:
     void RoundRectHandler(MetaRoundRectAction* pAction);
     void EllipseHandler(MetaEllipseAction* pAction);
     void ArcHandler(MetaArcAction* pAction);
+    void PieHandler(MetaPieAction* pAction);
 };
\ No newline at end of file
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: */


More information about the Libreoffice-commits mailing list