summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-12-14 10:22:00 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-01-08 15:32:56 +0100
commit326351e2b342eae5ca0154b2ba303b937a696577 (patch)
tree342662f5d5bf7468a0f86fa8c8cca7f313cfc7db /toolkit
parent5f6aed6016c33c3d2dae26789ac3b6b69f5edbba (diff)
move UserData bodge into VCLXMenu
Change-Id: I20c303788e576a29574a696cb20c9e8a235233b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126804 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/awt/vclxmenu.cxx16
1 files changed, 16 insertions, 0 deletions
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 );