diff options
author | Kayo Hamid <revol.code@yahoo.com> | 2010-10-14 21:14:52 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2010-10-14 21:15:24 +0100 |
commit | b7c82daa28526c566047e158ab2ace522fc442dc (patch) | |
tree | c71f33ee622add8de9013a170a7463ed564ad6e8 /uui | |
parent | 1b0c6da1c3bcc6a9c1412d221d029885f9998fa1 (diff) |
Switch to use SAL_N_ELEMENTS macro, everywhere
Diffstat (limited to 'uui')
-rw-r--r-- | uui/source/masterpasscrtdlg.cxx | 6 | ||||
-rw-r--r-- | uui/source/passcrtdlg.cxx | 2 | ||||
-rw-r--r-- | uui/source/passworddlg.cxx | 2 | ||||
-rw-r--r-- | uui/source/secmacrowarnings.cxx | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/uui/source/masterpasscrtdlg.cxx b/uui/source/masterpasscrtdlg.cxx index 9d027f89ffbc..c96e319fb5fe 100644 --- a/uui/source/masterpasscrtdlg.cxx +++ b/uui/source/masterpasscrtdlg.cxx @@ -126,7 +126,7 @@ MasterPasswordCreateDialog::MasterPasswordCreateDialog aFTMasterPasswordWarning.SetPosSizePixel( aFTMasterPasswordWarning.GetPosPixel(), aNewWarningSize ); Window* pControls[] = { &aFL, &aOKBtn, &aCancelBtn, &aHelpBtn }; - const sal_Int32 nCCount = sizeof( pControls ) / sizeof( pControls[0] ); + const sal_Int32 nCCount = SAL_N_ELEMENTS( pControls ); for ( int i = 0; i < nCCount; ++i ) { Point aNewPos =(*pControls[i]).GetPosPixel(); @@ -149,7 +149,7 @@ void MasterPasswordCreateDialog::CalculateTextHeight() &aFTMasterPasswordRepeat, &aEDMasterPasswordRepeat, &aFTCautionText, &aFLCautionText, &aOKBtn, &aCancelBtn, &aHelpBtn }; Window** pWindow = pWins; - const sal_Int32 nCount = sizeof( pWins ) / sizeof( pWins[0] ); + const sal_Int32 nCount = SAL_N_ELEMENTS( pWins ); for ( sal_Int32 i = 0; i < nCount; ++i, ++pWindow ) { Point aNewPos = (*pWindow)->GetPosPixel(); @@ -168,7 +168,7 @@ void MasterPasswordCreateDialog::CalculateTextHeight() nDelta += nTemp; Window* pWins[] = { &aFLCautionText, &aOKBtn, &aCancelBtn, &aHelpBtn }; Window** pWindow = pWins; - const sal_Int32 nCount = sizeof( pWins ) / sizeof( pWins[0] ); + const sal_Int32 nCount = SAL_N_ELEMENTS( pWins ); for ( sal_Int32 i = 0; i < nCount; ++i, ++pWindow ) { Point aNewPos = (*pWindow)->GetPosPixel(); diff --git a/uui/source/passcrtdlg.cxx b/uui/source/passcrtdlg.cxx index 843d3bf15263..77b14f3bf38f 100644 --- a/uui/source/passcrtdlg.cxx +++ b/uui/source/passcrtdlg.cxx @@ -115,7 +115,7 @@ PasswordCreateDialog::PasswordCreateDialog( Window* _pParent, ResMgr * pResMgr, aFTWarning.SetPosSizePixel( aFTWarning.GetPosPixel(), aNewWarningSize ); Window* pControls[] = { &aFixedLine1, &aOKBtn, &aCancelBtn, &aHelpBtn }; - const sal_Int32 nCCount = sizeof( pControls ) / sizeof( pControls[0] ); + const sal_Int32 nCCount = SAL_N_ELEMENTS( pControls ); for ( int i = 0; i < nCCount; ++i ) { Point aNewPos =(*pControls[i]).GetPosPixel(); diff --git a/uui/source/passworddlg.cxx b/uui/source/passworddlg.cxx index 34d886ca2e26..bb81e612e086 100644 --- a/uui/source/passworddlg.cxx +++ b/uui/source/passworddlg.cxx @@ -103,7 +103,7 @@ PasswordDialog::PasswordDialog( aFTPassword.SetPosSizePixel( aFTPassword.GetPosPixel(), aNewLabelSize ); Window* pControls[] = { &aEDPassword, &aFixedLine1, &aOKBtn, &aCancelBtn, &aHelpBtn }; - const sal_Int32 nCCount = sizeof( pControls ) / sizeof( pControls[0] ); + const sal_Int32 nCCount = SAL_N_ELEMENTS( pControls ); for ( int i = 0; i < nCCount; ++i ) { Point aNewPos =(*pControls[i]).GetPosPixel(); diff --git a/uui/source/secmacrowarnings.cxx b/uui/source/secmacrowarnings.cxx index e384dc7dfabc..6447cc20526e 100644 --- a/uui/source/secmacrowarnings.cxx +++ b/uui/source/secmacrowarnings.cxx @@ -225,7 +225,7 @@ void MacroWarning::InitControls() &maBottomSepFL, &maEnableBtn, &maDisableBtn, &maHelpBtn }; 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; @@ -323,7 +323,7 @@ void MacroWarning::FitControls() &maDescr2FI, &maAlwaysTrustCB, &maBottomSepFL, &maEnableBtn, &maDisableBtn, &maHelpBtn }; 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; |