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

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


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

New commits:
commit 76b619cca484fb681a8f3c175337fda3aabe3c0f
Author:     panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Sat Jul 31 13:38:05 2021 +0300
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Mon Aug 2 15:48:52 2021 +0200

    Add Handler for Ellipse Write
    
    The handler separates MetaEllipseAction::Write from metaact.hxx
    Write implementation is now in SvmWriter.hxx
    
    Change-Id: Iad944c41a88b2303abbdba8ce53528895773b01c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119733
    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 724051d2eee7..6fd3ebf0d4ba 100644
--- a/include/vcl/filter/SvmWriter.hxx
+++ b/include/vcl/filter/SvmWriter.hxx
@@ -44,4 +44,5 @@ public:
     void LineHandler(MetaLineAction* pAction);
     void RectHandler(MetaRectAction* pAction);
     void RoundRectHandler(MetaRoundRectAction* pAction);
+    void EllipseHandler(MetaEllipseAction* pAction);
 };
\ No newline at end of file
diff --git a/vcl/source/filter/svm/SvmWriter.cxx b/vcl/source/filter/svm/SvmWriter.cxx
index 73e5734297d9..fcc79a81a958 100644
--- a/vcl/source/filter/svm/SvmWriter.cxx
+++ b/vcl/source/filter/svm/SvmWriter.cxx
@@ -113,6 +113,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData)
         }
         break;
 
+        case MetaActionType::ELLIPSE:
+        {
+            auto* pMetaAction = static_cast<MetaEllipseAction*>(pAction);
+            EllipseHandler(pMetaAction);
+        }
+        break;
+
         /* default case prevents test failure and will be
         removed once all the handlers are completed */
         default:
@@ -174,4 +181,13 @@ void SvmWriter::RoundRectHandler(MetaRoundRectAction* pAction)
     aSerializer.writeRectangle(pAction->GetRect());
     mrStream.WriteUInt32(pAction->GetHorzRound()).WriteUInt32(pAction->GetVertRound());
 }
+
+void SvmWriter::EllipseHandler(MetaEllipseAction* pAction)
+{
+    mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType()));
+
+    VersionCompatWrite aCompat(mrStream, 1);
+    TypeSerializer aSerializer(mrStream);
+    aSerializer.writeRectangle(pAction->GetRect());
+}
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list