summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls/tbunosearchcontrollers.cxx
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 /svx/source/tbxctrls/tbunosearchcontrollers.cxx
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 'svx/source/tbxctrls/tbunosearchcontrollers.cxx')
-rw-r--r--svx/source/tbxctrls/tbunosearchcontrollers.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index 6158cdfdcf31..1b2606ed393a 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -135,7 +135,7 @@ void impl_executeSearch( const css::uno::Reference< css::uno::XComponentContext
ToolBox::ImplToolItems::size_type nItemCount = pToolBox->GetItemCount();
for ( ToolBox::ImplToolItems::size_type i=0; i<nItemCount; ++i )
{
- sal_uInt16 id = pToolBox->GetItemId(i);
+ ToolBoxItemId id = pToolBox->GetItemId(i);
OUString sItemCommand = pToolBox->GetItemCommand(id);
if ( sItemCommand == COMMAND_FINDTEXT )
{
@@ -563,9 +563,9 @@ private:
VclPtr<FindTextFieldControl> m_pFindTextFieldControl;
- sal_uInt16 m_nDownSearchId;
- sal_uInt16 m_nUpSearchId;
- sal_uInt16 m_nFindAllId;
+ ToolBoxItemId m_nDownSearchId;
+ ToolBoxItemId m_nUpSearchId;
+ ToolBoxItemId m_nFindAllId;
};
@@ -1391,7 +1391,7 @@ void SAL_CALL SearchLabelToolboxController::statusChanged( const css::frame::Fea
css::uno::Reference< css::awt::XWindow > SAL_CALL SearchLabelToolboxController::createItemWindow( const css::uno::Reference< css::awt::XWindow >& Parent )
{
ToolBox* pToolBox = nullptr;
- sal_uInt16 nId = 0;
+ ToolBoxItemId nId;
if (getToolboxId(nId, &pToolBox))
pToolBox->SetItemWindowNonInteractive(nId, true);
@@ -1560,7 +1560,7 @@ void SAL_CALL FindbarDispatcher::dispatch( const css::util::URL& aURL, const css
ToolBox::ImplToolItems::size_type nItemCount = pToolBox->GetItemCount();
for ( ToolBox::ImplToolItems::size_type i=0; i<nItemCount; ++i )
{
- sal_uInt16 id = pToolBox->GetItemId(i);
+ ToolBoxItemId id = pToolBox->GetItemId(i);
OUString sItemCommand = pToolBox->GetItemCommand(id);
if ( sItemCommand == COMMAND_FINDTEXT )
{