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

panoskorovesis (via logerrit) logerrit at kemper.freedesktop.org
Tue Jul 27 06:04:18 UTC 2021


 include/vcl/filter/SvmReader.hxx    |    1 +
 include/vcl/metaact.hxx             |    4 ++++
 vcl/source/filter/svm/SvmReader.cxx |   25 ++++++++++++++++++++++++-
 3 files changed, 29 insertions(+), 1 deletion(-)

New commits:
commit f8847233c5b935d7ad1ea82bd464868d2bc3f69e
Author:     panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Thu Jul 15 11:29:04 2021 +0300
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Tue Jul 27 08:03:45 2021 +0200

    Add Handler for EPS Read
    
    The handler separates MetaEPSAction::Read from metaact.hxx
    Read implementation is now in SvmReader.hxx
    
    Change-Id: I9a56e447865643bbd6e02f9b9da3be715172fe35
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119192
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/include/vcl/filter/SvmReader.hxx b/include/vcl/filter/SvmReader.hxx
index ca8b9008a733..d19922cf774d 100644
--- a/include/vcl/filter/SvmReader.hxx
+++ b/include/vcl/filter/SvmReader.hxx
@@ -85,6 +85,7 @@ public:
     rtl::Reference<MetaAction> RasterOpHandler();
     rtl::Reference<MetaAction> TransparentHandler();
     rtl::Reference<MetaAction> FloatTransparentHandler(ImplMetaReadData* pData);
+    rtl::Reference<MetaAction> EPSHandler();
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index fabe6f7c750a..1914c31c192e 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -1729,6 +1729,10 @@ public:
     const GDIMetaFile&  GetSubstitute() const { return maSubst; }
     const Point&        GetPoint() const { return maPoint; }
     const Size&         GetSize() const { return maSize; }
+    void                SetLink(const GfxLink& rGfxLink) { maGfxLink = rGfxLink; }
+    void                SetSubstitute(const GDIMetaFile& rSubst) { maSubst = rSubst; }
+    void                SetPoint(const Point& rPoint) { maPoint = rPoint; }
+    void                SetSize(const Size& rSize) { maSize = rSize; }
 };
 
 class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaRefPointAction final : public MetaAction
diff --git a/vcl/source/filter/svm/SvmReader.cxx b/vcl/source/filter/svm/SvmReader.cxx
index daed6b7cca72..44c6705007b3 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -305,7 +305,7 @@ rtl::Reference<MetaAction> SvmReader::MetaActionHandler(ImplMetaReadData* pData)
             return FloatTransparentHandler(pData);
             break;
         case MetaActionType::EPS:
-            pAction = new MetaEPSAction;
+            return EPSHandler();
             break;
         case MetaActionType::REFPOINT:
             pAction = new MetaRefPointAction;
@@ -1336,4 +1336,27 @@ rtl::Reference<MetaAction> SvmReader::FloatTransparentHandler(ImplMetaReadData*
 
     return pAction;
 }
+
+rtl::Reference<MetaAction> SvmReader::EPSHandler()
+{
+    auto pAction = new MetaEPSAction();
+
+    VersionCompatRead aCompat(mrStream);
+    TypeSerializer aSerializer(mrStream);
+    GfxLink aGfxLink;
+    aSerializer.readGfxLink(aGfxLink);
+    Point aPoint;
+    aSerializer.readPoint(aPoint);
+    Size aSize;
+    aSerializer.readSize(aSize);
+    GDIMetaFile aSubst;
+    Read(aSubst);
+
+    pAction->SetLink(aGfxLink);
+    pAction->SetPoint(aPoint);
+    pAction->SetSize(aSize);
+    pAction->SetSubstitute(aSubst);
+
+    return pAction;
+}
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list