diff options
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/appl/shutdowniconw32.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/alienwarn.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/printopt.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/view/frmload.cxx | 2 |
4 files changed, 5 insertions, 7 deletions
diff --git a/sfx2/source/appl/shutdowniconw32.cxx b/sfx2/source/appl/shutdowniconw32.cxx index 1e5bf369a6a9..6aa9ea0b1a7b 100644 --- a/sfx2/source/appl/shutdowniconw32.cxx +++ b/sfx2/source/appl/shutdowniconw32.cxx @@ -251,7 +251,7 @@ static HMENU createSystrayMenu( ) OUString aEmpty; // insert the menu entries for launching the applications - for ( size_t i = 0; i < sizeof( aMenuItems ) / sizeof( aMenuItems[0] ); ++i ) + for ( size_t i = 0; i < SAL_N_ELEMENTS( aMenuItems ); ++i ) { if ( !aModuleOptions.IsModuleInstalled( aMenuItems[i].eModuleIdentifier ) ) // the complete application is not even installed diff --git a/sfx2/source/dialog/alienwarn.cxx b/sfx2/source/dialog/alienwarn.cxx index 571a056f3070..09aebb25949e 100644 --- a/sfx2/source/dialog/alienwarn.cxx +++ b/sfx2/source/dialog/alienwarn.cxx @@ -144,7 +144,7 @@ void SfxAlienWarningDialog::InitSize() &m_aSaveODFBtn, &m_aKeepCurrentBtn, &m_aMoreInfoBtn, &m_aOptionLine, &m_aWarningOnBox }; Window** pCurrent = pWins; - for ( sal_uInt32 i = 0; i < sizeof( pWins ) / sizeof( pWins[ 0 ] ); ++i, ++pCurrent ) + for ( sal_uInt32 i = 0; i < SAL_N_ELEMENTS( pWins ); ++i, ++pCurrent ) { Point aNewPos = (*pCurrent)->GetPosPixel(); aNewPos.Y() -= nDelta; diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx index 45a3aa287ddc..7e3a2e8b02dd 100644 --- a/sfx2/source/dialog/printopt.cxx +++ b/sfx2/source/dialog/printopt.cxx @@ -44,8 +44,6 @@ static USHORT aDPIArray[] = { 72, 96, 150, 200, 300, 600 }; static BOOL bOutputForPrinter = TRUE; -#define DPI_COUNT (sizeof(aDPIArray)/sizeof(aDPIArray[0 ])) - SfxCommonPrintOptionsTabPage::SfxCommonPrintOptionsTabPage( Window* pParent, const SfxItemSet& rSet ) : SfxTabPage( pParent, SfxResId( TP_COMMONPRINTOPTIONS ), rSet ), @@ -233,7 +231,7 @@ void SfxCommonPrintOptionsTabPage::ImplUpdateControls( const PrinterOptions* pCu aReduceBitmapsResolutionLB.SelectEntryPos( 0 ); else { - for( long i = ( DPI_COUNT - 1 ); i >= 0; i-- ) + for( long i = ( SAL_N_ELEMENTS(aDPIArray) - 1 ); i >= 0; i-- ) { if( nDPI >= aDPIArray[ i ] ) { @@ -362,7 +360,7 @@ void SfxCommonPrintOptionsTabPage::ImplSaveControls( PrinterOptions* pCurrentOpt pCurrentOptions->SetReducedBitmapMode( aReduceBitmapsOptimalRB.IsChecked() ? PRINTER_BITMAP_OPTIMAL : ( aReduceBitmapsNormalRB.IsChecked() ? PRINTER_BITMAP_NORMAL : PRINTER_BITMAP_RESOLUTION ) ); pCurrentOptions->SetReducedBitmapResolution( aDPIArray[ Min( (USHORT) aReduceBitmapsResolutionLB.GetSelectEntryPos(), - (USHORT)( sizeof( aDPIArray ) / sizeof( aDPIArray[ 0 ] ) - 1 ) ) ] ); + (USHORT)( SAL_N_ELEMENTS( aDPIArray ) - 1 ) ) ] ); pCurrentOptions->SetReducedBitmapIncludesTransparency( aReduceBitmapsTransparencyCB.IsChecked() ); pCurrentOptions->SetConvertToGreyscales( aConvertToGreyscalesCB.IsChecked() ); } diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx index 51d3e06f5922..4c810bda1fbc 100644 --- a/sfx2/source/view/frmload.cxx +++ b/sfx2/source/view/frmload.cxx @@ -459,7 +459,7 @@ void SfxFrameLoader_Impl::impl_removeLoaderArguments( ::comphelper::NamedValueCo }; ::comphelper::NamedValueCollection aViewArgs; - for ( size_t i=0; i < sizeof( pKnownViewArgs ) / sizeof( pKnownViewArgs[0] ); ++i ) + for ( size_t i=0; i < SAL_N_ELEMENTS( pKnownViewArgs ); ++i ) { if ( io_rDescriptor.has( pKnownViewArgs[i] ) ) { |