summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-09-28 13:06:39 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-09-28 13:07:03 +0200
commitd5b87dcce119f0cd69e65873833d98ed1660f9d0 (patch)
tree8cb637f751eef1225487f7a38fefd84b22b5d44d /sd
parent94ed449247e2256d4163fb4a46b4be2c3f498d60 (diff)
Return std::unique_ptr from SvTreeListBox::CreateContextMenu
Change-Id: I1e4c32099ec9741c0cab246eb627a2eb3b933e1a
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/animations/CustomAnimationList.cxx6
-rw-r--r--sd/source/ui/animations/CustomAnimationList.hxx6
2 files changed, 9 insertions, 3 deletions
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx
index 7789f4bb7485..03be56447c41 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -46,6 +46,7 @@
#include "glob.hrc"
#include <algorithm>
+#include <memory>
using namespace ::com::sun::star;
using namespace ::com::sun::star::animations;
@@ -877,9 +878,10 @@ bool CustomAnimationList::DoubleClickHdl()
return false;
}
-PopupMenu* CustomAnimationList::CreateContextMenu()
+std::unique_ptr<PopupMenu> CustomAnimationList::CreateContextMenu()
{
- PopupMenu* pMenu = new PopupMenu(SdResId( RID_EFFECT_CONTEXTMENU ));
+ std::unique_ptr<PopupMenu> pMenu(
+ new PopupMenu(SdResId( RID_EFFECT_CONTEXTMENU )));
sal_Int16 nNodeType = -1;
sal_Int16 nEntries = 0;
diff --git a/sd/source/ui/animations/CustomAnimationList.hxx b/sd/source/ui/animations/CustomAnimationList.hxx
index 851ea6756d0f..72b215325bce 100644
--- a/sd/source/ui/animations/CustomAnimationList.hxx
+++ b/sd/source/ui/animations/CustomAnimationList.hxx
@@ -20,6 +20,10 @@
#ifndef INCLUDED_SD_SOURCE_UI_ANIMATIONS_CUSTOMANIMATIONLIST_HXX
#define INCLUDED_SD_SOURCE_UI_ANIMATIONS_CUSTOMANIMATIONLIST_HXX
+#include <sal/config.h>
+
+#include <memory>
+
#include <com/sun/star/drawing/XShape.hpp>
#include <svtools/treelistbox.hxx>
#include <CustomAnimationEffect.hxx>
@@ -72,7 +76,7 @@ public:
virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) SAL_OVERRIDE;
- virtual PopupMenu* CreateContextMenu() SAL_OVERRIDE;
+ virtual std::unique_ptr<PopupMenu> CreateContextMenu() SAL_OVERRIDE;
virtual void ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry ) SAL_OVERRIDE;
virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;