diff options
-rw-r--r-- | include/vcl/filter/SvmReader.hxx | 1 | ||||
-rw-r--r-- | include/vcl/metaact.hxx | 3 | ||||
-rw-r--r-- | vcl/source/filter/svm/SvmReader.cxx | 23 |
3 files changed, 26 insertions, 1 deletions
diff --git a/include/vcl/filter/SvmReader.hxx b/include/vcl/filter/SvmReader.hxx index acee4279eb22..d7fa1ef2974c 100644 --- a/include/vcl/filter/SvmReader.hxx +++ b/include/vcl/filter/SvmReader.hxx @@ -45,6 +45,7 @@ public: rtl::Reference<MetaAction> LineHandler(); rtl::Reference<MetaAction> RoundRectHandler(); rtl::Reference<MetaAction> EllipseHandler(); + rtl::Reference<MetaAction> ArcHandler(); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx index 44c1e5db4917..e899755e36db 100644 --- a/include/vcl/metaact.hxx +++ b/include/vcl/metaact.hxx @@ -321,6 +321,9 @@ public: const tools::Rectangle& GetRect() const { return maRect; } const Point& GetStartPoint() const { return maStartPt; } const Point& GetEndPoint() const { return maEndPt; } + void SetRect(tools::Rectangle& rRect) { maRect = rRect; } + void SetStartPoint(Point& rPoint) { maStartPt = rPoint; } + void SetEndPoint(Point& rPoint) { maEndPt = rPoint; } }; class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaPieAction final : public MetaAction diff --git a/vcl/source/filter/svm/SvmReader.cxx b/vcl/source/filter/svm/SvmReader.cxx index 87969933cee4..58333a188f83 100644 --- a/vcl/source/filter/svm/SvmReader.cxx +++ b/vcl/source/filter/svm/SvmReader.cxx @@ -177,7 +177,7 @@ rtl::Reference<MetaAction> SvmReader::MetaActionHandler(ImplMetaReadData* pData) return EllipseHandler(); break; case MetaActionType::ARC: - pAction = new MetaArcAction; + return ArcHandler(); break; case MetaActionType::PIE: pAction = new MetaPieAction; @@ -478,4 +478,25 @@ rtl::Reference<MetaAction> SvmReader::EllipseHandler() return pAction; } + +rtl::Reference<MetaAction> SvmReader::ArcHandler() +{ + auto pAction = new MetaArcAction(); + + VersionCompatRead aCompat(mrStream); + TypeSerializer aSerializer(mrStream); + + tools::Rectangle aRectangle; + aSerializer.readRectangle(aRectangle); + Point aPoint; + aSerializer.readPoint(aPoint); + Point aEndPoint; + aSerializer.readPoint(aEndPoint); + + pAction->SetRect(aRectangle); + pAction->SetStartPoint(aPoint); + pAction->SetEndPoint(aEndPoint); + + return pAction; +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |