diff options
Diffstat (limited to 'i18npool/source')
4 files changed, 42 insertions, 0 deletions
diff --git a/i18npool/source/localedata/data/ar_EG.xml b/i18npool/source/localedata/data/ar_EG.xml index 662a913d8a55..7e52d518d907 100644 --- a/i18npool/source/localedata/data/ar_EG.xml +++ b/i18npool/source/localedata/data/ar_EG.xml @@ -466,6 +466,7 @@ <Transliteration unoid="TOGGLE_CASE"/> <Transliteration unoid="IGNORE_CASE"/> <Transliteration unoid="ignoreDiacritics_CTL"/> + <Transliteration unoid="ignoreKashida_CTL"/> </LC_TRANSLITERATION> <LC_MISC> <ReservedWords> diff --git a/i18npool/source/registerservices/registerservices.cxx b/i18npool/source/registerservices/registerservices.cxx index 93b38d72a0df..67c59e61b9d2 100644 --- a/i18npool/source/registerservices/registerservices.cxx +++ b/i18npool/source/registerservices/registerservices.cxx @@ -156,6 +156,7 @@ IMPL_CREATEINSTANCE( ignoreProlongedSoundMark_ja_JP) IMPL_CREATEINSTANCE( ignoreMiddleDot_ja_JP) IMPL_CREATEINSTANCE( ignoreSpace_ja_JP) IMPL_CREATEINSTANCE( ignoreDiacritics_CTL) +IMPL_CREATEINSTANCE( ignoreKashida_CTL) IMPL_CREATEINSTANCE( TextToChuyin_zh_TW ) IMPL_CREATEINSTANCE( TextToPinyin_zh_CN ) @@ -381,6 +382,7 @@ static const struct InstancesArray { IMPL_TRANSLITERATION_ITEM (TextToPinyin_zh_CN), IMPL_TRANSLITERATION_ITEM (TextToChuyin_zh_TW), IMPL_TRANSLITERATION_ITEM( ignoreDiacritics_CTL), + IMPL_TRANSLITERATION_ITEM (ignoreKashida_CTL), IMPL_TRANSLITERATION_ITEM (NumToCharUpper_zh_CN), IMPL_TRANSLITERATION_ITEM (NumToCharLower_zh_CN), diff --git a/i18npool/source/transliteration/ignoreKashida_CTL.cxx b/i18npool/source/transliteration/ignoreKashida_CTL.cxx new file mode 100644 index 000000000000..ff0303dbf217 --- /dev/null +++ b/i18npool/source/transliteration/ignoreKashida_CTL.cxx @@ -0,0 +1,35 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#define TRANSLITERATION_Kashida_CTL +#include <transliteration_Ignore.hxx> + +namespace com { namespace sun { namespace star { namespace i18n { + +sal_Unicode +ignoreKashida_CTL_translator (const sal_Unicode c) +{ + if( c == 0x0640 ) // Check if it's Kashida + return 0xffff; // Then skip this character + + return c; +} + +ignoreKashida_CTL::ignoreKashida_CTL() +{ + func = ignoreKashida_CTL_translator; + table = 0; + map = 0; + transliterationName = "ignoreKashida_CTL"; + implementationName = "com.sun.star.i18n.Transliteration.ignoreKashida_CTL"; +} + +} } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/transliterationImpl.cxx b/i18npool/source/transliteration/transliterationImpl.cxx index 85014b6a3092..7e1d7bf7f34e 100644 --- a/i18npool/source/transliteration/transliterationImpl.cxx +++ b/i18npool/source/transliteration/transliterationImpl.cxx @@ -199,6 +199,10 @@ TransliterationImpl::loadModule( TransliterationModules modType, const Locale& r if (loadModuleByName(OUString("ignoreDiacritics_CTL"), bodyCascade[numCascade], rLocale)) numCascade++; } + if (modType & TransliterationModulesExtra::ignoreKashida_CTL) + if (loadModuleByName(OUString("ignoreKashida_CTL"), bodyCascade[numCascade], rLocale)) + numCascade++; + } else if (modType&TransliterationModules_NON_IGNORE_MASK) { for (sal_Int16 i = 0; TMlist[i].tm; i++) { if (TMlist[i].tm == modType) { |