i18npool: create instances with uno constructors

See tdf#74608 for motivation.

Change-Id: I814512ccc546bd015558a8122f0d2e3803437e38
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99722
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
diff --git a/i18npool/inc/calendar_gregorian.hxx b/i18npool/inc/calendar_gregorian.hxx
index 10bde05..f66300d 100644
--- a/i18npool/inc/calendar_gregorian.hxx
+++ b/i18npool/inc/calendar_gregorian.hxx
@@ -151,10 +151,16 @@ class Calendar_hanja final : public Calendar_gregorian
public:
    // Constructors
    Calendar_hanja();
    virtual void SAL_CALL loadCalendar(const OUString& uniqueID, const css::lang::Locale& rLocale) override;
    virtual OUString SAL_CALL getDisplayName(sal_Int16 nCalendarDisplayIndex, sal_Int16 nIdx, sal_Int16 nNameType) override;
};

class Calendar_hanja_yoil final : public Calendar_gregorian
{
public:
    // Constructors
    Calendar_hanja_yoil();
    virtual OUString SAL_CALL getDisplayName(sal_Int16 nCalendarDisplayIndex, sal_Int16 nIdx, sal_Int16 nNameType) override;
};


class Calendar_gengou final : public Calendar_gregorian
diff --git a/i18npool/inc/indexentrysupplier_ja_phonetic.hxx b/i18npool/inc/indexentrysupplier_ja_phonetic.hxx
index cced559..e376796ad 100644
--- a/i18npool/inc/indexentrysupplier_ja_phonetic.hxx
+++ b/i18npool/inc/indexentrysupplier_ja_phonetic.hxx
@@ -42,21 +42,22 @@ public:
        const css::lang::Locale& rLocale2 ) override;
};

#define INDEXENTRYSUPPLIER_JA_PHONETIC( algorithm ) \
#define INDEXENTRYSUPPLIER_JA_PHONETIC( algorithm, algo_descr ) \
class IndexEntrySupplier_##algorithm final : public IndexEntrySupplier_ja_phonetic {\
public:\
    IndexEntrySupplier_##algorithm (const css::uno::Reference < css::uno::XComponentContext >& rxContext) : IndexEntrySupplier_ja_phonetic (rxContext) {\
        implementationName = "com.sun.star.i18n.IndexEntrySupplier_"#algorithm;\
        implementationName = "com.sun.star.i18n.IndexEntrySupplier_"#algo_descr;\
    };\
    virtual sal_Bool SAL_CALL loadAlgorithm(\
        const css::lang::Locale& rLocale,\
        const OUString& SortAlgorithm, sal_Int32 collatorOptions ) override;\
};

INDEXENTRYSUPPLIER_JA_PHONETIC( ja_phonetic_alphanumeric_first_by_syllable )
INDEXENTRYSUPPLIER_JA_PHONETIC( ja_phonetic_alphanumeric_first_by_consonant )
INDEXENTRYSUPPLIER_JA_PHONETIC( ja_phonetic_alphanumeric_last_by_syllable )
INDEXENTRYSUPPLIER_JA_PHONETIC( ja_phonetic_alphanumeric_last_by_consonant )
/** descriptions formed by concatenating strings here must match names in .component file */
INDEXENTRYSUPPLIER_JA_PHONETIC( ja_phonetic_alphanumeric_first_by_syllable,  " (alphanumeric first) (grouped by syllable)" )
INDEXENTRYSUPPLIER_JA_PHONETIC( ja_phonetic_alphanumeric_first_by_consonant, " (alphanumeric first) (grouped by consonant)" )
INDEXENTRYSUPPLIER_JA_PHONETIC( ja_phonetic_alphanumeric_last_by_syllable,   " (alphanumeric last) (grouped by consonant)" )
INDEXENTRYSUPPLIER_JA_PHONETIC( ja_phonetic_alphanumeric_last_by_consonant,  " (alphanumeric last) (grouped by consonant)" )

}
#endif
diff --git a/i18npool/source/calendar/calendar_gregorian.cxx b/i18npool/source/calendar/calendar_gregorian.cxx
index 3aa5168..69fb087 100644
--- a/i18npool/source/calendar/calendar_gregorian.cxx
+++ b/i18npool/source/calendar/calendar_gregorian.cxx
@@ -201,14 +201,27 @@ Calendar_hanja::getDisplayName( sal_Int16 displayIndex, sal_Int16 idx, sal_Int16
        return Calendar_gregorian::getDisplayName( displayIndex, idx, nameType );
}

void SAL_CALL
Calendar_hanja::loadCalendar( const OUString& /*uniqueID*/, const css::lang::Locale& rLocale )

Calendar_hanja_yoil::Calendar_hanja_yoil()
{
    // Since this class could be called by service name 'hanja_yoil', we have to
    // rename uniqueID to get right calendar defined in locale data.
    Calendar_gregorian::loadCalendar("hanja", rLocale);
    cCalendar = "com.sun.star.i18n.Calendar_Calendar_hanja_yoil";
}

