summaryrefslogtreecommitdiff
path: root/sfx2/inc
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-03-08 21:37:43 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-03-11 14:10:30 +0100
commit1692998399eecb79e7b59456cff805bcb77aece4 (patch)
tree8cc22c633e88f19c39f5736e87a0934f041729de /sfx2/inc
parent665a2b477dd4f412b42ffb58a183f7a702cd7645 (diff)
use strong_int for item ids in vcl::ToolBox
(*) fix bug in SfxToolBoxControl::StateChanged where it was using the slot id instead of the toolbox item id (*) I left the logic in SbaTableQueryBrowser alone, but it looks suspicious, casting slot ids to toolbox ids Change-Id: Ied229164c27fb4456b0515c6fdcbd1682766a1a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112186 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/inc')
-rw-r--r--sfx2/inc/inettbc.hxx2
-rw-r--r--sfx2/inc/sidebar/ControllerFactory.hxx3
-rw-r--r--sfx2/inc/sidebar/SidebarToolBox.hxx6
3 files changed, 6 insertions, 5 deletions
diff --git a/sfx2/inc/inettbc.hxx b/sfx2/inc/inettbc.hxx
index 9e0bbac8541e..0eb4feecbe44 100644
--- a/sfx2/inc/inettbc.hxx
+++ b/sfx2/inc/inettbc.hxx
@@ -52,7 +52,7 @@ public:
SFX_DECL_TOOLBOX_CONTROL();
- SfxURLToolBoxControl_Impl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rBox );
+ SfxURLToolBoxControl_Impl( sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rBox );
virtual ~SfxURLToolBoxControl_Impl() override;
virtual VclPtr<InterimItemWindow> CreateItemWindow(vcl::Window* pParent) override;
diff --git a/sfx2/inc/sidebar/ControllerFactory.hxx b/sfx2/inc/sidebar/ControllerFactory.hxx
index d33f00d2e8b6..10ddf97c9df5 100644
--- a/sfx2/inc/sidebar/ControllerFactory.hxx
+++ b/sfx2/inc/sidebar/ControllerFactory.hxx
@@ -20,6 +20,7 @@
#include <sfx2/dllapi.h>
#include <com/sun/star/uno/Reference.hxx>
+#include <vcl/toolbox.hxx>
namespace com::sun::star::awt { class XWindow; }
namespace com::sun::star::frame { class XController; }
@@ -42,7 +43,7 @@ class ControllerFactory
public:
static css::uno::Reference<css::frame::XToolbarController> CreateToolBoxController(
ToolBox* pToolBox,
- const sal_uInt16 nItemId,
+ const ToolBoxItemId nItemId,
const OUString& rsCommandName,
const css::uno::Reference<css::frame::XFrame>& rxFrame,
const css::uno::Reference<css::frame::XController>& rxController,
diff --git a/sfx2/inc/sidebar/SidebarToolBox.hxx b/sfx2/inc/sidebar/SidebarToolBox.hxx
index 93cd0a9795dc..1dd26503b0fa 100644
--- a/sfx2/inc/sidebar/SidebarToolBox.hxx
+++ b/sfx2/inc/sidebar/SidebarToolBox.hxx
@@ -56,7 +56,7 @@ public:
void InitToolBox(VclBuilder::stringmap& rMap);
protected:
- typedef std::map<sal_uInt16, css::uno::Reference<css::frame::XToolbarController>> ControllerContainer;
+ typedef std::map<ToolBoxItemId, css::uno::Reference<css::frame::XToolbarController>> ControllerContainer;
ControllerContainer maControllers;
bool mbAreHandlersRegistered;
bool mbUseDefaultButtonSize;
@@ -68,9 +68,9 @@ protected:
DECL_LINK(SelectHandler, ToolBox*, void);
DECL_LINK(ChangedIconSizeHandler, LinkParamNone*, void );
- css::uno::Reference<css::frame::XToolbarController> GetControllerForItemId(const sal_uInt16 nItemId) const;
+ css::uno::Reference<css::frame::XToolbarController> GetControllerForItemId(const ToolBoxItemId nItemId) const;
- void CreateController(const sal_uInt16 nItemId,
+ void CreateController(const ToolBoxItemId nItemId,
const css::uno::Reference<css::frame::XFrame>& rxFrame,
const sal_Int32 nItemWidth, bool bSideBar);
void RegisterHandlers();