diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-01-28 15:09:20 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-01-29 07:11:12 +0100 |
commit | 7a576383308edec3d6538986310264bfc0f1c213 (patch) | |
tree | c4e5b9bbd8d71f66dab3864513b55a734f502ccf /svgio/source/svgreader/svgellipsenode.cxx | |
parent | 98e60805613ab6ea19c03c34c0f36d00374dab73 (diff) |
loplugin:flatten in svgio
Change-Id: I3276c2c368c755e070fd8b19a15a954948a68df7
Reviewed-on: https://gerrit.libreoffice.org/67008
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svgio/source/svgreader/svgellipsenode.cxx')
-rw-r--r-- | svgio/source/svgreader/svgellipsenode.cxx | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/svgio/source/svgreader/svgellipsenode.cxx b/svgio/source/svgreader/svgellipsenode.cxx index c76b5c538c03..4454b9d696f2 100644 --- a/svgio/source/svgreader/svgellipsenode.cxx +++ b/svgio/source/svgreader/svgellipsenode.cxx @@ -129,29 +129,29 @@ namespace svgio { const SvgStyleAttributes* pStyle = getSvgStyleAttributes(); - if(pStyle && getRx().isSet() && getRy().isSet()) - { - const double fRx(getRx().solve(*this, xcoordinate)); - const double fRy(getRy().solve(*this, ycoordinate)); + if(!(pStyle && getRx().isSet() && getRy().isSet())) + return; - if(fRx > 0.0 && fRy > 0.0) - { - const basegfx::B2DPolygon aPath( - basegfx::utils::createPolygonFromEllipse( - basegfx::B2DPoint( - getCx().isSet() ? getCx().solve(*this, xcoordinate) : 0.0, - getCy().isSet() ? getCy().solve(*this, ycoordinate) : 0.0), - fRx, fRy)); + const double fRx(getRx().solve(*this, xcoordinate)); + const double fRy(getRy().solve(*this, ycoordinate)); - drawinglayer::primitive2d::Primitive2DContainer aNewTarget; + if(!(fRx > 0.0 && fRy > 0.0)) + return; - pStyle->add_path(basegfx::B2DPolyPolygon(aPath), aNewTarget, nullptr); + const basegfx::B2DPolygon aPath( + basegfx::utils::createPolygonFromEllipse( + basegfx::B2DPoint( + getCx().isSet() ? getCx().solve(*this, xcoordinate) : 0.0, + getCy().isSet() ? getCy().solve(*this, ycoordinate) : 0.0), + fRx, fRy)); - if(!aNewTarget.empty()) - { - pStyle->add_postProcess(rTarget, aNewTarget, getTransform()); - } - } + drawinglayer::primitive2d::Primitive2DContainer aNewTarget; + + pStyle->add_path(basegfx::B2DPolyPolygon(aPath), aNewTarget, nullptr); + + if(!aNewTarget.empty()) + { + pStyle->add_postProcess(rTarget, aNewTarget, getTransform()); } } } // end of namespace svgreader |