summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-03-13 13:27:46 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-03-13 13:48:23 +0100
commit6e4d3bad807a32371fe49f0a4a28ca0e5b0f6e70 (patch)
tree9e0f0f964884306b9675ce87e0c129cbcee5b963 /svx
parent4ea76db5e53235971b597a2810a6d12618d6aaea (diff)
Clean up integer types representing positions in ToolBox's item vector
(vs. uses of sal_uInt16 representing such items' IDs). APPEND and ITEM_NOTFOUND are members of ToolBox now (and have been bumped to the corresponding type's max). The payload of VclEventIds ToolboxButtonStateChanged ToolboxClick ToolboxHighlightOff ToolboxItemAdded ToolboxItemDisabled ToolboxItemEnabled ToolboxItemRemoved ToolboxItemTextChanged ToolboxItemUpdated ToolboxItemWindowChanged ToolboxSelect has been changed too (note that reading/writing of those payloads isn't very consistent, though: for some of these, values are written that are never read, while for some others no values are ever written but the reading code would like to receive some value if the payload wasn't a nullptr). Change-Id: I4856ffb3637404b8d866621a3503d7922b1b8141
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/srchdlg.cxx2
-rw-r--r--svx/source/tbxctrls/tbunosearchcontrollers.cxx12
2 files changed, 7 insertions, 7 deletions
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index c990206fb404..2929c37769cc 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -2395,7 +2395,7 @@ static vcl::Window* lcl_GetSearchLabelWindow()
css::uno::Reference< css::awt::XWindow > xWindow(
xUIElement->getRealInterface(), css::uno::UNO_QUERY_THROW);
VclPtr< ToolBox > pToolBox = static_cast<ToolBox*>( VCLUnoHelper::GetWindow(xWindow).get() );
- for (size_t i = 0; pToolBox && i < pToolBox->GetItemCount(); ++i)
+ for (ToolBox::ImplToolItems::size_type i = 0; pToolBox && i < pToolBox->GetItemCount(); ++i)
{
sal_uInt16 id = pToolBox->GetItemId(i);
if (pToolBox->GetItemCommand(id) == ".uno:SearchLabel")
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index 430fa8cc2f12..943918988c12 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -89,8 +89,8 @@ void impl_executeSearch( const css::uno::Reference< css::uno::XComponentContext
bool bSearchFormatted = false;
if ( pToolBox )
{
- sal_uInt16 nItemCount = pToolBox->GetItemCount();
- for ( sal_uInt16 i=0; i<nItemCount; ++i )
+ ToolBox::ImplToolItems::size_type nItemCount = pToolBox->GetItemCount();
+ for ( ToolBox::ImplToolItems::size_type i=0; i<nItemCount; ++i )
{
sal_uInt16 id = pToolBox->GetItemId(i);
OUString sItemCommand = pToolBox->GetItemCommand(id);
@@ -526,8 +526,8 @@ void SAL_CALL FindTextToolbarController::initialize( const css::uno::Sequence< c
ToolBox* pToolBox = static_cast<ToolBox*>(pWindow.get());
if ( pToolBox )
{
- sal_uInt16 nItemCount = pToolBox->GetItemCount();
- for ( sal_uInt16 i=0; i<nItemCount; ++i )
+ ToolBox::ImplToolItems::size_type nItemCount = pToolBox->GetItemCount();
+ for ( ToolBox::ImplToolItems::size_type i=0; i<nItemCount; ++i )
{
OUString sItemCommand = pToolBox->GetItemCommand(i);
sal_uInt16 id = pToolBox->GetItemId(i);
@@ -1435,8 +1435,8 @@ void SAL_CALL FindbarDispatcher::dispatch( const css::util::URL& aURL, const css
ToolBox* pToolBox = static_cast<ToolBox*>(pWindow.get());
if ( pToolBox )
{
- sal_uInt16 nItemCount = pToolBox->GetItemCount();
- for ( sal_uInt16 i=0; i<nItemCount; ++i )
+ ToolBox::ImplToolItems::size_type nItemCount = pToolBox->GetItemCount();
+ for ( ToolBox::ImplToolItems::size_type i=0; i<nItemCount; ++i )
{
sal_uInt16 id = pToolBox->GetItemId(i);
OUString sItemCommand = pToolBox->GetItemCommand(id);