OUString SAL_CALL
Calendar_hanja_yoil::getDisplayName( sal_Int16 displayIndex, sal_Int16 idx, sal_Int16 nameType )
{
    if ( displayIndex == CalendarDisplayIndex::AM_PM ) {
        // Am/Pm string for Korean Hanja calendar will refer to Japanese locale
        css::lang::Locale jaLocale("ja", OUString(), OUString());
        if (idx == 0) return LocaleDataImpl::get()->getLocaleItem(jaLocale).timeAM;
        else if (idx == 1) return LocaleDataImpl::get()->getLocaleItem(jaLocale).timePM;
        else throw ERROR;
    }
    else
        return Calendar_gregorian::getDisplayName( displayIndex, idx, nameType );
}


const Era gengou_eraArray[] = {
    {1868,  1,  1, 0},  // Meiji
    {1912,  7, 30, 0},  // Taisho
diff --git a/i18npool/source/registerservices/registerservices.cxx b/i18npool/source/registerservices/registerservices.cxx
index 4db0333..8a5dc3c 100644
--- a/i18npool/source/registerservices/registerservices.cxx
+++ b/i18npool/source/registerservices/registerservices.cxx
@@ -71,27 +71,29 @@ using namespace i18npool;
                                    new ImplName) );       \
}

#define IMPL_CREATEINSTANCE_CTX( ImplName )               \
    static uno::Reference< uno::XInterface >              \
        ImplName##_CreateInstance(               \
            const uno::Reference<                         \
                    lang::XMultiServiceFactory >& rxMSF ) \
{                                                         \
    return uno::Reference <                               \
            uno::XInterface >( static_cast<cppu::OWeakObject*>(   \
                                    new ImplName( comphelper::getComponentContext(rxMSF) )) );  \
}

typedef uno::Reference<
        uno::XInterface > (*FN_CreateInstance)(
            const uno::Reference<
                lang::XMultiServiceFactory >& );

#define IMPL_TRANSLITERATION_ITEM( implName ) \
    {       TRLT_SERVICELNAME_L10N, \
        TRLT_IMPLNAME_PREFIX  #implName, \
        &implName##_CreateInstance }

#define IMPL_UNO_CONSTRUCTOR( ImplName ) \
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * \
i18npool_##ImplName##_get_implementation( \
    css::uno::XComponentContext *, \
    css::uno::Sequence<css::uno::Any> const &) \
{ \
    return cppu::acquire(new ImplName()); \
}

#define IMPL_UNO_CONSTRUCTOR_CTX( ImplName ) \
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * \
i18npool_##ImplName##_get_implementation( \
    css::uno::XComponentContext * context, \
    css::uno::Sequence<css::uno::Any> const &) \
{ \
    return cppu::acquire(new ImplName(context)); \
}


// At least for iOS it doesn't hurt if we have lots of functions here
// generated by these lovely macros that get compiled, but then no
@@ -102,35 +104,53 @@ typedef uno::Reference<
// -Wl,--gc_sections. It's mainly for iOS and Android that the
// --with-locales option is intended anyway.

IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier )
IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier_asian )
IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_syllable )
IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_consonant )
IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_syllable )
IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_consonant )
IMPL_CREATEINSTANCE_CTX( IndexEntrySupplier_Unicode )
IMPL_CREATEINSTANCE_CTX( CalendarImpl )
IMPL_CREATEINSTANCE( Calendar_gregorian )
IMPL_CREATEINSTANCE( Calendar_hanja )
IMPL_CREATEINSTANCE( Calendar_gengou )
IMPL_CREATEINSTANCE( Calendar_ROC )
IMPL_CREATEINSTANCE( Calendar_dangi )
IMPL_CREATEINSTANCE( Calendar_hijri )
IMPL_CREATEINSTANCE( Calendar_jewish )
IMPL_CREATEINSTANCE( Calendar_buddhist )
IMPL_CREATEINSTANCE( BreakIterator_ja )
IMPL_CREATEINSTANCE( BreakIterator_zh )
IMPL_CREATEINSTANCE( BreakIterator_zh_TW )
IMPL_CREATEINSTANCE( BreakIterator_ko )
IMPL_CREATEINSTANCE( BreakIterator_th )
IMPL_CREATEINSTANCE_CTX( ChapterCollator )
IMPL_CREATEINSTANCE( Collator_Unicode )
IMPL_UNO_CONSTRUCTOR_CTX( IndexEntrySupplier )
IMPL_UNO_CONSTRUCTOR_CTX( IndexEntrySupplier_asian )
#if WITH_LOCALE_ALL || WITH_LOCALE_ja
IMPL_UNO_CONSTRUCTOR_CTX( IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_syllable )
IMPL_UNO_CONSTRUCTOR_CTX( IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_consonant )
IMPL_UNO_CONSTRUCTOR_CTX( IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_syllable )
IMPL_UNO_CONSTRUCTOR_CTX( IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_consonant )
#endif
IMPL_UNO_CONSTRUCTOR_CTX( IndexEntrySupplier_Unicode )
IMPL_UNO_CONSTRUCTOR_CTX( CalendarImpl )
IMPL_UNO_CONSTRUCTOR( Calendar_gregorian )
IMPL_UNO_CONSTRUCTOR( Calendar_hanja )
IMPL_UNO_CONSTRUCTOR( Calendar_hanja_yoil )
IMPL_UNO_CONSTRUCTOR( Calendar_gengou )
IMPL_UNO_CONSTRUCTOR( Calendar_ROC )
IMPL_UNO_CONSTRUCTOR( Calendar_dangi )
IMPL_UNO_CONSTRUCTOR( Calendar_hijri )
IMPL_UNO_CONSTRUCTOR( Calendar_jewish )
IMPL_UNO_CONSTRUCTOR( Calendar_buddhist )
#if WITH_LOCALE_ALL || WITH_LOCALE_ja
    IMPL_UNO_CONSTRUCTOR( BreakIterator_ja )
