On Aug 28, 2011, at 2:12 PM, Mohammad Elahi wrote:
static sal_Unicode *table_PersianWord_decade1[]={
(sal_Unicode[]){0}, // 0
(sal_Unicode[]){0x06cc, 0x06a9, 0}, // 1
…
};
is not valid C++03 (and neither is Eike's version using the ArrUnicode typedef). To be standards
conform (and hence maximally portable) would require the more verbose
OK. But it is too verbose ;)
Any other solution? what about the following:
static sal_Unicode table_PersianWord_decade1[][MAX_LEN]={
{0}, // 0
{0x06cc, 0x06a9, 0}, // 1
...
};
Although it uses more memory, but it is less vebose.
What's your opinion?
Should be OK, too (as the difference in lengths of the individual entries is not too large)---I
would make it an explicit "7" in such a case, though, instead of a #define MAX_LEN 7.
-Stephan
Context
- Re: [Libreoffice] [PATCH] Add numbering type in persian word. (continued)
Re: [Libreoffice] [PUSHED] Add numbering type in persian word. · Eike Rathke
Re: [Libreoffice] [PATCH] Add numbering type in persian word. · Stephan Bergmann
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.