summaryrefslogtreecommitdiff
path: root/i18npool/source/collator
diff options
context:
space:
mode:
Diffstat (limited to 'i18npool/source/collator')
-rw-r--r--i18npool/source/collator/chaptercollator.cxx2
-rw-r--r--i18npool/source/collator/collatorImpl.cxx2
-rw-r--r--i18npool/source/collator/collator_unicode.cxx12
-rwxr-xr-xi18npool/source/collator/data/ca_charset.txt4
-rw-r--r--i18npool/source/collator/data/collator_data.map1
-rw-r--r--i18npool/source/collator/gencoll_rule.cxx12
6 files changed, 19 insertions, 14 deletions
diff --git a/i18npool/source/collator/chaptercollator.cxx b/i18npool/source/collator/chaptercollator.cxx
index 6b337c6cd75e..842d81f9ecbc 100644
--- a/i18npool/source/collator/chaptercollator.cxx
+++ b/i18npool/source/collator/chaptercollator.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/i18npool/source/collator/collatorImpl.cxx b/i18npool/source/collator/collatorImpl.cxx
index 9903df6fd00e..c315d8929d1a 100644
--- a/i18npool/source/collator/collatorImpl.cxx
+++ b/i18npool/source/collator/collatorImpl.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/i18npool/source/collator/collator_unicode.cxx b/i18npool/source/collator/collator_unicode.cxx
index 2afdd401123f..6d0ed67151e5 100644
--- a/i18npool/source/collator/collator_unicode.cxx
+++ b/i18npool/source/collator/collator_unicode.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -63,13 +63,13 @@ sal_Int32 SAL_CALL
Collator_Unicode::compareSubstring( const OUString& str1, sal_Int32 off1, sal_Int32 len1,
const OUString& str2, sal_Int32 off2, sal_Int32 len2) throw(RuntimeException)
{
- return collator->compare(reinterpret_cast<const UChar *>(str1.getStr()) + off1, len1, reinterpret_cast<const UChar *>(str2.getStr()) + off2, len2); // UChar != sal_Unicode in MinGW
+ return collator->compare(reinterpret_cast<const UChar *>(str1.getStr()) + off1, len1, reinterpret_cast<const UChar *>(str2.getStr()) + off2, len2); // UChar != sal_Unicode in MinGW
}
sal_Int32 SAL_CALL
Collator_Unicode::compareString( const OUString& str1, const OUString& str2) throw(RuntimeException)
{
- return collator->compare(reinterpret_cast<const UChar *>(str1.getStr()), reinterpret_cast<const UChar *>(str2.getStr())); // UChar != sal_Unicode in MinGW
+ return collator->compare(reinterpret_cast<const UChar *>(str1.getStr()), reinterpret_cast<const UChar *>(str2.getStr())); // UChar != sal_Unicode in MinGW
}
extern "C" { static void SAL_CALL thisModule() {} }
@@ -82,7 +82,7 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang::
UErrorCode status = U_ZERO_ERROR;
OUString rule = LocaleData().getCollatorRuleByAlgorithm(rLocale, rAlgorithm);
if (rule.getLength() > 0) {
- collator = new RuleBasedCollator(reinterpret_cast<const UChar *>(rule.getStr()), status); // UChar != sal_Unicode in MinGW
+ collator = new RuleBasedCollator(reinterpret_cast<const UChar *>(rule.getStr()), status); // UChar != sal_Unicode in MinGW
if (! U_SUCCESS(status)) throw RuntimeException();
}
if (!collator && OUString::createFromAscii(LOCAL_RULE_LANGS).indexOf(rLocale.Language) >= 0) {
@@ -98,9 +98,9 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang::
if (rLocale.Language.equalsAscii("zh")) {
OUString func_base = aBuf.makeStringAndClear();
if (OUString::createFromAscii("TW HK MO").indexOf(rLocale.Country) >= 0)
- func=(const sal_uInt8* (*)()) osl_getFunctionSymbol(hModule,
+ func=(const sal_uInt8* (*)()) osl_getFunctionSymbol(hModule,
(func_base + OUString::createFromAscii("TW_") + rAlgorithm).pData);
- if (!func)
+ if (!func)
func=(const sal_uInt8* (*)()) osl_getFunctionSymbol(hModule, (func_base + rAlgorithm).pData);
} else {
if (rLocale.Language.equalsAscii("ja")) {
diff --git a/i18npool/source/collator/data/ca_charset.txt b/i18npool/source/collator/data/ca_charset.txt
new file mode 100755
index 000000000000..1cd90a1ae5e6
--- /dev/null
+++ b/i18npool/source/collator/data/ca_charset.txt
@@ -0,0 +1,4 @@
+#
+# Collation of Catalan letters
+#
+& L << ŀ = l· <<< Ŀ = L·
diff --git a/i18npool/source/collator/data/collator_data.map b/i18npool/source/collator/data/collator_data.map
index 412635f19eed..86b874ee09bb 100644
--- a/i18npool/source/collator/data/collator_data.map
+++ b/i18npool/source/collator/data/collator_data.map
@@ -19,6 +19,7 @@ global:
get_hu_charset;
get_ln_charset;
get_my_dictionary;
+ get_ca_charset;
local:
*;
diff --git a/i18npool/source/collator/gencoll_rule.cxx b/i18npool/source/collator/gencoll_rule.cxx
index c678230b0f1d..b53b73a4f5a5 100644
--- a/i18npool/source/collator/gencoll_rule.cxx
+++ b/i18npool/source/collator/gencoll_rule.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -86,8 +86,8 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
if (argc < 4) exit(-1);
- fp = fopen(argv[1], "rb"); // open the source file for read;
- if (fp == NULL)
+ fp = fopen(argv[1], "rb"); // open the source file for read;
+ if (fp == NULL)
printf("Open the rule source file failed.");
@@ -113,10 +113,10 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
UErrorCode status = U_ZERO_ERROR;
//UParseError parseError;
- //UCollator *coll = ucol_openRules(Obuf.getStr(), Obuf.getLength(), UCOL_OFF,
+ //UCollator *coll = ucol_openRules(Obuf.getStr(), Obuf.getLength(), UCOL_OFF,
// UCOL_DEFAULT_STRENGTH, &parseError, &status);
- RuleBasedCollator *coll = new RuleBasedCollator(reinterpret_cast<const UChar *>(Obuf.getStr()), status); // UChar != sal_Unicode in MinGW
+ RuleBasedCollator *coll = new RuleBasedCollator(reinterpret_cast<const UChar *>(Obuf.getStr()), status); // UChar != sal_Unicode in MinGW
if (U_SUCCESS(status)) {
@@ -138,6 +138,6 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
delete coll;
return U_SUCCESS(status) ? 0 : 1;
-} // End of main
+} // End of main
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */