diff options
author | Karl Hong <khong@openoffice.org> | 2002-09-06 00:19:30 +0000 |
---|---|---|
committer | Karl Hong <khong@openoffice.org> | 2002-09-06 00:19:30 +0000 |
commit | a83279e555ab8b9eba8e1997fdce289789f149f6 (patch) | |
tree | 861fb0f0690b806fc6514d00f8798343d922c873 /i18npool | |
parent | e756ae408db0b5cdd90a1d2340c60d856e865035 (diff) |
#102681# Add alphanumeric algorithm for unsupported lanugages
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/source/indexentry/indexentrysupplier.cxx | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/i18npool/source/indexentry/indexentrysupplier.cxx b/i18npool/source/indexentry/indexentrysupplier.cxx index 1952d7e83308..dfee8434bc8e 100644 --- a/i18npool/source/indexentry/indexentrysupplier.cxx +++ b/i18npool/source/indexentry/indexentrysupplier.cxx @@ -2,9 +2,9 @@ * * $RCSfile: indexentrysupplier.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: khong $ $Date: 2002-07-25 04:38:12 $ + * last change: $Author: khong $ $Date: 2002-09-06 01:19:30 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -141,7 +141,8 @@ Sequence < Locale > SAL_CALL IndexEntrySupplier::getLocaleList() throw (RuntimeE Sequence < OUString > SAL_CALL IndexEntrySupplier::getAlgorithmList( const Locale& rLocale ) throw (RuntimeException) { - Sequence < OUString > algorithmList; + Sequence < OUString > algorithmList(1); + algorithmList[0] = OUString::createFromAscii("alphanumeric"); for( sal_Int16 i=0; i<nbOfLocales; i++ ) { OUString name = OUString::createFromAscii( aLocaleList[i].pLocale ); @@ -167,10 +168,13 @@ Sequence < OUString > SAL_CALL IndexEntrySupplier::getAlgorithmList( const Local OUString algorithms = OUString::createFromAscii( aLocaleList[i].pAlgorithms ); - algorithmList.realloc(aLocaleList[i].pAlgorithmCount); - index = 0; - for (sal_Int16 j=0; j<aLocaleList[i].pAlgorithmCount; j++) + if (aLocaleList[i].pAlgorithmCount > 1) { + algorithmList.realloc(aLocaleList[i].pAlgorithmCount); + index = 0; + for (sal_Int16 j=0; j<aLocaleList[i].pAlgorithmCount; j++) algorithmList[j] = algorithms.getToken(0, sal_Unicode(','), index); + } else + algorithmList[0] = algorithms; break; } |