diff options
author | Noel Grandin <noel@peralex.com> | 2016-06-20 15:56:35 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-06-23 06:28:00 +0000 |
commit | aa0d0536a444fb26d9e570bd6bf6c1bdc3596cf3 (patch) | |
tree | 8b2a5207e77fa4054a37b33c25378c23a00af8ed /extensions/source | |
parent | b722f3d6fc72877e8caaaae7291d5d736ddc494d (diff) |
tdf#97527 - vcl: reference-count Menu
some places are marked with "dodgy"- need to check those to see
what is going on, because they are leaving dangling pointers behind
in the Menu class
Change-Id: I41d5c7c0fec2f70ce9e3ffdc48cd03d26c0a869b
Reviewed-on: https://gerrit.libreoffice.org/26516
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'extensions/source')
-rw-r--r-- | extensions/source/bibliography/toolbar.cxx | 16 | ||||
-rw-r--r-- | extensions/source/bibliography/toolbar.hxx | 2 | ||||
-rw-r--r-- | extensions/source/update/ui/updatecheckui.cxx | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx index 3cf37e486b03..65e4010aab6a 100644 --- a/extensions/source/bibliography/toolbar.cxx +++ b/extensions/source/bibliography/toolbar.cxx @@ -383,21 +383,21 @@ void BibToolBar::Click() void BibToolBar::ClearFilterMenu() { - aPopupMenu.Clear(); + pPopupMenu->Clear(); nMenuId=0; } sal_uInt16 BibToolBar::InsertFilterItem(const OUString& aMenuEntry) { nMenuId++; - aPopupMenu.InsertItem(nMenuId,aMenuEntry); + pPopupMenu->InsertItem(nMenuId,aMenuEntry); return nMenuId; } void BibToolBar::SelectFilterItem(sal_uInt16 nId) { - aPopupMenu.CheckItem(nId); + pPopupMenu->CheckItem(nId); nSelMenuItem=nId; - aQueryField = MnemonicGenerator::EraseAllMnemonicChars( aPopupMenu.GetItemText(nId) ); + aQueryField = MnemonicGenerator::EraseAllMnemonicChars( pPopupMenu->GetItemText(nId) ); } void BibToolBar::EnableSourceList(bool bFlag) @@ -490,15 +490,15 @@ IMPL_LINK_NOARG_TYPED( BibToolBar, MenuHdl, ToolBox*, void) EndSelection(); // vor SetDropMode (SetDropMode ruft SetItemImage) SetItemDown(nTBC_BT_AUTOFILTER, true); - nId = aPopupMenu.Execute(this, GetItemRect(nTBC_BT_AUTOFILTER)); + nId = pPopupMenu->Execute(this, GetItemRect(nTBC_BT_AUTOFILTER)); if(nId>0) { - aPopupMenu.CheckItem(nSelMenuItem,false); - aPopupMenu.CheckItem(nId); + pPopupMenu->CheckItem(nSelMenuItem,false); + pPopupMenu->CheckItem(nId); nSelMenuItem=nId; - aQueryField = MnemonicGenerator::EraseAllMnemonicChars( aPopupMenu.GetItemText(nId) ); + aQueryField = MnemonicGenerator::EraseAllMnemonicChars( pPopupMenu->GetItemText(nId) ); Sequence<PropertyValue> aPropVal(2); PropertyValue* pPropertyVal = const_cast<PropertyValue*>(aPropVal.getConstArray()); pPropertyVal[0].Name = "QueryText"; diff --git a/extensions/source/bibliography/toolbar.hxx b/extensions/source/bibliography/toolbar.hxx index 9743e2848cd5..97f189cc0618 100644 --- a/extensions/source/bibliography/toolbar.hxx +++ b/extensions/source/bibliography/toolbar.hxx @@ -116,7 +116,7 @@ class BibToolBar: public ToolBox VclPtr<ListBox> aLBSource; VclPtr<FixedText> aFtQuery; VclPtr<Edit> aEdQuery; - PopupMenu aPopupMenu; + ScopedVclPtr<PopupMenu> pPopupMenu; sal_uInt16 nMenuId; sal_uInt16 nSelMenuItem; OUString aQueryField; diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx index f8f9e9f00a10..25f56553dd0c 100644 --- a/extensions/source/update/ui/updatecheckui.cxx +++ b/extensions/source/update/ui/updatecheckui.cxx @@ -126,7 +126,7 @@ class UpdateCheckUI : public ::cppu::WeakImplHelper Image maBubbleImage; VclPtr<BubbleWindow> mpBubbleWin; VclPtr<SystemWindow> mpIconSysWin; - MenuBar* mpIconMBar; + VclPtr<MenuBar> mpIconMBar; ResMgr* mpUpdResMgr; ResMgr* mpSfxResMgr; Idle maWaitIdle; |