summaryrefslogtreecommitdiff
path: root/sd
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 /sd
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 'sd')
-rw-r--r--sd/source/ui/controller/displaymodecontroller.cxx4
-rw-r--r--sd/source/ui/controller/slidelayoutcontroller.cxx2
-rw-r--r--sd/source/ui/dlg/diactrl.cxx2
-rw-r--r--sd/source/ui/dlg/gluectrl.cxx2
-rw-r--r--sd/source/ui/inc/diactrl.hxx2
-rw-r--r--sd/source/ui/inc/gluectrl.hxx2
6 files changed, 7 insertions, 7 deletions
diff --git a/sd/source/ui/controller/displaymodecontroller.cxx b/sd/source/ui/controller/displaymodecontroller.cxx
index c48f5d635ce9..8dc1a743897b 100644
--- a/sd/source/ui/controller/displaymodecontroller.cxx
+++ b/sd/source/ui/controller/displaymodecontroller.cxx
@@ -199,7 +199,7 @@ void SAL_CALL DisplayModeController::initialize( const css::uno::Sequence< css::
{
svt::PopupWindowController::initialize( aArguments );
ToolBox* pToolBox = nullptr;
- sal_uInt16 nId = 0;
+ ToolBoxItemId nId;
if ( getToolboxId( nId, &pToolBox ) )
pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) | ToolBoxItemBits::DROPDOWNONLY );
setToolboxItemImage(BMP_DISPLAYMODE_SLIDE);
@@ -222,7 +222,7 @@ VclPtr<vcl::Window> DisplayModeController::createVclPopupWindow( vcl::Window* pP
void DisplayModeController::setToolboxItemImage(const OUString& rImage)
{
- sal_uInt16 nId;
+ ToolBoxItemId nId;
ToolBox* pToolBox = nullptr;
if (!getToolboxId( nId, &pToolBox ))
return;
diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx
index 284df02be296..1fcef5fa98de 100644
--- a/sd/source/ui/controller/slidelayoutcontroller.cxx
+++ b/sd/source/ui/controller/slidelayoutcontroller.cxx
@@ -317,7 +317,7 @@ void SAL_CALL SlideLayoutController::initialize( const css::uno::Sequence< css::
svt::PopupWindowController::initialize( aArguments );
ToolBox* pToolBox = nullptr;
- sal_uInt16 nId = 0;
+ ToolBoxItemId nId;
if ( getToolboxId( nId, &pToolBox ) )
{
if ( mbInsertPage )
diff --git a/sd/source/ui/dlg/diactrl.cxx b/sd/source/ui/dlg/diactrl.cxx
index aa4cff712d63..6dd4fb84516d 100644
--- a/sd/source/ui/dlg/diactrl.cxx
+++ b/sd/source/ui/dlg/diactrl.cxx
@@ -139,7 +139,7 @@ IMPL_LINK_NOARG(SdPagesField, ModifyHdl, weld::SpinButton&, void)
aArgs );
}
-SdTbxCtlDiaPages::SdTbxCtlDiaPages( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) :
+SdTbxCtlDiaPages::SdTbxCtlDiaPages( sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx )
{
}
diff --git a/sd/source/ui/dlg/gluectrl.cxx b/sd/source/ui/dlg/gluectrl.cxx
index 8e4389dd8983..23e1e4b98317 100644
--- a/sd/source/ui/dlg/gluectrl.cxx
+++ b/sd/source/ui/dlg/gluectrl.cxx
@@ -134,7 +134,7 @@ void GlueEscDirLB::Fill()
* Constructor for glue point escape direction toolbox control
*/
SdTbxCtlGlueEscDir::SdTbxCtlGlueEscDir(
- sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) :
+ sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx )
{
}
diff --git a/sd/source/ui/inc/diactrl.hxx b/sd/source/ui/inc/diactrl.hxx
index 850779a4b4be..63786b962312 100644
--- a/sd/source/ui/inc/diactrl.hxx
+++ b/sd/source/ui/inc/diactrl.hxx
@@ -62,7 +62,7 @@ public:
SFX_DECL_TOOLBOX_CONTROL();
- SdTbxCtlDiaPages(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
+ SdTbxCtlDiaPages(sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx);
virtual ~SdTbxCtlDiaPages() override;
};
diff --git a/sd/source/ui/inc/gluectrl.hxx b/sd/source/ui/inc/gluectrl.hxx
index 5176c980f402..c5a9b79fb901 100644
--- a/sd/source/ui/inc/gluectrl.hxx
+++ b/sd/source/ui/inc/gluectrl.hxx
@@ -63,7 +63,7 @@ public:
SFX_DECL_TOOLBOX_CONTROL();
- SdTbxCtlGlueEscDir(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
+ SdTbxCtlGlueEscDir(sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx);
};
#endif // INCLUDED_SD_SOURCE_UI_INC_GLUECTRL_HXX