From 342c4b21e6acbb7b2e7fc7133549a14323b6c771 Mon Sep 17 00:00:00 2001 From: Carlos Luque Date: Fri, 17 Jul 2015 16:19:25 +0200 Subject: 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/17168 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens --- svx/source/xml/xmlgrhlp.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx index b193887bc402..31565b640a12 100644 --- a/svx/source/xml/xmlgrhlp.cxx +++ b/svx/source/xml/xmlgrhlp.cxx @@ -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 ); } -- cgit