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 /include | |
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 'include')
-rw-r--r-- | include/svx/tbcontrl.hxx | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/include/svx/tbcontrl.hxx b/include/svx/tbcontrl.hxx index 6fb31324f2a6..22fd4e72910f 100644 --- a/include/svx/tbcontrl.hxx +++ b/include/svx/tbcontrl.hxx @@ -137,6 +137,7 @@ #include <svx/svxdllapi.h> #include <com/sun/star/awt/FontDescriptor.hpp> #include <com/sun/star/frame/XSubToolbarController.hpp> +#include <svtools/popupwindowcontroller.hxx> #include <svx/colorwindow.hxx> #include <svx/PaletteManager.hxx> #include <memory> @@ -248,7 +249,7 @@ public: const SfxPoolItem* pState) override; }; -class SVX_DLLPUBLIC SvxCurrencyToolBoxControl : public SfxToolBoxControl +class SVX_DLLPUBLIC SvxCurrencyToolBoxControl : public svt::PopupWindowController { private: OUString m_aFormatString; @@ -257,18 +258,24 @@ private: public: static void GetCurrencySymbols( std::vector<OUString>& rList, bool bFlag, std::vector<sal_uInt16>& rCurrencyList ); - SFX_DECL_TOOLBOX_CONTROL(); - SvxCurrencyToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rBox ); + + explicit SvxCurrencyToolBoxControl( const css::uno::Reference<css::uno::XComponentContext>& rContext ); virtual ~SvxCurrencyToolBoxControl() override; - virtual void Select( sal_uInt16 nSelectModifier ) override; - virtual VclPtr<SfxPopupWindow> CreatePopupWindow() override; + + // XToolbarController + virtual void SAL_CALL execute( sal_Int16 nSelectModifier ) override; + + using svt::ToolboxController::createPopupWindow; + virtual VclPtr<vcl::Window> createPopupWindow( vcl::Window* pParent ) override; + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() override; + virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override; // XInitialization virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& rArguments ) override; }; - - #endif // INCLUDED_SVX_TBCONTRL_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |