diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-07-06 13:58:34 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-07-06 13:59:53 +0100 |
commit | 9949dc9118bafd9bdeb6613c9cbb7c498fe90516 (patch) | |
tree | 69af3e1c7383d4bc0c7d4b3f2cdcb9c76575aa07 /sw | |
parent | d28b5faa4a9b92e5b94ebaaf5395b0108564d8bf (diff) |
ofz#889: UriReferenceFactory unavailable
Change-Id: Id041976e273c0ee2c1862c7a27dd39cfac12aaaf
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/fields/macrofld.cxx | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/sw/source/core/fields/macrofld.cxx b/sw/source/core/fields/macrofld.cxx index bb0756ff35a7..787648806185 100644 --- a/sw/source/core/fields/macrofld.cxx +++ b/sw/source/core/fields/macrofld.cxx @@ -207,16 +207,17 @@ void SwMacroField::CreateMacroString( bool SwMacroField::isScriptURL( const OUString& str ) { - uno::Reference< uno::XComponentContext > xContext = - ::comphelper::getProcessComponentContext(); - - uno::Reference< uri::XUriReferenceFactory > - xFactory = uri::UriReferenceFactory::create( xContext ); - - uno::Reference< uri::XVndSunStarScriptUrl > - xUrl( xFactory->parse( str ), uno::UNO_QUERY ); - - return xUrl.is(); + try + { + uno::Reference<uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext(); + uno::Reference<uri::XUriReferenceFactory> xFactory = uri::UriReferenceFactory::create(xContext); + uno::Reference<uri::XVndSunStarScriptUrl> xUrl(xFactory->parse(str), uno::UNO_QUERY); + return xUrl.is(); + } + catch (...) + { + } + return false; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |