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 /forms | |
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 'forms')
-rw-r--r-- | forms/source/solar/control/navtoolbar.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx index f2be67199113..169ceb3ff635 100644 --- a/forms/source/solar/control/navtoolbar.cxx +++ b/forms/source/solar/control/navtoolbar.cxx @@ -171,7 +171,7 @@ namespace frm pPositionWindow->setDispatcher( _pDispatcher ); // update feature states - for ( sal_uInt16 nPos = 0; nPos < m_pToolbar->GetItemCount(); ++nPos ) + for ( ToolBox::ImplToolItems::size_type nPos = 0; nPos < m_pToolbar->GetItemCount(); ++nPos ) { sal_uInt16 nItemId = m_pToolbar->GetItemId( nPos ); @@ -199,7 +199,7 @@ namespace frm void NavigationToolBar::enableFeature( sal_Int16 _nFeatureId, bool _bEnabled ) { - DBG_ASSERT( m_pToolbar->GetItemPos( (sal_uInt16)_nFeatureId ) != TOOLBOX_ITEM_NOTFOUND, + DBG_ASSERT( m_pToolbar->GetItemPos( (sal_uInt16)_nFeatureId ) != ToolBox::ITEM_NOTFOUND, "NavigationToolBar::enableFeature: invalid id!" ); implEnableItem( (sal_uInt16)_nFeatureId, _bEnabled ); @@ -208,7 +208,7 @@ namespace frm void NavigationToolBar::checkFeature( sal_Int16 _nFeatureId, bool _bEnabled ) { - DBG_ASSERT( m_pToolbar->GetItemPos( (sal_uInt16)_nFeatureId ) != TOOLBOX_ITEM_NOTFOUND, + DBG_ASSERT( m_pToolbar->GetItemPos( (sal_uInt16)_nFeatureId ) != ToolBox::ITEM_NOTFOUND, "NavigationToolBar::checkFeature: invalid id!" ); m_pToolbar->CheckItem( (sal_uInt16)_nFeatureId, _bEnabled ); @@ -217,7 +217,7 @@ namespace frm void NavigationToolBar::setFeatureText( sal_Int16 _nFeatureId, const OUString& _rText ) { - DBG_ASSERT( m_pToolbar->GetItemPos( (sal_uInt16)_nFeatureId ) != TOOLBOX_ITEM_NOTFOUND, + DBG_ASSERT( m_pToolbar->GetItemPos( (sal_uInt16)_nFeatureId ) != ToolBox::ITEM_NOTFOUND, "NavigationToolBar::checkFeature: invalid id!" ); vcl::Window* pItemWindow = m_pToolbar->GetItemWindow( (sal_uInt16)_nFeatureId ); @@ -343,14 +343,14 @@ namespace frm if ( !m_pImageProvider ) return; - const sal_uInt16 nItemCount = m_pToolbar->GetItemCount(); + const ToolBox::ImplToolItems::size_type nItemCount = m_pToolbar->GetItemCount(); // collect the FormFeatures in the toolbar typedef ::std::vector< sal_Int16 > FormFeatures; FormFeatures aFormFeatures; aFormFeatures.reserve( nItemCount ); - for ( sal_uInt16 i=0; i<nItemCount; ++i ) + for ( ToolBox::ImplToolItems::size_type i=0; i<nItemCount; ++i ) { sal_uInt16 nId = m_pToolbar->GetItemId( i ); if ( ( ToolBoxItemType::BUTTON == m_pToolbar->GetItemType( i ) ) && !isArtificialItem( nId ) ) @@ -552,7 +552,7 @@ namespace frm void NavigationToolBar::forEachItemWindow( ItemWindowHandler _handler ) { - for ( sal_uInt16 item = 0; item < m_pToolbar->GetItemCount(); ++item ) + for ( ToolBox::ImplToolItems::size_type item = 0; item < m_pToolbar->GetItemCount(); ++item ) { sal_uInt16 nItemId = m_pToolbar->GetItemId( item ); vcl::Window* pItemWindow = m_pToolbar->GetItemWindow( nItemId ); @@ -563,7 +563,7 @@ namespace frm void NavigationToolBar::forEachItemWindow( ItemWindowHandler2 _handler, const void* _pParam ) { - for ( sal_uInt16 item = 0; item < m_pToolbar->GetItemCount(); ++item ) + for ( ToolBox::ImplToolItems::size_type item = 0; item < m_pToolbar->GetItemCount(); ++item ) { sal_uInt16 nItemId = m_pToolbar->GetItemId( item ); vcl::Window* pItemWindow = m_pToolbar->GetItemWindow( nItemId ); |