diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-13 16:16:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-15 11:27:20 +0200 |
commit | 18e20676024baecaf5719139f80f053f5f1e784a (patch) | |
tree | 54e7d15b178ee373c0c72e153d9b1a427963d889 /sd/source/ui/annotations | |
parent | 82a7c54ad8b9b193e767fcafb5316d3f05e21001 (diff) |
loplugin:useuniqueptr in OverlayObjectList
Change-Id: I641d93e54504c27bcc49bae8edf6286c0a9a471f
Reviewed-on: https://gerrit.libreoffice.org/59024
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/annotations')
-rw-r--r-- | sd/source/ui/annotations/annotationtag.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sd/source/ui/annotations/annotationtag.cxx b/sd/source/ui/annotations/annotationtag.cxx index 2572ea40b0b2..99e37fd59c8a 100644 --- a/sd/source/ui/annotations/annotationtag.cxx +++ b/sd/source/ui/annotations/annotationtag.cxx @@ -210,22 +210,22 @@ void AnnotationHdl::CreateB2dIAObject() rtl::Reference< sdr::overlay::OverlayManager > xManager = rPageWindow.GetOverlayManager(); if(rPaintWindow.OutputToWindow() && xManager.is() ) { - sdr::overlay::OverlayObject* pOverlayObject = nullptr; + std::unique_ptr<sdr::overlay::OverlayObject> pOverlayObject; // animate focused handles if(bFocused) { const sal_uInt64 nBlinkTime = rStyleSettings.GetCursorBlinkTime(); - pOverlayObject = new sdr::overlay::OverlayAnimatedBitmapEx(aPosition, aBitmapEx, aBitmapEx2, nBlinkTime, 0, 0, 0, 0 ); + pOverlayObject.reset(new sdr::overlay::OverlayAnimatedBitmapEx(aPosition, aBitmapEx, aBitmapEx2, nBlinkTime, 0, 0, 0, 0 )); } else { - pOverlayObject = new sdr::overlay::OverlayBitmapEx( aPosition, aBitmapEx, 0, 0 ); + pOverlayObject.reset(new sdr::overlay::OverlayBitmapEx( aPosition, aBitmapEx, 0, 0 )); } xManager->add(*pOverlayObject); - maOverlayGroup.append(pOverlayObject); + maOverlayGroup.append(std::move(pOverlayObject)); } } } |