diff options
Diffstat (limited to 'toolkit/source')
-rw-r--r-- | toolkit/source/awt/vclxmenu.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx index 2b98cc7436ae..45252bc718e4 100644 --- a/toolkit/source/awt/vclxmenu.cxx +++ b/toolkit/source/awt/vclxmenu.cxx @@ -40,12 +40,14 @@ VCLXMenu::VCLXMenu() : maMenuListeners( *this ) + , mnDefaultItem(0) { mpMenu = nullptr; } VCLXMenu::VCLXMenu( Menu* pMenu ) : maMenuListeners( *this ) + , mnDefaultItem(0) { mpMenu = pMenu; } @@ -476,20 +478,17 @@ void VCLXMenu::setDefaultItem( sal_Int16 nItemId ) throw(css::uno::RuntimeException, std::exception) { - SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - if ( mpMenu ) - mpMenu->SetDefaultItem( nItemId ); + mnDefaultItem = nItemId; } sal_Int16 VCLXMenu::getDefaultItem( ) throw(css::uno::RuntimeException, std::exception) { - SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - return mpMenu ? mpMenu->GetDefaultItem() : 0; + return mnDefaultItem; } void VCLXMenu::checkItem( |