sw/source/core/fields/macrofld.cxx | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-)
New commits: commit 9949dc9118bafd9bdeb6613c9cbb7c498fe90516 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Jul 6 13:58:34 2017 +0100 ofz#889: UriReferenceFactory unavailable Change-Id: Id041976e273c0ee2c1862c7a27dd39cfac12aaaf 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: */
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits