diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2022-07-29 09:56:51 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2022-08-30 13:08:39 +0200 |
commit | dbeb697d62250e9429462c7f61b859893262a651 (patch) | |
tree | cda0cb7a6d7179971e2da8e174da3712d53a1767 /sfx2/inc | |
parent | 4fb8c0d14cb2468f7336438004f699b9eb7e7e4a (diff) |
tdf#149956 Rework toolbar image flipping
An unified code, covering both vcl and weld cases. For
SidebarToolBox, the controller is created before items
are inserted, so we listen for item insert event to set
initially correct state.
Change-Id: I3841f21883104b4d3f8541c97ec7fa5fc0bec575
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139022
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'sfx2/inc')
-rw-r--r-- | sfx2/inc/sidebar/ControllerFactory.hxx | 4 | ||||
-rw-r--r-- | sfx2/inc/sidebar/SidebarToolBox.hxx | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/sfx2/inc/sidebar/ControllerFactory.hxx b/sfx2/inc/sidebar/ControllerFactory.hxx index 8d45a2e3b1ed..c30cec61425b 100644 --- a/sfx2/inc/sidebar/ControllerFactory.hxx +++ b/sfx2/inc/sidebar/ControllerFactory.hxx @@ -40,6 +40,10 @@ namespace sfx2::sidebar { class ControllerFactory { public: + static css::uno::Reference<css::lang::XComponent> CreateImageController( + const css::uno::Reference<css::frame::XFrame>& rxFrame, + const css::uno::Reference<css::awt::XWindow>& rxParentWindow); + static css::uno::Reference<css::frame::XToolbarController> CreateToolBoxController( ToolBox* pToolBox, const ToolBoxItemId nItemId, diff --git a/sfx2/inc/sidebar/SidebarToolBox.hxx b/sfx2/inc/sidebar/SidebarToolBox.hxx index acae7475e69a..f3c18c531455 100644 --- a/sfx2/inc/sidebar/SidebarToolBox.hxx +++ b/sfx2/inc/sidebar/SidebarToolBox.hxx @@ -54,6 +54,7 @@ public: void InitToolBox(VclBuilder::stringmap& rMap); protected: + css::uno::Reference<css::lang::XComponent> mxImageController; typedef std::map<ToolBoxItemId, css::uno::Reference<css::frame::XToolbarController>> ControllerContainer; ControllerContainer maControllers; bool mbAreHandlersRegistered; |