#endif
#if WITH_LOCALE_ALL || WITH_LOCALE_zh
IMPL_UNO_CONSTRUCTOR( BreakIterator_zh )
IMPL_UNO_CONSTRUCTOR( BreakIterator_zh_TW )
#endif
#if WITH_LOCALE_ALL || WITH_LOCALE_ko
IMPL_UNO_CONSTRUCTOR( BreakIterator_ko )
#endif
#if WITH_LOCALE_ALL || WITH_LOCALE_th
IMPL_UNO_CONSTRUCTOR( BreakIterator_th )
#endif
IMPL_UNO_CONSTRUCTOR_CTX( ChapterCollator )
IMPL_UNO_CONSTRUCTOR( Collator_Unicode )

IMPL_CREATEINSTANCE( InputSequenceChecker_th )
IMPL_CREATEINSTANCE( InputSequenceChecker_hi )

IMPL_CREATEINSTANCE_CTX( TextConversion_ko )
IMPL_CREATEINSTANCE_CTX( TextConversion_zh )
#if WITH_LOCALE_ALL || WITH_LOCALE_th
IMPL_UNO_CONSTRUCTOR( InputSequenceChecker_th )
#endif
#if WITH_LOCALE_ALL || WITH_LOCALE_hi
IMPL_UNO_CONSTRUCTOR( InputSequenceChecker_hi )
#endif
#if WITH_LOCALE_ALL || WITH_LOCALE_ko
IMPL_UNO_CONSTRUCTOR_CTX( TextConversion_ko )
#endif
#if WITH_LOCALE_ALL || WITH_LOCALE_zh
IMPL_UNO_CONSTRUCTOR_CTX( TextConversion_zh )
#endif

IMPL_CREATEINSTANCE( Transliteration_u2l )
IMPL_CREATEINSTANCE( Transliteration_l2u )
@@ -178,7 +198,7 @@ IMPL_CREATEINSTANCE( NumToCharHangul_ko )
IMPL_CREATEINSTANCE( NumToCharLower_ko )
IMPL_CREATEINSTANCE( NumToCharUpper_ko )
IMPL_CREATEINSTANCE( NumToCharIndic_ar )
IMPL_CREATEINSTANCE( NumToCharEastIndic_ar )
IMPL_UNO_CONSTRUCTOR( NumToCharEastIndic_ar )
IMPL_CREATEINSTANCE( NumToCharIndic_hi )
IMPL_CREATEINSTANCE( NumToChar_th )

@@ -186,23 +206,33 @@ IMPL_CREATEINSTANCE( CharToNumLower_zh_CN )
IMPL_CREATEINSTANCE( CharToNumUpper_zh_CN )
IMPL_CREATEINSTANCE( CharToNumLower_zh_TW )
IMPL_CREATEINSTANCE( CharToNumUpper_zh_TW )
IMPL_CREATEINSTANCE( CharToNumFullwidth )
IMPL_CREATEINSTANCE( CharToNumKanjiShort_ja_JP )
IMPL_CREATEINSTANCE( CharToNumKanjiTraditional_ja_JP )
IMPL_CREATEINSTANCE( CharToNumHangul_ko )
IMPL_CREATEINSTANCE( CharToNumLower_ko )
IMPL_CREATEINSTANCE( CharToNumUpper_ko )
IMPL_CREATEINSTANCE( CharToNumIndic_ar )
IMPL_CREATEINSTANCE( CharToNumEastIndic_ar )
IMPL_CREATEINSTANCE( CharToNumIndic_hi )
IMPL_CREATEINSTANCE( CharToNum_th )
#if WITH_LOCALE_ALL || WITH_LOCALE_ja
IMPL_UNO_CONSTRUCTOR( CharToNumFullwidth )
IMPL_UNO_CONSTRUCTOR( CharToNumKanjiShort_ja_JP )
IMPL_UNO_CONSTRUCTOR( CharToNumKanjiTraditional_ja_JP )
#endif
#if WITH_LOCALE_ALL || WITH_LOCALE_ko
IMPL_UNO_CONSTRUCTOR( CharToNumHangul_ko )
IMPL_UNO_CONSTRUCTOR( CharToNumLower_ko )
IMPL_UNO_CONSTRUCTOR( CharToNumUpper_ko )
#endif
IMPL_UNO_CONSTRUCTOR( CharToNumIndic_ar )
IMPL_UNO_CONSTRUCTOR( CharToNumEastIndic_ar )
#if WITH_LOCALE_ALL || WITH_LOCALE_hi
IMPL_UNO_CONSTRUCTOR( CharToNumIndic_hi )
#endif
#if WITH_LOCALE_ALL || WITH_LOCALE_th
IMPL_UNO_CONSTRUCTOR( CharToNum_th )
#endif

