diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2016-03-29 10:25:17 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-03-31 11:30:36 +0200 |
commit | 6439005484bdf6754b910b1ce025b3fb33b6623f (patch) | |
tree | 1a00f48ae11d3da3d928f2d3d68b3e299216328c /fpicker | |
parent | 1aa4df615fa5599d05e9dd5e925b5852676185fa (diff) |
use SAL_N_ELEMENTS more widely
found using
git grep -n 'sizeof.*/.*sizeof.*[0]'
Change-Id: Icd4a6cc1ca8ec8ebd68e1701a02789c74cf0eb2a
Diffstat (limited to 'fpicker')
-rw-r--r-- | fpicker/source/office/OfficeControlAccess.cxx | 4 | ||||
-rw-r--r-- | fpicker/source/win32/filepicker/controlaccess.cxx | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/fpicker/source/office/OfficeControlAccess.cxx b/fpicker/source/office/OfficeControlAccess.cxx index e2ebc2777c53..c373cc93dca9 100644 --- a/fpicker/source/office/OfficeControlAccess.cxx +++ b/fpicker/source/office/OfficeControlAccess.cxx @@ -106,7 +106,7 @@ namespace svt }; - static const sal_Int32 s_nControlCount = sizeof( aDescriptions ) / sizeof( aDescriptions[0] ); + static const sal_Int32 s_nControlCount = SAL_N_ELEMENTS( aDescriptions ); static ControlDescIterator s_pControls = aDescriptions; static ControlDescIterator s_pControlsEnd = aDescriptions + s_nControlCount; @@ -142,7 +142,7 @@ namespace svt }; - static const int s_nPropertyCount = sizeof( aProperties ) / sizeof( aProperties[0] ); + static const int s_nPropertyCount = SAL_N_ELEMENTS( aProperties ); static ControlPropertyIterator s_pProperties = aProperties; static ControlPropertyIterator s_pPropertiesEnd = aProperties + s_nPropertyCount; diff --git a/fpicker/source/win32/filepicker/controlaccess.cxx b/fpicker/source/win32/filepicker/controlaccess.cxx index 4dc8950566d1..51dbbdd7f001 100644 --- a/fpicker/source/win32/filepicker/controlaccess.cxx +++ b/fpicker/source/win32/filepicker/controlaccess.cxx @@ -143,7 +143,7 @@ namespace // private return CtrlClassGetValueFunctionTable[aCtrlClass]; } - int WindowsFileOpenCtrlIds[] = + const int WindowsFileOpenCtrlIds[] = { 0, IDOK, // PUSHBUTTON_OK @@ -154,8 +154,7 @@ namespace // private stc2, // LISTBOX_FILTER_LABEL stc3 // LISTBOX_FILE_NAME_LABEL }; - const int SIZE_WINDOWS_FILEOPEN_CTRL_IDS = - sizeof(WindowsFileOpenCtrlIds)/sizeof(WindowsFileOpenCtrlIds[0]); + const int SIZE_WINDOWS_FILEOPEN_CTRL_IDS = SAL_N_ELEMENTS(WindowsFileOpenCtrlIds); }; // end namespace |