summaryrefslogtreecommitdiff
path: root/svx/source/form/fmshimp.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/form/fmshimp.cxx')
-rw-r--r--svx/source/form/fmshimp.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 09110e2d9b0f..7e084cac3043 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -1139,7 +1139,7 @@ PopupMenu* FmXFormShell::GetConversionMenu()
PopupMenu* pNewMenu = new PopupMenu(SVX_RES( RID_FMSHELL_CONVERSIONMENU ));
ImageList aImageList( SVX_RES( bIsHiContrastMode ? RID_SVXIMGLIST_FMEXPL_HC : RID_SVXIMGLIST_FMEXPL) );
- for ( size_t i = 0; i < sizeof( nConvertSlots ) / sizeof( nConvertSlots[0] ); ++i )
+ for ( size_t i = 0; i < SAL_N_ELEMENTS( nConvertSlots ); ++i )
{
// das entsprechende Image dran
pNewMenu->SetItemImage(nConvertSlots[i], aImageList.GetImage(nCreateSlots[i]));
@@ -1152,7 +1152,7 @@ PopupMenu* FmXFormShell::GetConversionMenu()
bool FmXFormShell::isControlConversionSlot( sal_uInt16 nSlotId )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::isControlConversionSlot" );
- for ( size_t i = 0; i < sizeof( nConvertSlots ) / sizeof( nConvertSlots[0] ); ++i )
+ for ( size_t i = 0; i < SAL_N_ELEMENTS( nConvertSlots ); ++i )
if (nConvertSlots[i] == nSlotId)
return true;
return false;
@@ -1190,7 +1190,7 @@ bool FmXFormShell::executeControlConversionSlot( const Reference< XFormComponent
OSL_ENSURE( isSolelySelected( _rxObject ),
"FmXFormShell::executeControlConversionSlot: hmm ... shouldn't this parameter be redundant?" );
- for ( size_t lookupSlot = 0; lookupSlot < sizeof( nConvertSlots ) / sizeof( nConvertSlots[0] ); ++lookupSlot )
+ for ( size_t lookupSlot = 0; lookupSlot < SAL_N_ELEMENTS( nConvertSlots ); ++lookupSlot )
{
if (nConvertSlots[lookupSlot] == _nSlotId)
{
@@ -1406,10 +1406,10 @@ bool FmXFormShell::canConvertCurrentSelectionToControl( sal_Int16 nConversionSlo
)
return false; // those types cannot be converted
- DBG_ASSERT(sizeof(nConvertSlots)/sizeof(nConvertSlots[0]) == sizeof(nObjectTypes)/sizeof(nObjectTypes[0]),
+ DBG_ASSERT(SAL_N_ELEMENTS(nConvertSlots) == SAL_N_ELEMENTS(nObjectTypes),
"FmXFormShell::canConvertCurrentSelectionToControl: nConvertSlots & nObjectTypes must have the same size !");
- for ( size_t i = 0; i < sizeof( nConvertSlots ) / sizeof( nConvertSlots[0] ); ++i )
+ for ( size_t i = 0; i < SAL_N_ELEMENTS( nConvertSlots ); ++i )
if (nConvertSlots[i] == nConversionSlot)
return nObjectTypes[i] != nObjectType;
@@ -2168,7 +2168,7 @@ bool FmXFormShell::setCurrentSelection( const InterfaceBag& _rSelection )
impl_updateCurrentForm( xNewCurrentForm );
// ensure some slots are updated
- for ( size_t i = 0; i < sizeof( SelObjectSlotMap ) / sizeof( SelObjectSlotMap[0] ); ++i )
+ for ( size_t i = 0; i < SAL_N_ELEMENTS( SelObjectSlotMap ); ++i )
InvalidateSlot( SelObjectSlotMap[i], sal_False);
return true;
@@ -2211,7 +2211,7 @@ void FmXFormShell::impl_updateCurrentForm( const Reference< XForm >& _rxNewCurFo
pPage->GetImpl().setCurForm( m_xCurrentForm );
// ensure the UI which depends on the current form is up-to-date
- for ( size_t i = 0; i < sizeof( DlgSlotMap ) / sizeof( DlgSlotMap[0] ); ++i )
+ for ( size_t i = 0; i < SAL_N_ELEMENTS( DlgSlotMap ); ++i )
InvalidateSlot( DlgSlotMap[i], sal_False );
}