summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-07-06 13:58:34 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-07-06 13:59:53 +0100
commit9949dc9118bafd9bdeb6613c9cbb7c498fe90516 (patch)
tree69af3e1c7383d4bc0c7d4b3f2cdcb9c76575aa07
parentd28b5faa4a9b92e5b94ebaaf5395b0108564d8bf (diff)
ofz#889: UriReferenceFactory unavailable
Change-Id: Id041976e273c0ee2c1862c7a27dd39cfac12aaaf
-rw-r--r--sw/source/core/fields/macrofld.cxx21
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: */