diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-03-01 13:37:02 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-03-01 19:33:47 +0100 |
commit | ee7368f6289ffc46425e4f3db1f7b40b7e6e089e (patch) | |
tree | 75589109c3bf0bc01fe99c6c684897ab07b5bf5f /canvas | |
parent | 3c699b2a480e0795a3a7085c2bcd1a9e8d649ed2 (diff) |
loplugin:refcounting in canvas
Change-Id: I7807e2e7fa7f9a68d36c103d8b1dba708350f8aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111745
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/inc/parametricpolypolygon.hxx | 9 | ||||
-rw-r--r-- | canvas/source/tools/parametricpolypolygon.cxx | 8 |
2 files changed, 9 insertions, 8 deletions
diff --git a/canvas/inc/parametricpolypolygon.hxx b/canvas/inc/parametricpolypolygon.hxx index 15957b58f960..089c42e76f57 100644 --- a/canvas/inc/parametricpolypolygon.hxx +++ b/canvas/inc/parametricpolypolygon.hxx @@ -26,6 +26,7 @@ #include <basegfx/polygon/b2dpolygon.hxx> #include <canvas/canvastoolsdllapi.h> +#include <rtl/ref.hxx> namespace com::sun::star::rendering { class XGraphicDevice; } @@ -85,7 +86,7 @@ namespace canvas }; static css::uno::Sequence< OUString > getAvailableServiceNames(); - static ParametricPolyPolygon* create( + static rtl::Reference<ParametricPolyPolygon> create( const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice, std::u16string_view rServiceName, const css::uno::Sequence< css::uno::Any >& rArgs ); @@ -112,16 +113,16 @@ namespace canvas ParametricPolyPolygon(const ParametricPolyPolygon&) = delete; ParametricPolyPolygon& operator=( const ParametricPolyPolygon& ) = delete; - static ParametricPolyPolygon* createLinearHorizontalGradient( const css::uno::Reference< + static rtl::Reference<ParametricPolyPolygon> createLinearHorizontalGradient( const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice, const css::uno::Sequence< css::uno::Sequence< double > >& colors, const css::uno::Sequence< double >& stops ); - static ParametricPolyPolygon* createEllipticalGradient( const css::uno::Reference< + static rtl::Reference<ParametricPolyPolygon> createEllipticalGradient( const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice, const css::uno::Sequence< css::uno::Sequence< double > >& colors, const css::uno::Sequence< double >& stops, double fAspect ); - static ParametricPolyPolygon* createRectangularGradient( const css::uno::Reference< + static rtl::Reference<ParametricPolyPolygon> createRectangularGradient( const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice, const css::uno::Sequence< css::uno::Sequence< double > >& colors, const css::uno::Sequence< double >& stops, diff --git a/canvas/source/tools/parametricpolypolygon.cxx b/canvas/source/tools/parametricpolypolygon.cxx index bd62b1b5568a..c75d84348690 100644 --- a/canvas/source/tools/parametricpolypolygon.cxx +++ b/canvas/source/tools/parametricpolypolygon.cxx @@ -39,7 +39,7 @@ namespace canvas "RectangularGradient"}; } - ParametricPolyPolygon* ParametricPolyPolygon::create( + rtl::Reference<ParametricPolyPolygon> ParametricPolyPolygon::create( const uno::Reference< rendering::XGraphicDevice >& rDevice, std::u16string_view rServiceName, const uno::Sequence< uno::Any >& rArgs ) @@ -110,7 +110,7 @@ namespace canvas return nullptr; } - ParametricPolyPolygon* ParametricPolyPolygon::createLinearHorizontalGradient( + rtl::Reference<ParametricPolyPolygon> ParametricPolyPolygon::createLinearHorizontalGradient( const uno::Reference< rendering::XGraphicDevice >& rDevice, const uno::Sequence< uno::Sequence< double > >& colors, const uno::Sequence< double >& stops ) @@ -120,7 +120,7 @@ namespace canvas return new ParametricPolyPolygon( rDevice, GradientType::Linear, colors, stops ); } - ParametricPolyPolygon* ParametricPolyPolygon::createEllipticalGradient( + rtl::Reference<ParametricPolyPolygon> ParametricPolyPolygon::createEllipticalGradient( const uno::Reference< rendering::XGraphicDevice >& rDevice, const uno::Sequence< uno::Sequence< double > >& colors, const uno::Sequence< double >& stops, @@ -136,7 +136,7 @@ namespace canvas colors, stops, fAspectRatio ); } - ParametricPolyPolygon* ParametricPolyPolygon::createRectangularGradient( const uno::Reference< rendering::XGraphicDevice >& rDevice, + rtl::Reference<ParametricPolyPolygon> ParametricPolyPolygon::createRectangularGradient( const uno::Reference< rendering::XGraphicDevice >& rDevice, const uno::Sequence< uno::Sequence< double > >& colors, const uno::Sequence< double >& stops, double fAspectRatio ) |