diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2016-03-28 17:12:04 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-03-31 08:00:13 +0000 |
commit | 1aa4df615fa5599d05e9dd5e925b5852676185fa (patch) | |
tree | 1f637fa13140941a5775c91f058d0742f911693f /framework/source | |
parent | 2bd1e7aafeebdfe0e1656ed1ff01762039be5af1 (diff) |
use SAL_N_ELEMENTS in for loops
for with
git grep -n 'for.*sizeof'
Change-Id: I6211024385e03ac5eeeb38690d2c1c699e015c2f
Reviewed-on: https://gerrit.libreoffice.org/23569
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'framework/source')
-rw-r--r-- | framework/source/uielement/controlmenucontroller.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx index 250be1fb007b..956639e6b2cc 100644 --- a/framework/source/uielement/controlmenucontroller.cxx +++ b/framework/source/uielement/controlmenucontroller.cxx @@ -262,7 +262,7 @@ void ControlMenuController::updateImagesPopupMenu( PopupMenu* pPopupMenu ) if ( pResMgr->IsAvailable( aResId )) { ImageList aImageList( aResId ); - for ( sal_uInt32 i=0; i < sizeof(nConvertSlots)/sizeof(nConvertSlots[0]); ++i ) + for ( sal_uInt32 i=0; i < SAL_N_ELEMENTS(nConvertSlots); ++i ) { // das entsprechende Image dran if ( m_bShowMenuImages ) @@ -310,7 +310,7 @@ void SAL_CALL ControlMenuController::statusChanged( const FeatureStateEvent& Eve osl::ResettableMutexGuard aLock( m_aMutex ); sal_uInt16 nMenuId = 0; - for (sal_uInt32 i=0; i < sizeof(aCommands) / sizeof (aCommands[0]); ++i) + for (sal_uInt32 i=0; i < SAL_N_ELEMENTS(aCommands); ++i) { if ( Event.FeatureURL.Complete.equalsAscii( aCommands[i] )) { @@ -419,7 +419,7 @@ void SAL_CALL ControlMenuController::updatePopupMenu() throw (css::uno::RuntimeE fillPopupMenu( m_xPopupMenu ); m_aURLToDispatchMap.free(); - for (sal_uInt32 i=0; i<sizeof(aCommands)/sizeof(aCommands[0]); ++i) + for (sal_uInt32 i=0; i<SAL_N_ELEMENTS(aCommands); ++i) { aTargetURL.Complete = OUString::createFromAscii( aCommands[i] ); m_xURLTransformer->parseStrict( aTargetURL ); |