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 648c8572bf9a..9326e6ae868d 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -1104,7 +1104,7 @@ PopupMenu* FmXFormShell::GetConversionMenu()
PopupMenu* pNewMenu = new PopupMenu(SVX_RES( RID_FMSHELL_CONVERSIONMENU ));
ImageList aImageList( SVX_RES( RID_SVXIMGLIST_FMEXPL) );
- for ( size_t i = 0; i < SAL_N_ELEMENTS( nConvertSlots ); ++i )
+ for ( size_t i = 0; i < sizeof (nConvertSlots) / sizeof (nConvertSlots[0]); ++i )
{
// das entsprechende Image dran
pNewMenu->SetItemImage(nConvertSlots[i], aImageList.GetImage(nCreateSlots[i]));
@@ -1116,7 +1116,7 @@ PopupMenu* FmXFormShell::GetConversionMenu()
//------------------------------------------------------------------------------
bool FmXFormShell::isControlConversionSlot( sal_uInt16 nSlotId )
{
- for ( size_t i = 0; i < SAL_N_ELEMENTS( nConvertSlots ); ++i )
+ for ( size_t i = 0; i < sizeof (nConvertSlots) / sizeof (nConvertSlots[0]); ++i )
if (nConvertSlots[i] == nSlotId)
return true;
return false;
@@ -1152,7 +1152,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 < SAL_N_ELEMENTS( nConvertSlots ); ++lookupSlot )
+ for ( size_t lookupSlot = 0; lookupSlot < sizeof( nConvertSlots ) / sizeof( nConvertSlots[0] ); ++lookupSlot )
{
if (nConvertSlots[lookupSlot] == _nSlotId)
{
@@ -1367,10 +1367,10 @@ bool FmXFormShell::canConvertCurrentSelectionToControl( sal_Int16 nConversionSlo
)
return false; // those types cannot be converted
- DBG_ASSERT(SAL_N_ELEMENTS(nConvertSlots) == SAL_N_ELEMENTS(nObjectTypes),
+ DBG_ASSERT(sizeof(nConvertSlots)/sizeof(nConvertSlots[0]) == sizeof(nObjectTypes)/sizeof(nObjectTypes[0]),
"FmXFormShell::canConvertCurrentSelectionToControl: nConvertSlots & nObjectTypes must have the same size !");
- for ( size_t i = 0; i < SAL_N_ELEMENTS( nConvertSlots ); ++i )
+ for ( size_t i = 0; i < sizeof( nConvertSlots ) / sizeof( nConvertSlots[0] ); ++i )
if (nConvertSlots[i] == nConversionSlot)
return nObjectTypes[i] != nObjectType;
@@ -2111,7 +2111,7 @@ bool FmXFormShell::setCurrentSelection( const InterfaceBag& _rSelection )
impl_updateCurrentForm( xNewCurrentForm );
// ensure some slots are updated
- for ( size_t i = 0; i < SAL_N_ELEMENTS( SelObjectSlotMap ); ++i )
+ for ( size_t i = 0; i < sizeof( SelObjectSlotMap ) / sizeof( SelObjectSlotMap[0] ); ++i )
InvalidateSlot( SelObjectSlotMap[i], sal_False);
return true;
@@ -2151,7 +2151,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 < SAL_N_ELEMENTS( DlgSlotMap ); ++i )
+ for ( size_t i = 0; i < sizeof( DlgSlotMap ) / sizeof( DlgSlotMap[0] ); ++i )
InvalidateSlot( DlgSlotMap[i], sal_False );
}