summaryrefslogtreecommitdiff
path: root/accessibility
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 /accessibility
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 'accessibility')
-rw-r--r--accessibility/inc/standard/accessiblemenubasecomponent.hxx3
-rw-r--r--accessibility/inc/standard/accessiblemenuitemcomponent.hxx2
2 files changed, 3 insertions, 2 deletions
diff --git a/accessibility/inc/standard/accessiblemenubasecomponent.hxx b/accessibility/inc/standard/accessiblemenubasecomponent.hxx
index 167c957c5aca..9b01b6002c6d 100644
--- a/accessibility/inc/standard/accessiblemenubasecomponent.hxx
+++ b/accessibility/inc/standard/accessiblemenubasecomponent.hxx
@@ -26,6 +26,7 @@
#include <comphelper/accessiblecomponenthelper.hxx>
#include <cppuhelper/implbase2.hxx>
#include <tools/link.hxx>
+#include <vcl/vclptr.hxx>
#include <vector>
@@ -59,7 +60,7 @@ protected:
typedef ::std::vector< css::uno::Reference< css::accessibility::XAccessible > > AccessibleChildren;
AccessibleChildren m_aAccessibleChildren;
- Menu* m_pMenu;
+ VclPtr<Menu> m_pMenu;
bool m_bEnabled;
bool m_bFocused;
diff --git a/accessibility/inc/standard/accessiblemenuitemcomponent.hxx b/accessibility/inc/standard/accessiblemenuitemcomponent.hxx
index 84d0cc22e309..8abeb8ab3cc2 100644
--- a/accessibility/inc/standard/accessiblemenuitemcomponent.hxx
+++ b/accessibility/inc/standard/accessiblemenuitemcomponent.hxx
@@ -31,7 +31,7 @@ class OAccessibleMenuItemComponent : public OAccessibleMenuBaseComponent
friend class OAccessibleMenuBaseComponent;
protected:
- Menu* m_pParent;
+ VclPtr<Menu> m_pParent;
sal_uInt16 m_nItemPos;
OUString m_sAccessibleName;
OUString m_sItemText;