diff options
Diffstat (limited to 'linguistic/source')
-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 |
4 files changed, 6 insertions, 6 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; |