[Libreoffice-commits] core.git: cui/source
Caolán McNamara
caolanm at redhat.com
Sun Jun 26 20:04:06 UTC 2016
cui/source/customize/cfg.cxx | 19 +++++++++++--------
cui/source/inc/cfg.hxx | 3 +++
2 files changed, 14 insertions(+), 8 deletions(-)
New commits:
commit 2184b08dd185f3f20d8b2098d3f652aed629b51f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jun 26 21:01:36 2016 +0100
Resolves: tdf#100619 vclptr assert with menu set to menubutton
Change-Id: I2e621567e3bbc01d6f52844014dba9e46fe79f41
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 1b08c29..346a2cf 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -3090,6 +3090,8 @@ bool SvxConfigEntry::IsRenamable()
SvxToolbarConfigPage::SvxToolbarConfigPage(vcl::Window *pParent, const SfxItemSet& rSet)
: SvxConfigPage(pParent, rSet)
+ , m_pMenu(CUI_RES(MODIFY_TOOLBAR))
+ , m_pEntry(CUI_RES(MODIFY_TOOLBAR_CONTENT))
{
SetHelpId( HID_SVX_CONFIG_TOOLBAR );
@@ -3134,19 +3136,17 @@ SvxToolbarConfigPage::SvxToolbarConfigPage(vcl::Window *pParent, const SfxItemSe
m_pMoveDownButton->Enable();
m_pMoveUpButton->Enable();
- VclPtrInstance<PopupMenu> pMenu( CUI_RES( MODIFY_TOOLBAR ) );
- pMenu->SetMenuFlags(
- pMenu->GetMenuFlags() | MenuFlags::AlwaysShowDisabledEntries );
+ m_pMenu->SetMenuFlags(
+ m_pMenu->GetMenuFlags() | MenuFlags::AlwaysShowDisabledEntries );
- m_pModifyTopLevelButton->SetPopupMenu( pMenu );
+ m_pModifyTopLevelButton->SetPopupMenu( m_pMenu );
m_pModifyTopLevelButton->SetSelectHdl(
LINK( this, SvxToolbarConfigPage, ToolbarSelectHdl ) );
- VclPtrInstance<PopupMenu> pEntry( CUI_RES( MODIFY_TOOLBAR_CONTENT ) );
- pEntry->SetMenuFlags(
- pEntry->GetMenuFlags() | MenuFlags::AlwaysShowDisabledEntries );
+ m_pEntry->SetMenuFlags(
+ m_pEntry->GetMenuFlags() | MenuFlags::AlwaysShowDisabledEntries );
- m_pModifyCommandButton->SetPopupMenu( pEntry );
+ m_pModifyCommandButton->SetPopupMenu(m_pEntry);
m_pModifyCommandButton->SetSelectHdl(
LINK( this, SvxToolbarConfigPage, EntrySelectHdl ) );
@@ -3184,6 +3184,9 @@ void SvxToolbarConfigPage::dispose()
}
m_pSaveInListBox->Clear();
+ m_pEntry.disposeAndClear();
+ m_pMenu.disposeAndClear();
+
SvxConfigPage::dispose();
}
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index 9ca82b4..b9ca0d5 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -575,6 +575,9 @@ private:
void DeleteSelectedContent() override;
void DeleteSelectedTopLevel() override;
+ VclPtrInstance<PopupMenu> m_pMenu;
+ VclPtrInstance<PopupMenu> m_pEntry;
+
public:
SvxToolbarConfigPage( vcl::Window *pParent, const SfxItemSet& rItemSet );
virtual ~SvxToolbarConfigPage();
More information about the Libreoffice-commits
mailing list