<br><br><div class="gmail_quote">On Sat, Oct 9, 2010 at 11:03 AM, Kayo Hamid <span dir="ltr"><<a href="mailto:revol.code@yahoo.com">revol.code@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font: inherit;" valign="top"><div>I'm sending my patchs for review, can anyone see and reply back if it is ok or not? I do not known if it is correct ;-)</div>
<div><div><br></div></div><div>revol_</div></td></tr></tbody></table><br>
<br></blockquote><div><br>Hi revol_<br><br>Thanks for the patch.<br><br>One remark. You want to use the macro SAL_N_ELEMENTS, not define your own ELEMENTS_OF_ARRAY in every sources.<br><br>for example<br>--- a/starmath/source/cfgitem.cxx<br>
+++ b/starmath/source/cfgitem.cxx<br>@@ -47,6 +47,7 @@ static const char* aRootName = "Office.Math";<br> <br> #define SYMBOL_LIST "SymbolList"<br> #define FONT_FORMAT_LIST "FontFormatList"<br>
+#define ELEMENTS_OF_ARRAY(arr) (sizeof(arr)/(sizeof((arr)[0])))<br> <br> SV_IMPL_OBJARR( SmFntFmtListEntryArr, SmFntFmtListEntry );<br> <br>@@ -184,14 +185,14 @@ static Sequence< OUString > lcl_GetPropertyNames(<br>
<br> static Sequence< OUString > GetFormatPropertyNames()<br> {<br>- USHORT nCnt = sizeof(aFormatPropNames) / sizeof(aFormatPropNames[0]);<br>+ USHORT nCnt = ELEMENTS_OF_ARRAY(aFormatPropNames);<br> return lcl_GetPropertyNames( aFormatPropNames, nCnt );<br>
}<br> <br> <br> static Sequence< OUString > GetOtherPropertyNames()<br> {<br>- USHORT nCnt = sizeof(aMathPropNames) / sizeof(aMathPropNames[0]);<br>+ USHORT nCnt = ELEMENTS_OF_ARRAY(aMathPropNames);<br> return lcl_GetPropertyNames( aMathPropNames, nCnt );<br>
}<br><br>should read something like<br><br><br>--- a/starmath/source/cfgitem.cxx<br>+++ b/starmath/source/cfgitem.cxx <br>@@ -184,14 +185,14 @@ static Sequence< OUString > lcl_GetPropertyNames(<br>
<br> static Sequence< OUString > GetFormatPropertyNames()<br> {<br>- USHORT nCnt = sizeof(aFormatPropNames) / sizeof(aFormatPropNames[0]);<br>+ USHORT nCnt = SAL_N_ELEMENTS(aFormatPropNames);<br> return lcl_GetPropertyNames( aFormatPropNames, nCnt );<br>
}<br> <br> <br> static Sequence< OUString > GetOtherPropertyNames()<br> {<br>- USHORT nCnt = sizeof(aMathPropNames) / sizeof(aMathPropNames[0]);<br>+ USHORT nCnt = SAL_N_ELEMENTS(aMathPropNames);<br> return lcl_GetPropertyNames( aMathPropNames, nCnt );<br>
}<br><br>Other than that, it looks good.<br><br>Norbert<br><br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">_______________________________________________<br>
LibreOffice mailing list<br>
<a href="mailto:LibreOffice@lists.freedesktop.org">LibreOffice@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/libreoffice" target="_blank">http://lists.freedesktop.org/mailman/listinfo/libreoffice</a><br>
<br></blockquote></div><br>