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

panoskorovesis (via logerrit) logerrit at kemper.freedesktop.org
Fri Aug 6 08:54:40 UTC 2021


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

New commits:
commit 1f4986d178e9bab1be48e0c0a393271598e31eee
Author:     panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Wed Aug 4 10:44:28 2021 +0300
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri Aug 6 10:54:05 2021 +0200

    Add Handler for EPS Write
    
    The handler separates MetaEPSAction::Write from metaact.hxx
    Write implementation is now in SvmWriter.hxx
    
    Change-Id: Ib9866966ba067223860ddfd2b48880f6e83fe537
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119968
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/include/vcl/filter/SvmWriter.hxx b/include/vcl/filter/SvmWriter.hxx
index d1edf5fd27a3..014b59afbec5 100644
--- a/include/vcl/filter/SvmWriter.hxx
+++ b/include/vcl/filter/SvmWriter.hxx
@@ -65,4 +65,5 @@ public:
     void RasterOpHandler(MetaRasterOpAction* pAction);
     void TransparentHandler(MetaTransparentAction* pAction);
     void FloatTransparentHandler(MetaFloatTransparentAction* pAction);
+    void EPSHandler(MetaEPSAction* pAction);
 };
\ No newline at end of file
diff --git a/vcl/source/filter/svm/SvmWriter.cxx b/vcl/source/filter/svm/SvmWriter.cxx
index fb7b9c425495..057a5e7c1bc0 100644
--- a/vcl/source/filter/svm/SvmWriter.cxx
+++ b/vcl/source/filter/svm/SvmWriter.cxx
@@ -262,6 +262,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData)
         }
         break;
 
+        case MetaActionType::EPS:
+        {
+            auto* pMetaAction = static_cast<MetaEPSAction*>(pAction);
+            EPSHandler(pMetaAction);
+        }
+        break;
+
         /* default case prevents test failure and will be
         removed once all the handlers are completed */
         default:
@@ -601,4 +608,19 @@ void SvmWriter::FloatTransparentHandler(MetaFloatTransparentAction* pAction)
     aSerializer.writeSize(pAction->GetSize());
     aSerializer.writeGradient(pAction->GetGradient());
 }
+
+void SvmWriter::EPSHandler(MetaEPSAction* pAction)
+{
+    mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType()));
+    VersionCompatWrite aCompat(mrStream, 1);
+
+    TypeSerializer aSerializer(mrStream);
+    aSerializer.writeGfxLink(pAction->GetLink());
+    aSerializer.writePoint(pAction->GetPoint());
+    aSerializer.writeSize(pAction->GetSize());
+
+    SvmWriter aWriter(mrStream);
+    GDIMetaFile aMtf = pAction->GetSubstitute();
+    aWriter.Write(aMtf);
+}
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list