summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Luque <josecarlos.ruizluque@cib.de>2015-07-17 16:19:25 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2015-07-17 21:26:10 +0000
commit342c4b21e6acbb7b2e7fc7133549a14323b6c771 (patch)
tree8ffe5794665a5aa4550a382f465d741f50e454c8
parentaba930219c4c71fd4b8f13e2830a5955e71e3081 (diff)
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 <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r--svx/source/xml/xmlgrhlp.cxx2
1 files changed, 1 insertions, 1 deletions
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 );
}