diff options
author | Oliver Bolte <obo@openoffice.org> | 2008-03-26 08:04:56 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2008-03-26 08:04:56 +0000 |
commit | ba986b6e3f30fecaea35b805207992d1c9e08063 (patch) | |
tree | be8e0fa9470ccc26f764793a651861ea7d6a9700 /linguistic/source/convdic.cxx | |
parent | 3559a8314c102dd44c1062255f3f11de96b4c53c (diff) |
INTEGRATION: CWS tl51_DEV300 (1.11.22); FILE MERGED
2007/11/15 12:53:37 tl 1.11.22.1: #150990# catch exception from createInstance(WithArguments) calls
Diffstat (limited to 'linguistic/source/convdic.cxx')
-rw-r--r-- | linguistic/source/convdic.cxx | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx index c2db7c75e58a..132c51df51e6 100644 --- a/linguistic/source/convdic.cxx +++ b/linguistic/source/convdic.cxx @@ -4,9 +4,9 @@ * * $RCSfile: convdic.cxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: ihi $ $Date: 2007-06-05 14:28:53 $ + * last change: $Author: obo $ $Date: 2008-03-26 09:04:56 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -177,8 +177,15 @@ void ReadThroughDic( const String &rMainURL, ConvDicXMLImport &rImport ) aParserInput.aInputStream = xIn; // get parser - uno::Reference< xml::sax::XParser > xParser( xServiceFactory->createInstance( + uno::Reference< xml::sax::XParser > xParser; + try + { + xParser = uno::Reference< xml::sax::XParser >( xServiceFactory->createInstance( A2OU( "com.sun.star.xml.sax.Parser" ) ), UNO_QUERY ); + } + catch (uno::Exception &) + { + } DBG_ASSERT( xParser.is(), "Can't create parser" ); if (!xParser.is()) return; @@ -350,9 +357,15 @@ void ConvDic::Save() uno::Reference< io::XActiveDataSource > xSaxWriter; if (xServiceFactory.is()) { - xSaxWriter = uno::Reference< io::XActiveDataSource >( - xServiceFactory->createInstance( - OUString::createFromAscii( "com.sun.star.xml.sax.Writer" ) ), UNO_QUERY ); + try + { + xSaxWriter = uno::Reference< io::XActiveDataSource >( + xServiceFactory->createInstance( + OUString::createFromAscii( "com.sun.star.xml.sax.Writer" ) ), UNO_QUERY ); + } + catch (uno::Exception &) + { + } } DBG_ASSERT( xSaxWriter.is(), "can't instantiate XML writer" ); |