diff options
Diffstat (limited to 'fpicker/source/office/iodlg.cxx')
-rw-r--r-- | fpicker/source/office/iodlg.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index da20643858ea..fe84c6937bcc 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -2571,7 +2571,7 @@ void SvtFileDialog::implArrangeControls() // loop through all these controls and adjust the z-order Window* pPreviousWin = NULL; Control** pCurrent = pControls; - for ( sal_Int32 i = 0; i < sal_Int32(sizeof( pControls ) / sizeof( pControls[ 0 ] )); ++i, ++pCurrent ) + for ( sal_Int32 i = 0; i < sal_Int32(SAL_N_ELEMENTS( pControls )); ++i, ++pCurrent ) { if ( !*pCurrent ) // this control is not available in the current operation mode -> skip @@ -2751,7 +2751,7 @@ void SvtFileDialog::Resize() _pPbPlay, _pImp->_pCbPassword, _pImp->_pCbAutoExtension, _pImp->_pCbOptions, _pCbSelection }; Control** ppMoveControls = aMoveControlsVert; - Control** ppMoveControlsEnd = ppMoveControls + sizeof( aMoveControlsVert ) / sizeof( aMoveControlsVert[0] ); + Control** ppMoveControlsEnd = ppMoveControls + SAL_N_ELEMENTS( aMoveControlsVert ); for ( ; ppMoveControls != ppMoveControlsEnd; ++ppMoveControls ) lcl_MoveControl( *ppMoveControls, 0, nDeltaY ); } @@ -2763,7 +2763,7 @@ void SvtFileDialog::Resize() _pImp->_pBtnFileOpen, _pImp->_pBtnCancel, _pImp->_pBtnHelp }; Control** ppMoveControls = aMoveControlsBoth; - Control** ppMoveControlsEnd = ppMoveControls + sizeof( aMoveControlsBoth ) / sizeof( aMoveControlsBoth[0] ); + Control** ppMoveControlsEnd = ppMoveControls + SAL_N_ELEMENTS( aMoveControlsBoth ); for ( ; ppMoveControls != ppMoveControlsEnd; ++ppMoveControls ) lcl_MoveControl( *ppMoveControls, nDeltaX, nDeltaY ); } @@ -2775,7 +2775,7 @@ void SvtFileDialog::Resize() _pImp->_pBtnUp, _pImp->_pBtnNewFolder, _pImp->_pBtnStandard }; Control** ppMoveControls = aMoveControlsHor; - Control** ppMoveControlsEnd = ppMoveControls + sizeof( aMoveControlsHor ) / sizeof( aMoveControlsHor[0] ); + Control** ppMoveControlsEnd = ppMoveControls + SAL_N_ELEMENTS( aMoveControlsHor ); for ( ; ppMoveControls != ppMoveControlsEnd; ++ppMoveControls ) lcl_MoveControl( *ppMoveControls, nDeltaX, 0 ); } @@ -2788,7 +2788,7 @@ void SvtFileDialog::Resize() _pImp->_pEdFileName, _pImp->_pLbFileVersion, _pImp->_pLbTemplates, _pImp->_pLbImageTemplates, _pImp->GetFilterListControl(), _pImp->_pFtCurrentPath, }; - sal_Int32 nSizeControls = sizeof( aSizeControls ) / sizeof( aSizeControls[0] ); + sal_Int32 nSizeControls = SAL_N_ELEMENTS( aSizeControls ); Control** ppSizeControls = aSizeControls; for ( sal_Int32 j=0; j<nSizeControls; ++j, ++ppSizeControls ) { |