diff options
author | Michael Meeks <michael.meeks@suse.com> | 2012-05-29 17:23:51 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-05-29 18:03:34 +0100 |
commit | 6e6d81e9cfc593d865e409ad22b2307f87a37859 (patch) | |
tree | 4d578e5be2dfd3a403576d7c638f83f041d56911 /svx | |
parent | remove useless argument (diff) | |
download | core-6e6d81e9cfc593d865e409ad22b2307f87a37859.tar.gz core-6e6d81e9cfc593d865e409ad22b2307f87a37859.zip |
targetted SAL_N_ELEMENTS reversion.
Change-Id: I30be93ccaeb1f9fd17cbe9e3ed3165e094810b2e
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/docrecovery.cxx | 4 | ||||
-rw-r--r-- | svx/source/dialog/srchdlg.cxx | 2 | ||||
-rw-r--r-- | svx/source/fmcomp/fmgridif.cxx | 8 | ||||
-rw-r--r-- | svx/source/fmcomp/gridcell.cxx | 8 | ||||
-rw-r--r-- | svx/source/fmcomp/gridctrl.cxx | 4 | ||||
-rw-r--r-- | svx/source/form/ParseContext.cxx | 2 | ||||
-rw-r--r-- | svx/source/form/datanavi.cxx | 4 | ||||
-rw-r--r-- | svx/source/form/fmPropBrw.cxx | 4 | ||||
-rw-r--r-- | svx/source/form/fmdmod.cxx | 2 | ||||
-rw-r--r-- | svx/source/form/fmpage.cxx | 2 | ||||
-rw-r--r-- | svx/source/form/fmshimp.cxx | 14 | ||||
-rw-r--r-- | svx/source/form/fmundo.cxx | 4 | ||||
-rw-r--r-- | svx/source/form/formcontrolling.cxx | 4 | ||||
-rw-r--r-- | svx/source/unodraw/unoprov.cxx | 2 | ||||
-rw-r--r-- | svx/source/xml/xmlgrhlp.cxx | 2 |
15 files changed, 33 insertions, 33 deletions
diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx index 0ead6fa9755c..e098381db132 100644 --- a/svx/source/dialog/docrecovery.cxx +++ b/svx/source/dialog/docrecovery.cxx @@ -1824,7 +1824,7 @@ void BrokenRecoveryDialog::impl_askForSavePath() } // loop through all the other windows and adjust their size - for ( ; i < SAL_N_ELEMENTS( pWins ); ++i, ++pCurrent ) + for ( ; i < sizeof( pWins ) / sizeof( pWins[ 0 ] ); ++i, ++pCurrent ) { Size aSize = (*pCurrent)->GetSizePixel(); aSize.Width() -= nDelta; @@ -1895,7 +1895,7 @@ void BrokenRecoveryDialog::impl_askForSavePath() &maProxyServerEd, &maProxyPortFT, &maProxyPortEd, &maDescriptionFT }; Window** pCurrent = pWins; - for ( sal_uInt32 i = 0; i < SAL_N_ELEMENTS( pWins ); ++i, ++pCurrent ) + for ( sal_uInt32 i = 0; i < sizeof( pWins ) / sizeof( pWins[ 0 ] ); ++i, ++pCurrent ) { Point aPos = (*pCurrent)->GetPosPixel(); aPos.Y() -= nDelta; diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 0a0fb37fe89f..eaaa637d759c 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -842,7 +842,7 @@ void SvxSearchDialog::CalculateDelta_Impl() if ( nOffset > 0 ) { long nH = LogicToPixel( Size( 0, nOffset ), MAP_APPFONT ).Height(); - for ( i = 0; i < SAL_N_ELEMENTS( pWins ); ++i, ++pCurrent ) + for ( i = 0; i < sizeof( pWins ) / sizeof( pWins[ 0 ] ); ++i, ++pCurrent ) { if ( ( bCalcApp && i < nCalcCtrlCount ) || ( i == nCalcCtrlCount && aCJKOptions.IsCJKFontEnabled() ) diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx index d1c6efcc8d1c..4baebc946f65 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -1694,7 +1694,7 @@ void FmXGridPeer::addColumnListeners(const Reference< XPropertySet >& xCol) Reference< XPropertySetInfo > xInfo = xCol->getPropertySetInfo(); Property aPropDesc; const ::rtl::OUString* pProps = aPropsListenedTo; - const ::rtl::OUString* pPropsEnd = pProps + SAL_N_ELEMENTS( aPropsListenedTo ); + const ::rtl::OUString* pPropsEnd = pProps + sizeof( aPropsListenedTo ) / sizeof( aPropsListenedTo[ 0 ] ); for (; pProps != pPropsEnd; ++pProps) { if ( xInfo->hasPropertyByName( *pProps ) ) @@ -1717,7 +1717,7 @@ void FmXGridPeer::removeColumnListeners(const Reference< XPropertySet >& xCol) }; Reference< XPropertySetInfo > xInfo = xCol->getPropertySetInfo(); - for (sal_uInt16 i=0; i < SAL_N_ELEMENTS(aPropsListenedTo); ++i) + for (sal_uInt16 i=0; i<sizeof(aPropsListenedTo)/sizeof(aPropsListenedTo[0]); ++i) if (xInfo->hasPropertyByName(aPropsListenedTo[i])) xCol->removePropertyChangeListener(aPropsListenedTo[i], this); } @@ -2763,7 +2763,7 @@ Sequence<sal_uInt16>& FmXGridPeer::getSupportedGridSlots() DbGridControl::NavigationBar::RECORD_NEW, SID_FM_RECORD_UNDO }; - aSupported.realloc(SAL_N_ELEMENTS(nSupported)); + aSupported.realloc(sizeof(nSupported)/sizeof(nSupported[0])); sal_uInt16* pSupported = aSupported.getArray(); for (sal_uInt16 i=0; i<aSupported.getLength(); ++i, ++pSupported) *pSupported = nSupported[i]; @@ -2785,7 +2785,7 @@ Sequence< ::com::sun::star::util::URL>& FmXGridPeer::getSupportedURLs() FMURL_RECORD_MOVETONEW, FMURL_RECORD_UNDO }; - aSupported.realloc(SAL_N_ELEMENTS(sSupported)); + aSupported.realloc(sizeof(sSupported)/sizeof(sSupported[0])); ::com::sun::star::util::URL* pSupported = aSupported.getArray(); sal_uInt16 i; diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index f588de5aa94f..bd3bf23abbdd 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -733,7 +733,7 @@ void DbCellControl::ImplInitWindow( Window& rParent, const InitWindowFacet _eIni if ( ( _eInitWhat & InitWritingMode ) != 0 ) { - for ( size_t i=0; i < SAL_N_ELEMENTS( pWindows ); ++i ) + for ( size_t i=0; i < sizeof( pWindows ) / sizeof( pWindows[0] ); ++i ) { if ( pWindows[i] ) pWindows[i]->EnableRTL( rParent.IsRTLEnabled() ); @@ -742,7 +742,7 @@ void DbCellControl::ImplInitWindow( Window& rParent, const InitWindowFacet _eIni if ( ( _eInitWhat & InitFont ) != 0 ) { - for (size_t i=0; i < SAL_N_ELEMENTS(pWindows); ++i) + for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i) { if ( !pWindows[i] ) continue; @@ -774,7 +774,7 @@ void DbCellControl::ImplInitWindow( Window& rParent, const InitWindowFacet _eIni sal_Bool bTextLineColor = rParent.IsTextLineColor(); Color aTextLineColor( rParent.GetTextLineColor() ); - for (size_t i=0; i < SAL_N_ELEMENTS(pWindows); ++i) + for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i) { if ( pWindows[i] ) { @@ -795,7 +795,7 @@ void DbCellControl::ImplInitWindow( Window& rParent, const InitWindowFacet _eIni if (rParent.IsControlBackground()) { Color aColor( rParent.GetControlBackground()); - for (size_t i=0; i < SAL_N_ELEMENTS(pWindows); ++i) + for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i) { if ( pWindows[i] ) { diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index 10b940a7a980..9a5b5bb1cc2a 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -773,7 +773,7 @@ void DbGridControl::NavigationBar::StateChanged( StateChangedType nType ) case STATE_CHANGE_MIRRORING: { sal_Bool bIsRTLEnabled = IsRTLEnabled(); - for ( size_t i=0; i < SAL_N_ELEMENTS( pWindows ); ++i ) + for ( size_t i=0; i < (sizeof (pWindows) / sizeof(pWindows[0])); ++i ) pWindows[i]->EnableRTL( bIsRTLEnabled ); } break; @@ -787,7 +787,7 @@ void DbGridControl::NavigationBar::StateChanged( StateChangedType nType ) if ( IsControlFont() ) aFont.Merge( GetControlFont() ); - for (size_t i=0; i < SAL_N_ELEMENTS(pWindows); ++i) + for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i) { pWindows[i]->SetZoom(aZoom); pWindows[i]->SetZoomedPointFont(aFont); diff --git a/svx/source/form/ParseContext.cxx b/svx/source/form/ParseContext.cxx index 1c7a03174cc7..0223e18b9a1a 100644 --- a/svx/source/form/ParseContext.cxx +++ b/svx/source/form/ParseContext.cxx @@ -148,7 +148,7 @@ IParseContext::InternationalKeyCode OSystemParseContext::getIntlKeyCode(const :: KEY_COLLECT, KEY_FUSION, KEY_INTERSECTION }; - sal_uInt32 nCount = SAL_N_ELEMENTS( Intl_TokenID ); + sal_uInt32 nCount = sizeof Intl_TokenID / sizeof Intl_TokenID[0]; for (sal_uInt32 i = 0; i < nCount; i++) { ::rtl::OString aKey = getIntlKeywordAscii(Intl_TokenID[i]); diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index bf0710c3770e..ac70be037e9f 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -2902,7 +2902,7 @@ namespace svxform &m_aCalculateBtn }; Window** pCurrent = pWinsForHide; - for ( ; i < SAL_N_ELEMENTS( pWinsForHide ); ++i, ++pCurrent ) + for ( ; i < sizeof( pWinsForHide ) / sizeof( pWinsForHide[ 0 ] ); ++i, ++pCurrent ) (*pCurrent)->Hide(); Window* pWinsForMove[] = @@ -2910,7 +2910,7 @@ namespace svxform &m_aButtonsFL, &m_aOKBtn, &m_aEscBtn, &m_aHelpBtn }; pCurrent = pWinsForMove; - for ( i = 0; i < SAL_N_ELEMENTS( pWinsForMove ); ++i, ++pCurrent ) + for ( i = 0; i < sizeof( pWinsForMove ) / sizeof( pWinsForMove[ 0 ] ); ++i, ++pCurrent ) { Point aNewPos = (*pCurrent)->GetPosPixel(); aNewPos.Y() -= nDelta; diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx index a355e819e56d..b55fbdc15a9a 100644 --- a/svx/source/form/fmPropBrw.cxx +++ b/svx/source/form/fmPropBrw.cxx @@ -300,7 +300,7 @@ FmPropBrw::~FmPropBrw() , ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DialogParentWindow" ) ) , ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ControlContext" ) ) , ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ControlShapeAccess" ) ) }; - for ( size_t i = 0; i < SAL_N_ELEMENTS(pProps); ++i ) + for ( size_t i = 0; i < sizeof(pProps)/sizeof(pProps[0]); ++i ) xName->removeByName( pProps[i] ); } } @@ -586,7 +586,7 @@ void FmPropBrw::impl_createPropertyBrowser_throw( FmFormShell* _pFormShell ) ::cppu::ContextEntry_Init( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ControlShapeAccess" ) ), makeAny( xControlMap ) ) }; m_xInspectorContext.set( - ::cppu::createComponentContext( aHandlerContextInfo, SAL_N_ELEMENTS( aHandlerContextInfo ), + ::cppu::createComponentContext( aHandlerContextInfo, sizeof( aHandlerContextInfo ) / sizeof( aHandlerContextInfo[0] ), xOwnContext ) ); bool bEnableHelpSection = lcl_shouldEnableHelpSection( m_xORB ); diff --git a/svx/source/form/fmdmod.cxx b/svx/source/form/fmdmod.cxx index 13882b6268bb..b6fd672233f2 100644 --- a/svx/source/form/fmdmod.cxx +++ b/svx/source/form/fmdmod.cxx @@ -86,7 +86,7 @@ using namespace ::svxform; FM_SUN_COMPONENT_IMAGECONTROL }; - static const sal_uInt16 nSvxComponentServiceNameListCount = SAL_N_ELEMENTS(aSvxComponentServiceNameList); + static const sal_uInt16 nSvxComponentServiceNameListCount = sizeof(aSvxComponentServiceNameList) / sizeof ( aSvxComponentServiceNameList[0] ); ::com::sun::star::uno::Sequence< ::rtl::OUString > aSeq( nSvxComponentServiceNameListCount ); ::rtl::OUString* pStrings = aSeq.getArray(); diff --git a/svx/source/form/fmpage.cxx b/svx/source/form/fmpage.cxx index 7b251b0568db..b6cc1fee03d5 100644 --- a/svx/source/form/fmpage.cxx +++ b/svx/source/form/fmpage.cxx @@ -201,7 +201,7 @@ sal_Bool FmFormPage::RequestHelp( Window* pWindow, SdrView* pView, INET_PROT_HTTPS, INET_PROT_JAVASCRIPT, INET_PROT_IMAP, INET_PROT_POP3, INET_PROT_VIM, INET_PROT_LDAP }; - for (sal_uInt16 i=0; i < SAL_N_ELEMENTS(s_aQuickHelpSupported); ++i) + for (sal_uInt16 i=0; i<sizeof(s_aQuickHelpSupported)/sizeof(s_aQuickHelpSupported[0]); ++i) if (s_aQuickHelpSupported[i] == aProtocol) { aHelpText = INetURLObject::decode(aUrl.GetURLNoPass(), '%', INetURLObject::DECODE_UNAMBIGUOUS); 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 ); } diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx index 9c8d9658fb22..72834cee1fd4 100644 --- a/svx/source/form/fmundo.cxx +++ b/svx/source/form/fmundo.cxx @@ -571,8 +571,8 @@ void SAL_CALL FmXUndoEnvironment::propertyChange(const PropertyChangeEvent& evt) FM_PROP_TEXT, FM_PROP_STATE, FM_PROP_DATE, FM_PROP_TIME, FM_PROP_VALUE, FM_PROP_SELECT_SEQ, FM_PROP_EFFECTIVE_VALUE }; - sal_Int32 nDefaultValueProps = SAL_N_ELEMENTS(pDefaultValueProperties); - OSL_ENSURE(SAL_N_ELEMENTS(aValueProperties) == nDefaultValueProps, + sal_Int32 nDefaultValueProps = sizeof(pDefaultValueProperties)/sizeof(pDefaultValueProperties[0]); + OSL_ENSURE(sizeof(aValueProperties)/sizeof(aValueProperties[0]) == nDefaultValueProps, "FmXUndoEnvironment::propertyChange: inconsistence!"); for (sal_Int32 i=0; i<nDefaultValueProps; ++i) { diff --git a/svx/source/form/formcontrolling.cxx b/svx/source/form/formcontrolling.cxx index 35e87b547ce1..b3ed12601c6b 100644 --- a/svx/source/form/formcontrolling.cxx +++ b/svx/source/form/formcontrolling.cxx @@ -120,7 +120,7 @@ namespace svx { FMURL_FORM_APPLY_FILTER, SID_FM_FORM_FILTERED, FormFeature::ToggleApplyFilter }, { FMURL_FORM_REMOVE_FILTER, SID_FM_REMOVE_FILTER_SORT, FormFeature::RemoveFilterAndSort } }; - for ( size_t i=0; i < SAL_N_ELEMENTS(aDescriptions); ++i ) + for ( size_t i=0; i<sizeof(aDescriptions)/sizeof(aDescriptions[0]); ++i ) s_aFeatureDescriptions.push_back( aDescriptions[i] ); } }; @@ -468,7 +468,7 @@ namespace svx SID_FM_FILTER_START, SID_FM_VIEW_AS_GRID }; - sal_Int32 nFeatureCount = SAL_N_ELEMENTS( pSupportedFeatures ); + sal_Int32 nFeatureCount = sizeof( pSupportedFeatures ) / sizeof( pSupportedFeatures[ 0 ] ); aSupportedFeatures.resize( nFeatureCount ); ::std::copy( pSupportedFeatures, pSupportedFeatures + nFeatureCount, aSupportedFeatures.begin() ); diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx index c46967269c38..41a813c48757 100644 --- a/svx/source/unodraw/unoprov.cxx +++ b/svx/source/unodraw/unoprov.cxx @@ -880,7 +880,7 @@ namespace { { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DExtrudeObject"), E3D_EXTRUDEOBJ_ID | E3D_INVENTOR_FLAG }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DPolygonObject"), E3D_POLYGONOBJ_ID | E3D_INVENTOR_FLAG }, }; - for (sal_uInt32 i = 0; i < SAL_N_ELEMENTS(aInit); i++) + for (sal_uInt32 i = 0; i < sizeof(aInit)/sizeof(aInit[0]); i++) aImpl[rtl::OUString( aInit[i].name, aInit[i].length, RTL_TEXTENCODING_ASCII_US ) ] = aInit[i].id; bInited = true; } diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx index dac1972dfeb1..68d9edefdf96 100644 --- a/svx/source/xml/xmlgrhlp.cxx +++ b/svx/source/xml/xmlgrhlp.cxx @@ -543,7 +543,7 @@ String SvXMLGraphicHelper::ImplGetGraphicMimeType( const String& rFileName ) con const rtl::OString aExt(rtl::OUStringToOString(rFileName.Copy(rFileName.Len() - 3), RTL_TEXTENCODING_ASCII_US)); - for( long i = 0, nCount = SAL_N_ELEMENTS( aMapper ); ( i < nCount ) && !aMimeType.Len(); i++ ) + for( long i = 0, nCount = sizeof (aMapper) / sizeof (aMapper[0]); ( i < nCount ) && !aMimeType.Len(); i++ ) if( aExt.getStr() == aMapper[ i ].pExt ) aMimeType = String( aMapper[ i ].pMimeType, RTL_TEXTENCODING_ASCII_US ); } |