summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2012-05-29 17:23:51 +0100
committerMichael Meeks <michael.meeks@suse.com>2012-05-29 18:03:34 +0100
commit6e6d81e9cfc593d865e409ad22b2307f87a37859 (patch)
tree4d578e5be2dfd3a403576d7c638f83f041d56911 /sfx2
parentb7c6716b4bc0742af4206035495d161e7eb49424 (diff)
targetted SAL_N_ELEMENTS reversion.
Change-Id: I30be93ccaeb1f9fd17cbe9e3ed3165e094810b2e
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/shutdowniconw32.cxx2
-rw-r--r--sfx2/source/dialog/alienwarn.cxx2
-rw-r--r--sfx2/source/dialog/printopt.cxx6
-rw-r--r--sfx2/source/view/frmload.cxx2
4 files changed, 7 insertions, 5 deletions
diff --git a/sfx2/source/appl/shutdowniconw32.cxx b/sfx2/source/appl/shutdowniconw32.cxx
index 294cefb0c9ff..a735f2eaf3a2 100644
--- a/sfx2/source/appl/shutdowniconw32.cxx
+++ b/sfx2/source/appl/shutdowniconw32.cxx
@@ -213,7 +213,7 @@ static HMENU createSystrayMenu( )
OUString aEmpty;
// insert the menu entries for launching the applications
- for ( size_t i = 0; i < SAL_N_ELEMENTS( aMenuItems ); ++i )
+ for ( size_t i = 0; i < sizeof( aMenuItems ) / sizeof( aMenuItems[0] ); ++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 1dfecd0fe96c..e9f7852669c5 100644
--- a/sfx2/source/dialog/alienwarn.cxx
+++ b/sfx2/source/dialog/alienwarn.cxx
@@ -153,7 +153,7 @@ void SfxAlienWarningDialog::InitSize()
&m_aSaveODFBtn, &m_aKeepCurrentBtn, &m_aMoreInfoBtn, &m_aOptionLine, &m_aWarningOnBox
};
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 aNewPos = (*pCurrent)->GetPosPixel();
aNewPos.Y() -= nDelta;
diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx
index 45bbdbb161ac..2df1151feea1 100644
--- a/sfx2/source/dialog/printopt.cxx
+++ b/sfx2/source/dialog/printopt.cxx
@@ -43,6 +43,8 @@
static sal_uInt16 aDPIArray[] = { 72, 96, 150, 200, 300, 600 };
static sal_Bool bOutputForPrinter = sal_True;
+#define DPI_COUNT (sizeof(aDPIArray)/sizeof(aDPIArray[0 ]))
+
SfxCommonPrintOptionsTabPage::SfxCommonPrintOptionsTabPage( Window* pParent, const SfxItemSet& rSet ) :
SfxTabPage( pParent, SfxResId( TP_COMMONPRINTOPTIONS ), rSet ),
@@ -230,7 +232,7 @@ void SfxCommonPrintOptionsTabPage::ImplUpdateControls( const PrinterOptions* pCu
aReduceBitmapsResolutionLB.SelectEntryPos( 0 );
else
{
- for( long i = ( SAL_N_ELEMENTS(aDPIArray) - 1 ); i >= 0; i-- )
+ for( long i = ( DPI_COUNT - 1 ); i >= 0; i-- )
{
if( nDPI >= aDPIArray[ i ] )
{
@@ -359,7 +361,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( (sal_uInt16) aReduceBitmapsResolutionLB.GetSelectEntryPos(),
- (sal_uInt16)( SAL_N_ELEMENTS( aDPIArray ) - 1 ) ) ] );
+ (sal_uInt16)( (sizeof (aDPIArray) / sizeof (aDPIArray[0])) - 1 ) ) ] );
pCurrentOptions->SetReducedBitmapIncludesTransparency( aReduceBitmapsTransparencyCB.IsChecked() );
pCurrentOptions->SetConvertToGreyscales( aConvertToGreyscalesCB.IsChecked() );
}
diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx
index c8f7f271868f..200de3942c84 100644
--- a/sfx2/source/view/frmload.cxx
+++ b/sfx2/source/view/frmload.cxx
@@ -438,7 +438,7 @@ void SfxFrameLoader_Impl::impl_removeLoaderArguments( ::comphelper::NamedValueCo
};
::comphelper::NamedValueCollection aViewArgs;
- for ( size_t i=0; i < SAL_N_ELEMENTS( pKnownViewArgs ); ++i )
+ for ( size_t i=0; i < sizeof( pKnownViewArgs ) / sizeof( pKnownViewArgs[0] ); ++i )
{
if ( io_rDescriptor.has( pKnownViewArgs[i] ) )
{