summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2004-10-22 07:16:29 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2004-10-22 07:16:29 +0000
commitd5bf26a04dba7fdba6cb560c0a953b125a20d1cc (patch)
treeb58449f1235cd3b799b2a267085dde183d374ecb /i18npool
parentb2a805e50714fe6d87f3253775bb531e9f6e2868 (diff)
INTEGRATION: CWS swqbugfixes07 (1.2.4); FILE MERGED
2004/10/13 11:35:40 tl 1.2.4.1: #i35373# now catching exceptions from the conversion-dictionary-list, especially the NoSupportException
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/textconversion/textconversion_zh.cxx20
1 files changed, 14 insertions, 6 deletions
diff --git a/i18npool/source/textconversion/textconversion_zh.cxx b/i18npool/source/textconversion/textconversion_zh.cxx
index 10942cc41ed2..a32b2117375a 100644
--- a/i18npool/source/textconversion/textconversion_zh.cxx
+++ b/i18npool/source/textconversion/textconversion_zh.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: textconversion_zh.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: rt $ $Date: 2004-09-17 13:57:32 $
+ * last change: $Author: rt $ $Date: 2004-10-22 08:16:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -234,10 +234,18 @@ TextConversion_zh::getConversion( const OUString& aText, sal_Int32 nStartPos, sa
// user dictionary
if (xCDL.is() && (!c2c || nLength == 1)) {
- Sequence < OUString > conversions = xCDL->queryConversions(aText, nStartPos, nLength,
- aLocale, ConversionDictionaryType::SCHINESE_TCHINESE,
- /*toSChinese ?*/ ConversionDirection_FROM_LEFT /*: ConversionDirection_FROM_RIGHT*/,
- nConversionOptions);
+ Sequence < OUString > conversions;
+ try {
+ conversions = xCDL->queryConversions(aText, nStartPos, nLength,
+ aLocale, ConversionDictionaryType::SCHINESE_TCHINESE,
+ /*toSChinese ?*/ ConversionDirection_FROM_LEFT /*: ConversionDirection_FROM_RIGHT*/,
+ nConversionOptions);
+ }
+ catch (...) {
+ // catch all exceptions (especially the NoSupportException
+ // when there is no user defined dictionary!)
+ // to allow querying the system dictionary in the next line
+ }
if (conversions.getLength() > 0)
result = conversions[0];
}