From fef6c6cf67eab1b02a7761cedf6355e33804f6e2 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 2 May 2018 10:29:25 +0200 Subject: loplugin:useuniqueptr in SdrPaintView Change-Id: I10c9db25dfb0cce7d0815cdc8aff290b3d0c0026 Reviewed-on: https://gerrit.libreoffice.org/53755 Tested-by: Jenkins Reviewed-by: Noel Grandin --- include/svx/svdpntv.hxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx index 2405ad9ca4b5..dc20ac774300 100644 --- a/include/svx/svdpntv.hxx +++ b/include/svx/svdpntv.hxx @@ -34,6 +34,7 @@ #include #include #include +#include // Pre defines @@ -133,7 +134,7 @@ private: // the SdrModel this view was created with, unchanged during lifetime SdrModel& mrSdrModelFromSdrView; - SdrPageView* mpPageView; + std::unique_ptr mpPageView; protected: SdrModel* mpModel; #ifdef DBG_UTIL @@ -313,7 +314,7 @@ public: virtual void HideSdrPage(); // Iterate over all registered PageViews - SdrPageView* GetSdrPageView() const { return mpPageView; } + SdrPageView* GetSdrPageView() const { return mpPageView.get(); } // A SdrView can be displayed on multiple Windows at the same time virtual void AddWindowToPaintView(OutputDevice* pNewWin, vcl::Window* pWindow); -- cgit