diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-06-28 14:48:29 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-06-28 14:48:29 +0200 |
commit | c63ae748b301db1f4996b43f6faf4bb317c37467 (patch) | |
tree | 9c237a1e8bdca8187d01b88f2f143d1840cd43c2 | |
parent | ea6536a42b73c9205c9c69ddc5fecb9ed83c440e (diff) |
Adapt OS-X--only code to aa0d0536a444fb26d9e570bd6bf6c1bdc3596cf3
..."tdf#97527 - vcl: reference-count Menu"
Change-Id: I47457205ae99025d2ca13965dcf2fac79962124a
-rw-r--r-- | vcl/inc/osx/salmenu.h | 4 | ||||
-rw-r--r-- | vcl/osx/salmenu.cxx | 1 | ||||
-rw-r--r-- | vcl/osx/salnsmenu.mm | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/vcl/inc/osx/salmenu.h b/vcl/inc/osx/salmenu.h index ad1b29e9cb6f..f4407f336016 100644 --- a/vcl/inc/osx/salmenu.h +++ b/vcl/inc/osx/salmenu.h @@ -88,7 +88,7 @@ public: bool mbMenuBar; // true - Menubar, false - Menu NSMenu* mpMenu; // The Carbon reference to this menu - Menu* mpVCLMenu; // the corresponding vcl Menu object + VclPtr<Menu> mpVCLMenu; // the corresponding vcl Menu object const AquaSalFrame* mpFrame; // the frame to dispatch the menu events to AquaSalMenu* mpParentSalMenu; // the parent menu that contains us (and perhaps has a frame) @@ -103,7 +103,7 @@ public: virtual ~AquaSalMenuItem(); sal_uInt16 mnId; // Item ID - Menu* mpVCLMenu; // VCL Menu into which this MenuItem is inserted + VclPtr<Menu> mpVCLMenu; // VCL Menu into which this MenuItem is inserted AquaSalMenu* mpParentMenu; // The menu in which this menu item is inserted AquaSalMenu* mpSubMenu; // Sub menu of this item (if defined) NSMenuItem* mpMenuItem; // The NSMenuItem diff --git a/vcl/osx/salmenu.cxx b/vcl/osx/salmenu.cxx index b9d8e69ee242..3c2a476969e1 100644 --- a/vcl/osx/salmenu.cxx +++ b/vcl/osx/salmenu.cxx @@ -257,7 +257,6 @@ void AquaSalInstance::DestroyMenuItem( SalMenuItem* pSalMenuItem ) AquaSalMenu::AquaSalMenu( bool bMenuBar ) : mbMenuBar( bMenuBar ), mpMenu( nil ), - mpVCLMenu( nullptr ), mpFrame( nullptr ), mpParentSalMenu( nullptr ) { diff --git a/vcl/osx/salnsmenu.mm b/vcl/osx/salnsmenu.mm index b30792d698b0..cd22b7865592 100644 --- a/vcl/osx/salnsmenu.mm +++ b/vcl/osx/salnsmenu.mm @@ -125,7 +125,7 @@ // if an item from submenu was selected. the corresponding Window does not exist because // we use native popup menus, so we have to set the selected menuitem directly // incidentally this of course works for top level popup menus, too - PopupMenu * pPopupMenu = dynamic_cast<PopupMenu *>(mpMenuItem->mpVCLMenu); + PopupMenu * pPopupMenu = dynamic_cast<PopupMenu *>(mpMenuItem->mpVCLMenu.get()); if( pPopupMenu ) { // FIXME: revise this ugly code |