IMPL_CREATEINSTANCE( NumToTextLower_zh_CN )
IMPL_CREATEINSTANCE( NumToTextUpper_zh_CN )
IMPL_CREATEINSTANCE( NumToTextLower_zh_TW )
IMPL_CREATEINSTANCE( NumToTextUpper_zh_TW )
IMPL_CREATEINSTANCE( NumToTextFullwidth_zh_CN )
IMPL_CREATEINSTANCE( NumToTextFullwidth_zh_TW )
#if WITH_LOCALE_ALL || WITH_LOCALE_zh
IMPL_UNO_CONSTRUCTOR( NumToTextLower_zh_CN )
IMPL_UNO_CONSTRUCTOR( NumToTextUpper_zh_CN )
IMPL_UNO_CONSTRUCTOR( NumToTextLower_zh_TW )
IMPL_UNO_CONSTRUCTOR( NumToTextUpper_zh_TW )
IMPL_UNO_CONSTRUCTOR( NumToTextFullwidth_zh_CN )
IMPL_UNO_CONSTRUCTOR( NumToTextFullwidth_zh_TW )
#endif
IMPL_CREATEINSTANCE( NumToTextFullwidth_ja_JP )
IMPL_CREATEINSTANCE( NumToTextFullwidth_ko )
IMPL_CREATEINSTANCE( NumToTextKanjiLongModern_ja_JP )
@@ -249,6 +279,9 @@ IMPL_CREATEINSTANCE( halfwidthToFullwidthLikeJIS )

