summaryrefslogtreecommitdiff
path: root/cui/source/customize/cfg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/customize/cfg.cxx')
-rw-r--r--cui/source/customize/cfg.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index f3e1b62d62d5..1b08c29ebeea 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -3134,7 +3134,7 @@ SvxToolbarConfigPage::SvxToolbarConfigPage(vcl::Window *pParent, const SfxItemSe
m_pMoveDownButton->Enable();
m_pMoveUpButton->Enable();
- PopupMenu* pMenu = new PopupMenu( CUI_RES( MODIFY_TOOLBAR ) );
+ VclPtrInstance<PopupMenu> pMenu( CUI_RES( MODIFY_TOOLBAR ) );
pMenu->SetMenuFlags(
pMenu->GetMenuFlags() | MenuFlags::AlwaysShowDisabledEntries );
@@ -3142,8 +3142,7 @@ SvxToolbarConfigPage::SvxToolbarConfigPage(vcl::Window *pParent, const SfxItemSe
m_pModifyTopLevelButton->SetSelectHdl(
LINK( this, SvxToolbarConfigPage, ToolbarSelectHdl ) );
- PopupMenu* pEntry = new PopupMenu(
- CUI_RES( MODIFY_TOOLBAR_CONTENT ) );
+ VclPtrInstance<PopupMenu> pEntry( CUI_RES( MODIFY_TOOLBAR_CONTENT ) );
pEntry->SetMenuFlags(
pEntry->GetMenuFlags() | MenuFlags::AlwaysShowDisabledEntries );