diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2017-05-03 02:25:07 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2017-07-30 07:08:44 +0200 |
commit | 9f61005dd9c4bf86e92e4c60677cf06a949a7af7 (patch) | |
tree | 9ab00876068a75b816bcb5d10b9d40296551c1be /svtools | |
parent | d742c0019435d0bc90c9342492583636099a057f (diff) |
tdf#109309 Currency dropdown is misplaced under Wayland
- Base SvxCurrencyToolBoxControl on PopupWindowController,
so we still allow tearoff, but without marking the window
as self-decorated (unless actually teared-off).
- Add support for toggle state to PopupWindowController.
Change-Id: I60e004e6ada3efe092352cb93be5aae346073f83
Reviewed-on: https://gerrit.libreoffice.org/40557
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/uno/popupwindowcontroller.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/svtools/source/uno/popupwindowcontroller.cxx b/svtools/source/uno/popupwindowcontroller.cxx index dd4f6cf7a820..166a58d262ed 100644 --- a/svtools/source/uno/popupwindowcontroller.cxx +++ b/svtools/source/uno/popupwindowcontroller.cxx @@ -178,8 +178,15 @@ void SAL_CALL PopupWindowController::dispose() // XStatusListener void SAL_CALL PopupWindowController::statusChanged( const frame::FeatureStateEvent& rEvent ) { - svt::ToolboxController::statusChanged(rEvent); - enable( rEvent.IsEnabled ); + ToolBox* pToolBox = nullptr; + sal_uInt16 nItemId = 0; + if ( getToolboxId( nItemId, &pToolBox ) ) + { + bool bValue = false; + rEvent.State >>= bValue; + pToolBox->CheckItem( nItemId, bValue ); + pToolBox->EnableItem( nItemId, rEvent.IsEnabled ); + } } Reference< awt::XWindow > SAL_CALL PopupWindowController::createPopupWindow() |