[Libreoffice] [PATCH] SAL_N_ELEMENTS for writer, impress and calc

Norbert Thiebaud nthiebaud at gmail.com
Sat Oct 9 12:07:24 PDT 2010


On Sat, Oct 9, 2010 at 12:08 PM, Kayo Hamid <revol.code at yahoo.com> wrote:
>
>
> Hi Norbert, thank you. Can you explain for me where is this definition (SAL_N_ELEMENTS) that all theses sources share in common? My knowledge in C++ are few.

It is in
sal/inc/sal/macros.h:44:#    define SAL_N_ELEMENTS(arr)     (sizeof
(arr) / sizeof ((arr)[0]))

you can search for it using:

n_th at tpa10 ~/git/oo/ref (master)$ ./bin/g grep -n SAL_N_ELEMENTS | grep define
sal/inc/sal/macros.h:44:#    define SAL_N_ELEMENTS(arr)     (sizeof
(arr) / sizeof ((arr)[0]))


> New patchs attached.
>
> Hi revol_
>
> Thanks for the patch.
>
> One remark. You want to use the macro SAL_N_ELEMENTS, not define your own ELEMENTS_OF_ARRAY in every sources.
>
>
> _______________________________________________
> LibreOffice mailing list
> LibreOffice at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>


More information about the LibreOffice mailing list