On Sat, Oct 9, 2010 at 12:08 PM, Kayo Hamid <revol.c...@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. > New patchs attached.
Thanks. looks good. I just removed a chunk in calc: --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -228,7 +228,7 @@ void dbg_call_generateMappingODFF() } fprintf( stdout, "addinfuncdata___:%s", "};\n"); fprintf( stdout, "%s", "\n// static\nconst ScCompiler::AddInMap* ScCompiler::GetAddInMap()\n{\n return maAddInMap;\n}\n"); - fprintf( stdout, "%s", "\n// static\nsize_t ScCompiler::GetAddInMapCount()\n{\n return sizeof(maAddInMap)/sizeof(maAddInMap[0]);\n}\n"); + fprintf( stdout, "%s", "\n// static\nsize_t ScCompiler::GetAddInMapCount()\n{\n return SAL_N_ELEMENTS(maAddInMap);\n}\n"); fflush( stdout); } #endif // erGENERATEMAPPING since it is not clear if the recipient of that generated piece of code will now about SAL_N_ELEMENTS Commited. Thanks again. Norbert > > 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@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/libreoffice > _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice