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 | 8279868bb177cdfc07f3eeed380412616e4958db (patch) | |
tree | 5f138b0608affff85602ab4dabc641651508fb72 /uui | |
parent | 939cd5666cb104ccaad67863258f9a67bb01434b (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 52155d53a9..0b346dfcef 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 53b05dceb7..63f3039da6 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 940ac37f0d..243ebbfbe6 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 218c361bdd..eb1269883f 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; |