Bugzilla – Attachment 138620 Details for
Bug 114622
add static list of available Native Numbering entries, for example Persian / Arabic-Indic / Hindi numbers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Add Numbering entries in Arabic, Presian & Hindi patch
static_list_numbering.patch (text/plain), 4.87 KB, created by
Suhail Alkowaileet
on 2017-12-24 03:50:41 UTC
(
hide
)
Description:
Add Numbering entries in Arabic, Presian & Hindi patch
Filename:
MIME Type:
Creator:
Suhail Alkowaileet
Created:
2017-12-24 03:50:41 UTC
Size:
4.87 KB
patch
obsolete
>diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx >index 7eef17dddd1a..e9f584a617cd 100644 >--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx >+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx >@@ -51,6 +51,21 @@ > #define S_HE_YOD "\xD7\x99" > #define S_HE_QOF "\xD7\xA7" > >+//Arabic-Indic >+#define S_AR_ONE "\xd9\xa1" >+#define S_AR_TWO "\xd9\xa2" >+#define S_AR_THREE "\xd9\xa3" >+ >+// East Arabic-Indic >+#define S_FA_ONE "\xDB\xB1" >+#define S_FA_TWO "\xDB\xB2" >+#define S_FA_THREE "\xDB\xB3" >+ >+// Indic Devanagari >+#define S_HI_ONE "\xDB\xB1" >+#define S_HI_TWO "\xDB\xB2" >+#define S_HI_THREE "\xDB\xB3" >+ > #include <math.h> > #include <sal/macros.h> > #include <rtl/ustring.hxx> >@@ -751,6 +766,18 @@ DefaultNumberingProvider::makeNumberingString( const Sequence<beans::PropertyVal > case CHARS_ARABIC_ABJAD: > lcl_formatChars(table_Alphabet_ar_abjad, SAL_N_ELEMENTS(table_Alphabet_ar_abjad), number - 1, result); > break; >+ case NUMBER_ARABIC_INDIC: >+ natNum = NativeNumberMode::NATNUM1; >+ locale.Language = "ar"; >+ break; >+ case NUMBER_EAST_ARABIC_INDIC: >+ natNum = NativeNumberMode::NATNUM1; >+ locale.Language = "fa"; >+ break; >+ case NUMBER_INDIC_DEVANAGARI: >+ natNum = NativeNumberMode::NATNUM1; >+ locale.Language = "hi"; >+ break; > case CHARS_THAI: > lcl_formatChars(table_Alphabet_th, SAL_N_ELEMENTS(table_Alphabet_th), number - 1, result); > break; >@@ -924,6 +951,9 @@ static const Supported_NumberingType aSupportedTypes[] = > {style::NumberingType::HANGUL_CIRCLED_SYLLABLE_KO, nullptr, LANG_CJK}, > {style::NumberingType::CHARS_ARABIC, nullptr, LANG_CTL}, > {style::NumberingType::CHARS_ARABIC_ABJAD, nullptr, LANG_CTL}, >+ {style::NumberingType::NUMBER_ARABIC_INDIC, S_AR_ONE ", " S_AR_TWO ", " S_AR_THREE ", ...", LANG_CTL}, >+ {style::NumberingType::NUMBER_EAST_ARABIC_INDIC, S_FA_ONE ", " S_FA_TWO ", " S_FA_THREE ", ...", LANG_CTL}, >+ {style::NumberingType::NUMBER_INDIC_DEVANAGARI, S_HI_ONE ", " S_HI_TWO ", " S_HI_THREE ", ...", LANG_CTL}, > {style::NumberingType::CHARS_THAI, nullptr, LANG_CTL}, > {style::NumberingType::CHARS_HEBREW, nullptr, LANG_CTL}, > {style::NumberingType::NUMBER_HEBREW, S_HE_ALEPH ", " S_HE_YOD ", " S_HE_QOF ", ...", LANG_CTL}, >diff --git a/offapi/com/sun/star/style/NumberingType.idl b/offapi/com/sun/star/style/NumberingType.idl >index 77b1a108e87b..c54339800224 100644 >--- a/offapi/com/sun/star/style/NumberingType.idl >+++ b/offapi/com/sun/star/style/NumberingType.idl >@@ -440,6 +440,24 @@ published constants NumberingType > */ > const short NUMBER_HEBREW = 56; > >+ /** Numbering in Arabic-Indic numerals >+ >+ @since LibreOffice 5.4 >+ */ >+ const short NUMBER_ARABIC_INDIC = 57; >+ >+ /** Numbering in Arabic-Indic numerals >+ >+ @since LibreOffice 5.4 >+ */ >+ const short NUMBER_EAST_ARABIC_INDIC = 58; >+ >+ /** Numbering in Arabic-Indic numerals >+ >+ @since LibreOffice 5.4 >+ */ >+ const short NUMBER_INDIC_DEVANAGARI = 59; >+ > }; > > >diff --git a/svx/inc/numberingtype.hrc b/svx/inc/numberingtype.hrc >index be21d6254a98..288993a69ab6 100644 >--- a/svx/inc/numberingtype.hrc >+++ b/svx/inc/numberingtype.hrc >@@ -52,8 +52,11 @@ const std::pair<const char*, int> RID_SVXSTRARY_NUMBERINGTYPE[] = > { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "а, б, .., аа, бб, ... (Serbian)") , 51 /* CHARS_CYRILLIC_LOWER_LETTER_N_SR */ }, > { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "Î, Î, Î, ... (Greek Upper Letter)"), 52 /* CHARS_GREEK_UPPER_LETTER */ }, > { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "α, β, γ, ... (Greek Lower Letter)"), 53 /* CHARS_GREEK_LOWER_LETTER */ }, >- { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "×...×, ××...×, ...") , 56 /* NUMBER_HEBREW */ }, >- { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "×...ת, ××...תת, ...") , 33 /* CHARS_HEBREW */ } >+ { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "×...×, ××...×, ...") , 56 /* NUMBER_HEBREW */ }, >+ { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "×...ת, ××...תת, ...") , 33 /* CHARS_HEBREW */ }, >+ { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "Ù¡, Ù¢, Ù£, Ù¤, ... (Arabic)"), 57 /* NUMBER_ARABIC_INDIC */ }, >+ { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "Û±, Û², Û³, Û´, ... (Persian)"), 58 /* NUMBER_EAST_ARABIC_INDIC */ }, >+ { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "१, २, ३, ..."), 59 /* NUMBER_INDIC_DEVANAGARI */ }, > }; > > #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 114622
:
138561
|
138562
|
138563
|
138564
| 138620