[Libreoffice-commits] core.git: svx/source
Carlos Luque
josecarlos.ruizluque at cib.de
Fri Jul 17 14:26:39 PDT 2015
svx/source/xml/xmlgrhlp.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 342c4b21e6acbb7b2e7fc7133549a14323b6c771
Author: Carlos Luque <josecarlos.ruizluque at cib.de>
Date: Fri Jul 17 16:19:25 2015 +0200
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 at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index b193887..31565b6 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 );
}
More information about the Libreoffice-commits
mailing list