diff options
-rw-r--r-- | include/vcl/filter/SvmReader.hxx | 1 | ||||
-rw-r--r-- | include/vcl/metaact.hxx | 4 | ||||
-rw-r--r-- | vcl/source/filter/svm/SvmReader.cxx | 25 |
3 files changed, 29 insertions, 1 deletions
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: */ |