summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-06-20 15:56:35 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-06-23 06:28:00 +0000
commitaa0d0536a444fb26d9e570bd6bf6c1bdc3596cf3 (patch)
tree8b2a5207e77fa4054a37b33c25378c23a00af8ed /fpicker
parentb722f3d6fc72877e8caaaae7291d5d736ddc494d (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 'fpicker')
-rw-r--r--fpicker/source/office/RemoteFilesDialog.hxx2
-rw-r--r--fpicker/source/office/iodlgimp.cxx4
-rw-r--r--fpicker/source/office/iodlgimp.hxx2
3 files changed, 4 insertions, 4 deletions
diff --git a/fpicker/source/office/RemoteFilesDialog.hxx b/fpicker/source/office/RemoteFilesDialog.hxx
index a2a7d16fb0c5..84ba1e76e065 100644
--- a/fpicker/source/office/RemoteFilesDialog.hxx
+++ b/fpicker/source/office/RemoteFilesDialog.hxx
@@ -162,7 +162,7 @@ private:
VclPtr< FileViewContainer > m_pContainer;
VclPtr< ListBox > m_pFilter_lb;
VclPtr< AutocompleteEdit > m_pName_ed;
- PopupMenu* m_pAddMenu;
+ VclPtr<PopupMenu> m_pAddMenu;
ImageList m_aImages;
diff --git a/fpicker/source/office/iodlgimp.cxx b/fpicker/source/office/iodlgimp.cxx
index 7aaa3d05bd2e..9cee811117a2 100644
--- a/fpicker/source/office/iodlgimp.cxx
+++ b/fpicker/source/office/iodlgimp.cxx
@@ -91,7 +91,7 @@ SvtFileDialogFilter_Impl::~SvtFileDialogFilter_Impl()
SvtFileDialogURLSelector::SvtFileDialogURLSelector( vcl::Window* _pParent, SvtFileDialog* _pDlg, WinBits nBits, sal_uInt16 _nButtonId )
:MenuButton ( _pParent, nBits )
,m_pDlg ( _pDlg )
- ,m_pMenu ( new PopupMenu )
+ ,m_pMenu ( VclPtr<PopupMenu>::Create() )
{
SetStyle( GetStyle() | WB_NOPOINTERFOCUS | WB_RECTSTYLE | WB_SMALLSTYLE );
SetModeImage( _pDlg->GetButtonImage( _nButtonId ) );
@@ -107,7 +107,7 @@ SvtFileDialogURLSelector::~SvtFileDialogURLSelector()
void SvtFileDialogURLSelector::dispose()
{
- delete m_pMenu;
+ m_pMenu.disposeAndClear();
m_pDlg.clear();
MenuButton::dispose();
}
diff --git a/fpicker/source/office/iodlgimp.hxx b/fpicker/source/office/iodlgimp.hxx
index 1726a394a542..7ad944300e56 100644
--- a/fpicker/source/office/iodlgimp.hxx
+++ b/fpicker/source/office/iodlgimp.hxx
@@ -84,7 +84,7 @@ public:
virtual void dispose() override;
private:
VclPtr<SvtFileDialog> m_pDlg;
- PopupMenu* m_pMenu;
+ VclPtr<PopupMenu> m_pMenu;
protected:
inline SvtFileDialog* GetDialogParent() { return m_pDlg; }