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

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


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

New commits:
commit c878a2227192021eeabb1143b0f374df43d32a56
Author:     panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Sat Jul 31 13:46:39 2021 +0300
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Mon Aug 2 15:50:20 2021 +0200

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

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


More information about the Libreoffice-commits mailing list