diff options
Diffstat (limited to 'svx/source/fmcomp')
-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 |
3 files changed, 10 insertions, 10 deletions
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); |