diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-03-13 13:27:46 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-03-13 13:48:23 +0100 |
commit | 6e4d3bad807a32371fe49f0a4a28ca0e5b0f6e70 (patch) | |
tree | 9e0f0f964884306b9675ce87e0c129cbcee5b963 /sfx2 | |
parent | 4ea76db5e53235971b597a2810a6d12618d6aaea (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 'sfx2')
-rw-r--r-- | sfx2/source/sidebar/SidebarToolBox.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/viewsh.cxx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sfx2/source/sidebar/SidebarToolBox.cxx b/sfx2/source/sidebar/SidebarToolBox.cxx index 5a52fe8b6643..487469418f85 100644 --- a/sfx2/source/sidebar/SidebarToolBox.cxx +++ b/sfx2/source/sidebar/SidebarToolBox.cxx @@ -109,7 +109,7 @@ ToolBoxButtonSize SidebarToolBox::GetDefaultButtonSize() const void SidebarToolBox::InsertItem(const OUString& rCommand, const css::uno::Reference<css::frame::XFrame>& rFrame, - ToolBoxItemBits nBits, const Size& rRequestedSize, sal_uInt16 nPos) + ToolBoxItemBits nBits, const Size& rRequestedSize, ImplToolItems::size_type nPos) { OUString aCommand( rCommand ); diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 9053ebea9265..59a40a51a0c1 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -443,8 +443,8 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) ToolBox* pTextToolbox = dynamic_cast< ToolBox* >( pWin.get() ); if( pTextToolbox ) { - sal_uInt16 nItemCount = pTextToolbox->GetItemCount(); - for( sal_uInt16 nItem = 0; nItem < nItemCount; ++nItem ) + ToolBox::ImplToolItems::size_type nItemCount = pTextToolbox->GetItemCount(); + for( ToolBox::ImplToolItems::size_type nItem = 0; nItem < nItemCount; ++nItem ) { sal_uInt16 nItemId = pTextToolbox->GetItemId( nItem ); const OUString& rCommand = pTextToolbox->GetItemCommand( nItemId ); |