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 /sd | |
parent | 1aa4df615fa5599d05e9dd5e925b5852676185fa (diff) |
use SAL_N_ELEMENTS more widely
found using
git grep -n 'sizeof.*/.*sizeof.*[0]'
Change-Id: Icd4a6cc1ca8ec8ebd68e1701a02789c74cf0eb2a
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/annotations/annotationmanager.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 24d0e68d1394..569469065e15 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -1041,7 +1041,7 @@ Color AnnotationManagerImpl::GetColor(sal_uInt16 aAuthorIndex) COL_AUTHOR4_NORMAL, COL_AUTHOR5_NORMAL, COL_AUTHOR6_NORMAL, COL_AUTHOR7_NORMAL, COL_AUTHOR8_NORMAL, COL_AUTHOR9_NORMAL }; - return Color( aArrayNormal[ aAuthorIndex % (sizeof( aArrayNormal )/ sizeof( aArrayNormal[0] ))]); + return Color( aArrayNormal[ aAuthorIndex % SAL_N_ELEMENTS( aArrayNormal ) ] ); } return Color(COL_WHITE); @@ -1056,7 +1056,7 @@ Color AnnotationManagerImpl::GetColorLight(sal_uInt16 aAuthorIndex) COL_AUTHOR4_LIGHT, COL_AUTHOR5_LIGHT, COL_AUTHOR6_LIGHT, COL_AUTHOR7_LIGHT, COL_AUTHOR8_LIGHT, COL_AUTHOR9_LIGHT }; - return Color( aArrayLight[ aAuthorIndex % (sizeof( aArrayLight )/ sizeof( aArrayLight[0] ))]); + return Color( aArrayLight[ aAuthorIndex % SAL_N_ELEMENTS( aArrayLight ) ] ); } return Color(COL_WHITE); @@ -1071,7 +1071,7 @@ Color AnnotationManagerImpl::GetColorDark(sal_uInt16 aAuthorIndex) COL_AUTHOR4_DARK, COL_AUTHOR5_DARK, COL_AUTHOR6_DARK, COL_AUTHOR7_DARK, COL_AUTHOR8_DARK, COL_AUTHOR9_DARK }; - return Color( aArrayAnkor[ aAuthorIndex % (sizeof( aArrayAnkor ) / sizeof( aArrayAnkor[0] ))]); + return Color( aArrayAnkor[ aAuthorIndex % SAL_N_ELEMENTS( aArrayAnkor ) ] ); } return Color(COL_WHITE); |