From 326351e2b342eae5ca0154b2ba303b937a696577 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 14 Dec 2021 10:22:00 +0000 Subject: move UserData bodge into VCLXMenu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I20c303788e576a29574a696cb20c9e8a235233b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126804 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- toolkit/source/awt/vclxmenu.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'toolkit') diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx index eca9de23fa12..2e7e80636bf6 100644 --- a/toolkit/source/awt/vclxmenu.cxx +++ b/toolkit/source/awt/vclxmenu.cxx @@ -819,6 +819,22 @@ VCLXMenu::getItemImage( return rxGraphic; } +void VCLXMenu::setUserValue(sal_uInt16 nItemId, void* nUserValue, MenuUserDataReleaseFunction aFunc) +{ + SolarMutexGuard aSolarGuard; + ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); + + mpMenu->SetUserValue(nItemId, nUserValue, aFunc); +} + +void* VCLXMenu::getUserValue(sal_uInt16 nItemId) +{ + SolarMutexGuard aSolarGuard; + ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); + + return mpMenu->GetUserValue(nItemId); +} + VCLXMenuBar::VCLXMenuBar() { ImplCreateMenu( false ); -- cgit