summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx30
-rw-r--r--include/editeng/svxenum.hxx5
-rw-r--r--offapi/com/sun/star/style/NumberingType.idl18
-rw-r--r--svx/inc/numberingtype.hrc5
4 files changed, 56 insertions, 2 deletions
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/include/editeng/svxenum.hxx b/include/editeng/svxenum.hxx
index a2f844e9bdbe..b756aef96481 100644
--- a/include/editeng/svxenum.hxx
+++ b/include/editeng/svxenum.hxx
@@ -198,7 +198,10 @@ enum SvxNumType : sal_Int16
SVX_NUM_CHARS_GREEK_LOWER_LETTER = css::style::NumberingType::CHARS_GREEK_LOWER_LETTER,
SVX_NUM_CHARS_ARABIC_ABJAD = css::style::NumberingType::CHARS_ARABIC_ABJAD,
SVX_NUM_CHARS_PERSIAN_WORD = css::style::NumberingType::CHARS_PERSIAN_WORD,
- SVX_NUM_NUMBER_HEBREW = css::style::NumberingType::NUMBER_HEBREW
+ SVX_NUM_NUMBER_HEBREW = css::style::NumberingType::NUMBER_HEBREW,
+ SVX_NUM_NUMBER_ARABIC_INDIC = css::style::NumberingType::NUMBER_ARABIC_INDIC,
+ SVX_NUM_NUMBER_EAST_ARABIC_INDIC = css::style::NumberingType::NUMBER_EAST_ARABIC_INDIC,
+ SVX_NUM_NUMBER_INDIC_DEVANAGARI = css::style::NumberingType::NUMBER_INDIC_DEVANAGARI
};
#endif
diff --git a/offapi/com/sun/star/style/NumberingType.idl b/offapi/com/sun/star/style/NumberingType.idl
index 77b1a108e87b..be4bb6bc2758 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 6.1
+ */
+ const short NUMBER_ARABIC_INDIC = 57;
+
+ /** Numbering in East Arabic-Indic numerals
+
+ @since LibreOffice 6.1
+ */
+ const short NUMBER_EAST_ARABIC_INDIC = 58;
+
+ /** Numbering in Indic Devanagari numerals
+
+ @since LibreOffice 6.1
+ */
+ const short NUMBER_INDIC_DEVANAGARI = 59;
+
};
diff --git a/svx/inc/numberingtype.hrc b/svx/inc/numberingtype.hrc
index be21d6254a98..b37a11b8e33a 100644
--- a/svx/inc/numberingtype.hrc
+++ b/svx/inc/numberingtype.hrc
@@ -53,7 +53,10 @@ const std::pair<const char*, int> RID_SVXSTRARY_NUMBERINGTYPE[] =
{ 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", "א...ת, אא...תת, ...") , 33 /* CHARS_HEBREW */ },
+ { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "١, ٢, ٣, ٤, ... (Arabic)"), 57 /* NUMBER_ARABIC_INDIC */ },
+ { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "۱, ۲, ۳, ۴, ... (Farsi)"), 58 /* NUMBER_EAST_ARABIC_INDIC */ },
+ { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "१, २, ३, ..."), 59 /* NUMBER_INDIC_DEVANAGARI */ },
};
#endif