Kaydet (Commit) 342c4b21 authored tarafından Carlos Luque's avatar Carlos Luque Kaydeden (comit) Thorsten Behrens

cleanup: use SAL_N_ELEMENTS for array size

To be consistent across code  in the calculation
of the number of elements of an array.

Change-Id: Iff73e570231caccdece3cf0e925d58bc0925ccc2
Reviewed-on: https://gerrit.libreoffice.org/17168Reviewed-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
üst aba93021
......@@ -485,7 +485,7 @@ OUString SvXMLGraphicHelper::ImplGetGraphicMimeType( const OUString& rFileName )
const OString aExt(OUStringToOString(rFileName.copy(rFileName.getLength() - 3),
RTL_TEXTENCODING_ASCII_US));
for( long i = 0, nCount = sizeof (aMapper) / sizeof (aMapper[0]); ( i < nCount ) && aMimeType.isEmpty(); i++ )
for( long i = 0, nCount = SAL_N_ELEMENTS(aMapper); ( i < nCount ) && aMimeType.isEmpty(); ++i )
if( strcmp(aExt.getStr(), aMapper[ i ].pExt) == 0 )
aMimeType = OUString( aMapper[ i ].pMimeType, strlen( aMapper[ i ].pMimeType ), RTL_TEXTENCODING_ASCII_US );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment