diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-12 15:11:48 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-13 11:32:56 +0100 |
commit | b586bfcff288151082f7d247b392c5640ae5c951 (patch) | |
tree | cf87d67397c5c53469ca350f12b0b40e1660efdf /include/svx | |
parent | e71f44f4dc847c75b874d514888d0675ccb00496 (diff) |
use unique_ptr in checkForUniqueItem
fixing a memory leak in chart2
Change-Id: Idddb6a46b1bde5c1a11148c03bbdaac20ac78e13
Reviewed-on: https://gerrit.libreoffice.org/65031
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/svx')
-rw-r--r-- | include/svx/xbtmpit.hxx | 2 | ||||
-rw-r--r-- | include/svx/xflftrit.hxx | 2 | ||||
-rw-r--r-- | include/svx/xflgrit.hxx | 2 | ||||
-rw-r--r-- | include/svx/xflhtit.hxx | 2 | ||||
-rw-r--r-- | include/svx/xlndsit.hxx | 2 | ||||
-rw-r--r-- | include/svx/xlnedit.hxx | 2 | ||||
-rw-r--r-- | include/svx/xlnstit.hxx | 2 |
7 files changed, 7 insertions, 7 deletions
diff --git a/include/svx/xbtmpit.hxx b/include/svx/xbtmpit.hxx index 218985c077d6..ae5047bd8ae7 100644 --- a/include/svx/xbtmpit.hxx +++ b/include/svx/xbtmpit.hxx @@ -59,7 +59,7 @@ public: bool isPattern() const; static bool CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 ); - XFillBitmapItem* checkForUniqueItem( SdrModel* pModel ) const; + std::unique_ptr<XFillBitmapItem> checkForUniqueItem( SdrModel* pModel ) const; virtual void dumpAsXml(struct _xmlTextWriter* pWriter) const override; }; diff --git a/include/svx/xflftrit.hxx b/include/svx/xflftrit.hxx index b8c4ed88c30a..95b29045631d 100644 --- a/include/svx/xflftrit.hxx +++ b/include/svx/xflftrit.hxx @@ -54,7 +54,7 @@ public: void SetEnabled( bool bEnable ) { bEnabled = bEnable; } static bool CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 ); - XFillFloatTransparenceItem* checkForUniqueItem( SdrModel* pModel ) const; + std::unique_ptr<XFillFloatTransparenceItem> checkForUniqueItem( SdrModel* pModel ) const; }; #endif diff --git a/include/svx/xflgrit.hxx b/include/svx/xflgrit.hxx index 70abe25edb3b..8f0424d23a74 100644 --- a/include/svx/xflgrit.hxx +++ b/include/svx/xflgrit.hxx @@ -55,7 +55,7 @@ public: void SetGradientValue(const XGradient& rNew) { aGradient = rNew; Detach(); } // SetValue -> SetGradientValue static bool CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 ); - XFillGradientItem* checkForUniqueItem( SdrModel* pModel ) const; + std::unique_ptr<XFillGradientItem> checkForUniqueItem( SdrModel* pModel ) const; }; #endif diff --git a/include/svx/xflhtit.hxx b/include/svx/xflhtit.hxx index f6717d9b47d1..a81e7232abfa 100644 --- a/include/svx/xflhtit.hxx +++ b/include/svx/xflhtit.hxx @@ -55,7 +55,7 @@ public: const XHatch& GetHatchValue() const { return aHatch;} // GetValue -> GetHatchValue static bool CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 ); - XFillHatchItem* checkForUniqueItem( SdrModel* pModel ) const; + std::unique_ptr<XFillHatchItem> checkForUniqueItem( SdrModel* pModel ) const; }; #endif diff --git a/include/svx/xlndsit.hxx b/include/svx/xlndsit.hxx index 53a757f7951e..a19e50608d15 100644 --- a/include/svx/xlndsit.hxx +++ b/include/svx/xlndsit.hxx @@ -58,7 +58,7 @@ public: void SetDashValue(const XDash& rNew) { aDash = rNew; Detach(); } // SetValue -> SetDashValue static bool CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 ); - XLineDashItem* checkForUniqueItem( SdrModel* pModel ) const; + std::unique_ptr<XLineDashItem> checkForUniqueItem( SdrModel* pModel ) const; }; #endif diff --git a/include/svx/xlnedit.hxx b/include/svx/xlnedit.hxx index ac835deff32c..b24d4825946f 100644 --- a/include/svx/xlnedit.hxx +++ b/include/svx/xlnedit.hxx @@ -54,7 +54,7 @@ public: const basegfx::B2DPolyPolygon& GetLineEndValue() const { return maPolyPolygon;} void SetLineEndValue(const basegfx::B2DPolyPolygon& rPolyPolygon) { maPolyPolygon = rPolyPolygon; Detach(); } - XLineEndItem* checkForUniqueItem( SdrModel* pModel ) const; + std::unique_ptr<XLineEndItem> checkForUniqueItem( SdrModel* pModel ) const; }; #endif diff --git a/include/svx/xlnstit.hxx b/include/svx/xlnstit.hxx index 5155ab6873f7..3e9c402e8bb9 100644 --- a/include/svx/xlnstit.hxx +++ b/include/svx/xlnstit.hxx @@ -54,7 +54,7 @@ public: const basegfx::B2DPolyPolygon& GetLineStartValue() const { return maPolyPolygon;} void SetLineStartValue(const basegfx::B2DPolyPolygon& rPolyPolygon) { maPolyPolygon = rPolyPolygon; Detach(); } - XLineStartItem* checkForUniqueItem( SdrModel* pModel ) const; + std::unique_ptr<XLineStartItem> checkForUniqueItem( SdrModel* pModel ) const; }; #endif |