Date: prev next · Thread: first prev next last
2010 Archives by date, by thread · List index


On Sat, Oct 9, 2010 at 12:08 PM, Kayo Hamid <revol.code@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


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.