namespace {

typedef uno::Reference< uno::XInterface > (*FN_CreateInstance)(
                const uno::Reference< lang::XMultiServiceFactory >& );

struct InstancesArray {
        const char* pServiceNm;
        const char* pImplementationNm;
@@ -258,117 +291,6 @@ struct InstancesArray {
}

const InstancesArray aInstances[] = {
    {   "com.sun.star.i18n.IndexEntrySupplier",
        "com.sun.star.i18n.IndexEntrySupplier",
        &IndexEntrySupplier_CreateInstance },
    {   "com.sun.star.i18n.IndexEntrySupplier_asian",
        "com.sun.star.i18n.IndexEntrySupplier_asian",
        &IndexEntrySupplier_asian_CreateInstance },
#if WITH_LOCALE_ALL || WITH_LOCALE_ja
    {   "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first)",
        "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first)",
        &IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_syllable_CreateInstance },
    {   "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last)",
        "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last)",
        &IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_syllable_CreateInstance },
    {   "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first) (grouped by syllable)",
        "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first) (grouped by syllable)",
        &IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_syllable_CreateInstance },
    {   "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first) (grouped by consonant)",
        "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first) (grouped by consonant)",
        &IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_consonant_CreateInstance },
    {   "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last) (grouped by syllable)",
        "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last) (grouped by syllable)",
        &IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_syllable_CreateInstance },
    {   "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last) (grouped by consonant)",
        "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last) (grouped by consonant)",
        &IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_consonant_CreateInstance },
#endif
    {       "com.sun.star.i18n.IndexEntrySupplier_Unicode",
        "com.sun.star.i18n.IndexEntrySupplier_Unicode",
        &IndexEntrySupplier_Unicode_CreateInstance },
    {   "com.sun.star.i18n.LocaleCalendar",
        "com.sun.star.i18n.CalendarImpl",
        &CalendarImpl_CreateInstance },
    {   "com.sun.star.i18n.LocaleCalendar2",
        "com.sun.star.i18n.CalendarImpl",
        &CalendarImpl_CreateInstance },
    {   "com.sun.star.i18n.Calendar_gregorian",
        "com.sun.star.i18n.Calendar_gregorian",
        &Calendar_gregorian_CreateInstance },
    {   "com.sun.star.i18n.Calendar_gengou",
        "com.sun.star.i18n.Calendar_gengou",
        &Calendar_gengou_CreateInstance },
    {   "com.sun.star.i18n.Calendar_ROC",
        "com.sun.star.i18n.Calendar_ROC",
        &Calendar_ROC_CreateInstance },
    {   "com.sun.star.i18n.Calendar_dangi",
        "com.sun.star.i18n.Calendar_dangi",
        &Calendar_dangi_CreateInstance },
    {   "com.sun.star.i18n.Calendar_hanja_yoil",
        "com.sun.star.i18n.Calendar_hanja_yoil",
        &Calendar_hanja_CreateInstance },
    {   "com.sun.star.i18n.Calendar_hanja",
        "com.sun.star.i18n.Calendar_hanja",
        &Calendar_hanja_CreateInstance },
    {   "com.sun.star.i18n.Calendar_hijri",
        "com.sun.star.i18n.Calendar_hijri",
        &Calendar_hijri_CreateInstance },
    {   "com.sun.star.i18n.Calendar_jewish",
        "com.sun.star.i18n.Calendar_jewish",
        &Calendar_jewish_CreateInstance },
    {   "com.sun.star.i18n.Calendar_buddhist",
        "com.sun.star.i18n.Calendar_buddhist",
        &Calendar_buddhist_CreateInstance },
#if WITH_LOCALE_ALL || WITH_LOCALE_ja
    {   "com.sun.star.i18n.BreakIterator_ja",
        "com.sun.star.i18n.BreakIterator_ja",
        &BreakIterator_ja_CreateInstance },
#endif
#if WITH_LOCALE_ALL || WITH_LOCALE_zh
    {   "com.sun.star.i18n.BreakIterator_zh",
        "com.sun.star.i18n.BreakIterator_zh",
        &BreakIterator_zh_CreateInstance },
    {   "com.sun.star.i18n.BreakIterator_zh_TW",
        "com.sun.star.i18n.BreakIterator_zh_TW",
        &BreakIterator_zh_TW_CreateInstance },
#endif
#if WITH_LOCALE_ALL || WITH_LOCALE_ko
    {   "com.sun.star.i18n.BreakIterator_ko",
        "com.sun.star.i18n.BreakIterator_ko",
        &BreakIterator_ko_CreateInstance },
#endif
#if WITH_LOCALE_ALL || WITH_LOCALE_th
    {   "com.sun.star.i18n.BreakIterator_th",
        "com.sun.star.i18n.BreakIterator_th",
        &BreakIterator_th_CreateInstance },
#endif
    {   "com.sun.star.i18n.ChapterCollator",
        "com.sun.star.i18n.ChapterCollator",
        &ChapterCollator_CreateInstance },
    {   "com.sun.star.i18n.Collator_Unicode",
        "com.sun.star.i18n.Collator_Unicode",
        &Collator_Unicode_CreateInstance },
#if WITH_LOCALE_ALL || WITH_LOCALE_th
    {   "com.sun.star.i18n.InputSequenceChecker_th",
        "com.sun.star.i18n.InputSequenceChecker_th",
        &InputSequenceChecker_th_CreateInstance },
#endif
#if WITH_LOCALE_ALL || WITH_LOCALE_hi
    {   "com.sun.star.i18n.InputSequenceChecker_hi",
        "com.sun.star.i18n.InputSequenceChecker_hi",
        &InputSequenceChecker_hi_CreateInstance },
#endif
#if WITH_LOCALE_ALL || WITH_LOCALE_ko
    {   "com.sun.star.i18n.TextConversion_ko",
        "com.sun.star.i18n.TextConversion_ko",
        &TextConversion_ko_CreateInstance },
#endif
#if WITH_LOCALE_ALL || WITH_LOCALE_zh
    {   "com.sun.star.i18n.TextConversion_zh",
        "com.sun.star.i18n.TextConversion_zh",
        &TextConversion_zh_CreateInstance },
#endif
    {   TRLT_SERVICELNAME_L10N,
        TRLT_IMPLNAME_PREFIX  "UPPERCASE_LOWERCASE",
        &Transliteration_u2l_CreateInstance },
@@ -443,7 +365,6 @@ const InstancesArray aInstances[] = {
    IMPL_TRANSLITERATION_ITEM (NumToCharHangul_ko),
#endif
    IMPL_TRANSLITERATION_ITEM (NumToCharIndic_ar),
    IMPL_TRANSLITERATION_ITEM (NumToCharEastIndic_ar),
#if WITH_LOCALE_ALL || WITH_LOCALE_hi
    IMPL_TRANSLITERATION_ITEM (NumToCharIndic_hi),
#endif
@@ -457,33 +378,7 @@ const InstancesArray aInstances[] = {
    IMPL_TRANSLITERATION_ITEM (CharToNumUpper_zh_TW),
    IMPL_TRANSLITERATION_ITEM (CharToNumLower_zh_TW),
#endif
#if WITH_LOCALE_ALL || WITH_LOCALE_ja
    IMPL_TRANSLITERATION_ITEM (CharToNumFullwidth),
    IMPL_TRANSLITERATION_ITEM (CharToNumKanjiShort_ja_JP),
    IMPL_TRANSLITERATION_ITEM (CharToNumKanjiTraditional_ja_JP),
#endif
#if WITH_LOCALE_ALL || WITH_LOCALE_ko
    IMPL_TRANSLITERATION_ITEM (CharToNumLower_ko),
    IMPL_TRANSLITERATION_ITEM (CharToNumUpper_ko),
    IMPL_TRANSLITERATION_ITEM (CharToNumHangul_ko),
#endif
    IMPL_TRANSLITERATION_ITEM (CharToNumIndic_ar),
    IMPL_TRANSLITERATION_ITEM (CharToNumEastIndic_ar),
#if WITH_LOCALE_ALL || WITH_LOCALE_hi
    IMPL_TRANSLITERATION_ITEM (CharToNumIndic_hi),
#endif
#if WITH_LOCALE_ALL || WITH_LOCALE_th
    IMPL_TRANSLITERATION_ITEM (CharToNum_th),
#endif

#if WITH_LOCALE_ALL || WITH_LOCALE_zh
    IMPL_TRANSLITERATION_ITEM (NumToTextUpper_zh_CN),
    IMPL_TRANSLITERATION_ITEM (NumToTextLower_zh_CN),
    IMPL_TRANSLITERATION_ITEM (NumToTextUpper_zh_TW),
    IMPL_TRANSLITERATION_ITEM (NumToTextLower_zh_TW),
    IMPL_TRANSLITERATION_ITEM (NumToTextFullwidth_zh_CN),
    IMPL_TRANSLITERATION_ITEM (NumToTextFullwidth_zh_TW),
#endif
#if WITH_LOCALE_ALL || WITH_LOCALE_ja
    IMPL_TRANSLITERATION_ITEM (NumToTextFullwidth_ja_JP),
#endif
diff --git a/i18npool/util/i18npool.component b/i18npool/util/i18npool.component
index 0b419d2..9af6c78 100644
--- a/i18npool/util/i18npool.component
+++ b/i18npool/util/i18npool.component
@@ -27,53 +27,69 @@
      constructor="com_sun_star_i18n_BreakIterator_Unicode_get_implementation">
    <service name="com.sun.star.i18n.BreakIterator_Unicode"/>
  </implementation>
  <implementation name="com.sun.star.i18n.BreakIterator_ja">
  <implementation name="com.sun.star.i18n.BreakIterator_ja"
    constructor="i18npool_BreakIterator_ja_get_implementation">
    <service name="com.sun.star.i18n.BreakIterator_ja"/>
  </implementation>
  <implementation name="com.sun.star.i18n.BreakIterator_ko">
  <implementation name="com.sun.star.i18n.BreakIterator_ko"
    constructor="i18npool_BreakIterator_ko_get_implementation">
    <service name="com.sun.star.i18n.BreakIterator_ko"/>
  </implementation>
  <implementation name="com.sun.star.i18n.BreakIterator_th">
  <implementation name="com.sun.star.i18n.BreakIterator_th"
    constructor="i18npool_BreakIterator_th_get_implementation">
    <service name="com.sun.star.i18n.BreakIterator_th"/>
  </implementation>
  <implementation name="com.sun.star.i18n.BreakIterator_zh">
  <implementation name="com.sun.star.i18n.BreakIterator_zh"
    constructor="i18npool_BreakIterator_zh_get_implementation">
    <service name="com.sun.star.i18n.BreakIterator_zh"/>
  </implementation>
  <implementation name="com.sun.star.i18n.BreakIterator_zh_TW">
  <implementation name="com.sun.star.i18n.BreakIterator_zh_TW"
    constructor="i18npool_BreakIterator_zh_TW_get_implementation">
    <service name="com.sun.star.i18n.BreakIterator_zh_TW"/>
  </implementation>
  <implementation name="com.sun.star.i18n.CalendarImpl">
  <implementation name="com.sun.star.i18n.CalendarImpl"
    constructor="i18npool_CalendarImpl_get_implementation">
    <service name="com.sun.star.i18n.LocaleCalendar"/>
    <service name="com.sun.star.i18n.LocaleCalendar2"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Calendar_ROC">
  <implementation name="com.sun.star.i18n.Calendar_ROC"
    constructor="i18npool_Calendar_ROC_get_implementation">
    <service name="com.sun.star.i18n.Calendar_ROC"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Calendar_dangi">
  <implementation name="com.sun.star.i18n.Calendar_dangi"
    constructor="i18npool_Calendar_dangi_get_implementation">
    <service name="com.sun.star.i18n.Calendar_dangi"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Calendar_buddhist">
  <implementation name="com.sun.star.i18n.Calendar_buddhist"
    constructor="i18npool_Calendar_buddhist_get_implementation">
    <service name="com.sun.star.i18n.Calendar_buddhist"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Calendar_gengou">
  <implementation name="com.sun.star.i18n.Calendar_gengou"
    constructor="i18npool_Calendar_gengou_get_implementation">
    <service name="com.sun.star.i18n.Calendar_gengou"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Calendar_gregorian">
  <implementation name="com.sun.star.i18n.Calendar_gregorian"
    constructor="i18npool_Calendar_gregorian_get_implementation">
    <service name="com.sun.star.i18n.Calendar_gregorian"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Calendar_hanja">
  <implementation name="com.sun.star.i18n.Calendar_hanja"
    constructor="i18npool_Calendar_hanja_get_implementation">
    <service name="com.sun.star.i18n.Calendar_hanja"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Calendar_hanja_yoil">
  <implementation name="com.sun.star.i18n.Calendar_hanja_yoil"
    constructor="i18npool_Calendar_hanja_yoil_get_implementation">
    <service name="com.sun.star.i18n.Calendar_hanja_yoil"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Calendar_hijri">
  <implementation name="com.sun.star.i18n.Calendar_hijri"
    constructor="i18npool_Calendar_hijri_get_implementation">
    <service name="com.sun.star.i18n.Calendar_hijri"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Calendar_jewish">
  <implementation name="com.sun.star.i18n.Calendar_jewish"
    constructor="i18npool_Calendar_jewish_get_implementation">
    <service name="com.sun.star.i18n.Calendar_jewish"/>
  </implementation>
  <implementation name="com.sun.star.i18n.ChapterCollator">
  <implementation name="com.sun.star.i18n.ChapterCollator"
    constructor="i18npool_ChapterCollator_get_implementation">
    <service name="com.sun.star.i18n.ChapterCollator"/>
  </implementation>
  <implementation name="com.sun.star.i18n.CharacterClassification"
@@ -88,44 +104,56 @@
      constructor="com_sun_star_i18n_Collator_get_implementation">
    <service name="com.sun.star.i18n.Collator"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Collator_Unicode">
  <implementation name="com.sun.star.i18n.Collator_Unicode"
    constructor="i18npool_Collator_Unicode_get_implementation">
    <service name="com.sun.star.i18n.Collator_Unicode"/>
  </implementation>
  <implementation name="com.sun.star.i18n.IndexEntrySupplier">
  <implementation name="com.sun.star.i18n.IndexEntrySupplier"
    constructor="i18npool_IndexEntrySupplier_get_implementation">
    <service name="com.sun.star.i18n.IndexEntrySupplier"/>
  </implementation>
  <implementation name="com.sun.star.i18n.IndexEntrySupplier_Unicode">
  <implementation name="com.sun.star.i18n.IndexEntrySupplier_Unicode"
    constructor="i18npool_IndexEntrySupplier_Unicode_get_implementation">
    <service name="com.sun.star.i18n.IndexEntrySupplier_Unicode"/>
  </implementation>
  <implementation name="com.sun.star.i18n.IndexEntrySupplier_asian">
  <implementation name="com.sun.star.i18n.IndexEntrySupplier_asian"
    constructor="i18npool_IndexEntrySupplier_asian_get_implementation">
    <service name="com.sun.star.i18n.IndexEntrySupplier_asian"/>
  </implementation>
  <implementation name="com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first)">
  <implementation name="com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first)"
    constructor="i18npool_IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_syllable_get_implementation">
    <service name="com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first)"/>
  </implementation>
  <implementation name="com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first) (grouped by consonant)">
  <implementation name="com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first) (grouped by consonant)"
    constructor="i18npool_IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_syllable_get_implementation">
    <service name="com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first) (grouped by consonant)"/>
  </implementation>
  <implementation name="com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first) (grouped by syllable)">
  <implementation name="com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first) (grouped by syllable)"
    constructor="i18npool_IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_syllable_get_implementation">
    <service name="com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric first) (grouped by syllable)"/>
  </implementation>
  <implementation name="com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last)">
  <implementation name="com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last)"
    constructor="i18npool_IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_syllable_get_implementation">
    <service name="com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last)"/>
  </implementation>
  <implementation name="com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last) (grouped by consonant)">
  <implementation name="com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last) (grouped by consonant)"
    constructor="i18npool_IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_syllable_get_implementation">
    <service name="com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last) (grouped by consonant)"/>
  </implementation>
  <implementation name="com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last) (grouped by syllable)">
  <implementation name="com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last) (grouped by syllable)"
    constructor="i18npool_IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_syllable_get_implementation">
    <service name="com.sun.star.i18n.IndexEntrySupplier_ja_phonetic (alphanumeric last) (grouped by syllable)"/>
  </implementation>
  <implementation name="com.sun.star.i18n.InputSequenceChecker"
      constructor="com_sun_star_i18n_InputSequenceChecker_get_implementation">
    <service name="com.sun.star.i18n.InputSequenceChecker"/>
  </implementation>
  <implementation name="com.sun.star.i18n.InputSequenceChecker_hi">
  <implementation name="com.sun.star.i18n.InputSequenceChecker_hi"
      constructor="i18npool_InputSequenceChecker_hi_get_implementation">
    <service name="com.sun.star.i18n.InputSequenceChecker_hi"/>
  </implementation>
  <implementation name="com.sun.star.i18n.InputSequenceChecker_th">
  <implementation name="com.sun.star.i18n.InputSequenceChecker_th"
      constructor="i18npool_InputSequenceChecker_th_get_implementation">
    <service name="com.sun.star.i18n.InputSequenceChecker_th"/>
  </implementation>
  <implementation name="com.sun.star.i18n.LocaleDataImpl"
@@ -154,38 +182,48 @@
      constructor="com_sun_star_i18n_TextConversion_get_implementation">
    <service name="com.sun.star.i18n.TextConversion"/>
  </implementation>
  <implementation name="com.sun.star.i18n.TextConversion_ko">
  <implementation name="com.sun.star.i18n.TextConversion_ko"
      constructor="i18npool_TextConversion_ko_get_implementation">
    <service name="com.sun.star.i18n.TextConversion_ko"/>
  </implementation>
  <implementation name="com.sun.star.i18n.TextConversion_zh">
  <implementation name="com.sun.star.i18n.TextConversion_zh"
      constructor="i18npool_TextConversion_zh_get_implementation">
    <service name="com.sun.star.i18n.TextConversion_zh"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Transliteration"
      constructor="com_sun_star_i18n_Transliteration_get_implementation">
    <service name="com.sun.star.i18n.Transliteration"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Transliteration.CharToNumEastIndic_ar">
  <implementation name="com.sun.star.i18n.Transliteration.CharToNumEastIndic_ar"
      constructor="i18npool_CharToNumEastIndic_ar_get_implementation">
    <service name="com.sun.star.i18n.Transliteration.l10n"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Transliteration.CharToNumFullwidth">
  <implementation name="com.sun.star.i18n.Transliteration.CharToNumFullwidth"
      constructor="i18npool_CharToNumFullwidth_get_implementation">
    <service name="com.sun.star.i18n.Transliteration.l10n"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Transliteration.CharToNumHangul_ko">
  <implementation name="com.sun.star.i18n.Transliteration.CharToNumHangul_ko"
      constructor="i18npool_CharToNumHangul_ko_get_implementation">
    <service name="com.sun.star.i18n.Transliteration.l10n"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Transliteration.CharToNumIndic_ar">
  <implementation name="com.sun.star.i18n.Transliteration.CharToNumIndic_ar"
      constructor="i18npool_CharToNumIndic_ar_get_implementation">
    <service name="com.sun.star.i18n.Transliteration.l10n"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Transliteration.CharToNumIndic_hi">
  <implementation name="com.sun.star.i18n.Transliteration.CharToNumIndic_hi"
      constructor="i18npool_CharToNumIndic_hi_get_implementation">
    <service name="com.sun.star.i18n.Transliteration.l10n"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Transliteration.CharToNumKanjiShort_ja_JP">
  <implementation name="com.sun.star.i18n.Transliteration.CharToNumKanjiShort_ja_JP"
      constructor="i18npool_CharToNumKanjiShort_ja_JP_get_implementation">
    <service name="com.sun.star.i18n.Transliteration.l10n"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Transliteration.CharToNumKanjiTraditional_ja_JP">
  <implementation name="com.sun.star.i18n.Transliteration.CharToNumKanjiTraditional_ja_JP"
      constructor="i18npool_CharToNumKanjiTraditional_ja_JP_get_implementation">
    <service name="com.sun.star.i18n.Transliteration.l10n"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Transliteration.CharToNumLower_ko">
  <implementation name="com.sun.star.i18n.Transliteration.CharToNumLower_ko"
      constructor="i18npool_CharToNumLower_ko_get_implementation">
    <service name="com.sun.star.i18n.Transliteration.l10n"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Transliteration.CharToNumLower_zh_CN">
@@ -194,7 +232,8 @@
  <implementation name="com.sun.star.i18n.Transliteration.CharToNumLower_zh_TW">
    <service name="com.sun.star.i18n.Transliteration.l10n"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Transliteration.CharToNumUpper_ko">
  <implementation name="com.sun.star.i18n.Transliteration.CharToNumUpper_ko"
      constructor="i18npool_CharToNumUpper_ko_get_implementation">
    <service name="com.sun.star.i18n.Transliteration.l10n"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Transliteration.CharToNumUpper_zh_CN">
@@ -203,7 +242,8 @@
  <implementation name="com.sun.star.i18n.Transliteration.CharToNumUpper_zh_TW">
    <service name="com.sun.star.i18n.Transliteration.l10n"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Transliteration.CharToNum_th">
  <implementation name="com.sun.star.i18n.Transliteration.CharToNum_th"
      constructor="i18npool_CharToNum_th_get_implementation">
    <service name="com.sun.star.i18n.Transliteration.l10n"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Transliteration.FULLWIDTHKATAKANA_HALFWIDTHKATAKANA">
@@ -320,10 +360,12 @@
  <implementation name="com.sun.star.i18n.Transliteration.NumToTextFullwidth_ko">
    <service name="com.sun.star.i18n.Transliteration.l10n"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Transliteration.NumToTextFullwidth_zh_CN">
  <implementation name="com.sun.star.i18n.Transliteration.NumToTextFullwidth_zh_CN"
      constructor="i18npool_NumToTextFullwidth_zh_CN_get_implementation">
    <service name="com.sun.star.i18n.Transliteration.l10n"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Transliteration.NumToTextFullwidth_zh_TW">
  <implementation name="com.sun.star.i18n.Transliteration.NumToTextFullwidth_zh_TW"
      constructor="i18npool_NumToTextFullwidth_zh_TW_get_implementation">
    <service name="com.sun.star.i18n.Transliteration.l10n"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Transliteration.NumToTextHangulCircledJamo_ko">
@@ -365,19 +407,23 @@
  <implementation name="com.sun.star.i18n.Transliteration.NumToTextKanjiShortTraditional_ja_JP">
    <service name="com.sun.star.i18n.Transliteration.l10n"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Transliteration.NumToTextLower_zh_CN">
  <implementation name="com.sun.star.i18n.Transliteration.NumToTextLower_zh_CN"
      constructor="i18npool_NumToTextLower_zh_CN_get_implementation">
    <service name="com.sun.star.i18n.Transliteration.l10n"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Transliteration.NumToTextLower_zh_TW">
  <implementation name="com.sun.star.i18n.Transliteration.NumToTextLower_zh_TW"
      constructor="i18npool_NumToTextLower_zh_TW_get_implementation">
    <service name="com.sun.star.i18n.Transliteration.l10n"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Transliteration.NumToTextTianGan_zh">
    <service name="com.sun.star.i18n.Transliteration.l10n"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Transliteration.NumToTextUpper_zh_CN">
  <implementation name="com.sun.star.i18n.Transliteration.NumToTextUpper_zh_CN"
      constructor="i18npool_NumToTextUpper_zh_CN_get_implementation">
    <service name="com.sun.star.i18n.Transliteration.l10n"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Transliteration.NumToTextUpper_zh_TW">
  <implementation name="com.sun.star.i18n.Transliteration.NumToTextUpper_zh_TW"
      constructor="i18npool_NumToTextUpper_zh_TW_get_implementation">
    <service name="com.sun.star.i18n.Transliteration.l10n"/>
  </implementation>
  <implementation name="com.sun.star.i18n.Transliteration.SENTENCE_CASE">