diff options
author | Oliver Bolte <obo@openoffice.org> | 2008-03-26 08:06:23 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2008-03-26 08:06:23 +0000 |
commit | 6c9f21fbd251cd13a56cf7274593d1d2548dec16 (patch) | |
tree | d854990fcaa5d6a9892e68a5f5a522daf1c686c9 /linguistic/source/spelldsp.cxx | |
parent | bb0da42292de549c9e9d5a437ca3857616f43ab9 (diff) |
INTEGRATION: CWS tl51_DEV300 (1.20.12.1.2); FILE MERGED
2007/11/15 12:53:37 tl 1.20.12.1.2.1: #150990# catch exception from createInstance(WithArguments) calls
Diffstat (limited to 'linguistic/source/spelldsp.cxx')
-rw-r--r-- | linguistic/source/spelldsp.cxx | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx index b375bc6eaa86..0034314c4465 100644 --- a/linguistic/source/spelldsp.cxx +++ b/linguistic/source/spelldsp.cxx @@ -4,9 +4,9 @@ * * $RCSfile: spelldsp.cxx,v $ * - * $Revision: 1.21 $ + * $Revision: 1.22 $ * - * last change: $Author: hr $ $Date: 2007-11-01 10:57:53 $ + * last change: $Author: obo $ $Date: 2008-03-26 09:06:23 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -493,10 +493,17 @@ BOOL SpellCheckerDispatcher::isValid_Impl( while (i < nLen && (!bTmpResValid || FALSE == bTmpRes)) { // create specific service via it's implementation name - Reference< XSpellChecker > xSpell( - xMgr->createInstanceWithArguments( - pImplNames[i], aArgs ), - UNO_QUERY ); + Reference< XSpellChecker > xSpell; + try + { + xSpell = Reference< XSpellChecker >( + xMgr->createInstanceWithArguments( + pImplNames[i], aArgs ), UNO_QUERY ); + } + catch (uno::Exception &) + { + DBG_ERROR( "createInstanceWithArguments failed" ); + } Reference< XSpellChecker1 > xSpell1( xSpell, UNO_QUERY ); pRef [i] = xSpell; pRef1[i] = xSpell1; @@ -748,10 +755,17 @@ Reference< XSpellAlternatives > SpellCheckerDispatcher::spell_Impl( while (i < nLen && (!bTmpResValid || xTmpRes.is())) { // create specific service via it's implementation name - Reference< XSpellChecker > xSpell( - xMgr->createInstanceWithArguments( - pImplNames[i], aArgs ), - UNO_QUERY ); + Reference< XSpellChecker > xSpell; + try + { + xSpell = Reference< XSpellChecker >( + xMgr->createInstanceWithArguments( + pImplNames[i], aArgs ), UNO_QUERY ); + } + catch (uno::Exception &) + { + DBG_ERROR( "createInstanceWithArguments failed" ); + } Reference< XSpellChecker1 > xSpell1( xSpell, UNO_QUERY ); pRef [i] = xSpell; pRef1[i] = xSpell1; |