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 /linguistic | |
parent | 1b0c6da1c3bcc6a9c1412d221d029885f9998fa1 (diff) |
Switch to use SAL_N_ELEMENTS macro, everywhere
Diffstat (limited to 'linguistic')
-rw-r--r-- | linguistic/source/gciterator.cxx | 2 | ||||
-rw-r--r-- | linguistic/source/lngopt.cxx | 2 | ||||
-rw-r--r-- | linguistic/source/lngprophelp.cxx | 6 | ||||
-rw-r--r-- | linguistic/source/misc.cxx | 2 | ||||
-rw-r--r-- | linguistic/workben/sprophelp.cxx | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx index 866a92b22bd6..ba1ce29e2337 100644 --- a/linguistic/source/gciterator.cxx +++ b/linguistic/source/gciterator.cxx @@ -138,7 +138,7 @@ static sal_Unicode aWhiteSpaces[] = 0xfffb /* INTERLINEAR ANNOTATION TERMINATOR */ }; -static int nWhiteSpaces = sizeof( aWhiteSpaces ) / sizeof( aWhiteSpaces[0] ); +static int nWhiteSpaces = SAL_N_ELEMENTS( aWhiteSpaces ); static bool lcl_IsWhiteSpace( sal_Unicode cChar ) { diff --git a/linguistic/source/lngopt.cxx b/linguistic/source/lngopt.cxx index d70aec887eab..1f9a63071795 100644 --- a/linguistic/source/lngopt.cxx +++ b/linguistic/source/lngopt.cxx @@ -298,7 +298,7 @@ OUString LinguOptions::GetName( INT32 nWID ) OUString aRes; - INT32 nLen = sizeof( aWID_Name ) / sizeof( aWID_Name[0] ); + INT32 nLen = SAL_N_ELEMENTS( aWID_Name ); if (0 <= nWID && nWID < nLen && aWID_Name[ nWID ].nWID == nWID) { diff --git a/linguistic/source/lngprophelp.cxx b/linguistic/source/lngprophelp.cxx index 37d4d86198b0..7a13b36b1f71 100644 --- a/linguistic/source/lngprophelp.cxx +++ b/linguistic/source/lngprophelp.cxx @@ -64,7 +64,7 @@ static const char *aCH[] = UPN_IS_USE_DICTIONARY_LIST, }; -static int nCHCount = sizeof(aCH) / sizeof(aCH[0]); +static int nCHCount = SAL_N_ELEMENTS(aCH); PropertyChgHelper::PropertyChgHelper( @@ -389,7 +389,7 @@ PropertyHelper_Spell::PropertyHelper_Spell( Reference< XPropertySet > &rxPropSet ) : PropertyChgHelper ( rxSource, rxPropSet, AE_SPELLCHECKER ) { - AddPropNames( aSP, sizeof(aSP) / sizeof(aSP[0]) ); + AddPropNames( aSP, SAL_N_ELEMENTS(aSP)); SetDefaultValues(); GetCurrentValues(); @@ -577,7 +577,7 @@ PropertyHelper_Hyphen::PropertyHelper_Hyphen( Reference< XPropertySet > &rxPropSet ) : PropertyChgHelper ( rxSource, rxPropSet, AE_HYPHENATOR ) { - AddPropNames( aHP, sizeof(aHP) / sizeof(aHP[0]) ); + AddPropNames( aHP, SAL_N_ELEMENTS(aHP)); SetDefaultValues(); GetCurrentValues(); } diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx index 8991095369f0..0568fab4bdfe 100644 --- a/linguistic/source/misc.cxx +++ b/linguistic/source/misc.cxx @@ -836,7 +836,7 @@ static const sal_uInt32 the_aDigitZeroes [] = BOOL HasDigits( const OUString &rText ) { - static const int nNumDigitZeroes = sizeof(the_aDigitZeroes) / sizeof(the_aDigitZeroes[0]); + static const int nNumDigitZeroes = SAL_N_ELEMENTS(the_aDigitZeroes); const sal_Int32 nLen = rText.getLength(); sal_Int32 i = 0; diff --git a/linguistic/workben/sprophelp.cxx b/linguistic/workben/sprophelp.cxx index ced3e205dc96..d2ac04abb714 100644 --- a/linguistic/workben/sprophelp.cxx +++ b/linguistic/workben/sprophelp.cxx @@ -193,7 +193,7 @@ static const char *aSP[] = PropertyHelper_Spell::PropertyHelper_Spell( const Reference< XInterface > & rxSource, Reference< XPropertySet > &rxPropSet ) : - PropertyChgHelper ( rxSource, rxPropSet, aSP, sizeof(aSP) / sizeof(aSP[0]) ) + PropertyChgHelper ( rxSource, rxPropSet, aSP, SAL_N_ELEMENTS(aSP)) { SetDefault(); INT32 nLen = GetPropNames().getLength(); |