summaryrefslogtreecommitdiff
path: root/sd/source/ui/dlg/navigatr.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/dlg/navigatr.cxx')
-rw-r--r--sd/source/ui/dlg/navigatr.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index e6b5e52f677c..548015494ec6 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -294,7 +294,7 @@ IMPL_LINK_TYPED( SdNavigatorWin, DropdownClickToolBoxHdl, ToolBox*, pBox, void )
case TBI_DRAGTYPE:
{
// Popup menu is created depending if the document is saved or not
- PopupMenu *pMenu = new PopupMenu;
+ ScopedVclPtrInstance<PopupMenu> pMenu;
static const char* aHIDs[] =
{
@@ -331,13 +331,12 @@ IMPL_LINK_TYPED( SdNavigatorWin, DropdownClickToolBoxHdl, ToolBox*, pBox, void )
pMenu->Execute( this, maToolbox->GetItemRect( nId ), PopupMenuFlags::ExecuteDown );
pBox->EndSelection();
- delete pMenu;
}
break;
case TBI_SHAPE_FILTER:
{
- PopupMenu *pMenu = new PopupMenu;
+ ScopedVclPtrInstance<PopupMenu> pMenu;
pMenu->InsertItem(
nShowNamedShapesFilter,
@@ -354,7 +353,6 @@ IMPL_LINK_TYPED( SdNavigatorWin, DropdownClickToolBoxHdl, ToolBox*, pBox, void )
pMenu->Execute( this, maToolbox->GetItemRect( nId ), PopupMenuFlags::ExecuteDown );
pBox->EndSelection();
- delete pMenu;
}
break;
}