diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-02-28 17:43:23 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-28 14:22:41 -0600 |
commit | f1e3e9e514aa90ff4d8234801d86b317b6bc5d24 (patch) | |
tree | 97e6baba7b43f0849f10e9dbe4e42b4caec4eeab | |
parent | 86af0776a09fd49cbd8339350e3b699100c0142a (diff) |
fdo#75582: Handle MalformedUriException
Cherry-picks from master 29c3bb0968cb9770f7b822f5cf466314be9db825 "Handle
vnd.sun.star.Package: URLs provoking MalrformedUriException,"
eaa876e48695e7927563ee56a08e11acb0036e4a "typo in comment," and
33ca98314133a93e71edb1a003fe8ddb7b36e8a9 "Catching MalformedUriException
subsumes the rPath.isEmpty() case now," which are based on master-only
87432aeecdfa7194bb5050f912656e03294cf6c7 "Resolves: #i123042# corrected reload
of linked content..." but which is not needed to fix this issue.
Conflicts:
svgio/source/svgreader/svgimagenode.cxx
Change-Id: I68ea3410be2f758c869ef284718ccf139f1c9b78
Reviewed-on: https://gerrit.libreoffice.org/8399
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | svgio/source/svgreader/svgimagenode.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/svgio/source/svgreader/svgimagenode.cxx b/svgio/source/svgreader/svgimagenode.cxx index 30300e0e0513..8542b65d88a3 100644 --- a/svgio/source/svgreader/svgimagenode.cxx +++ b/svgio/source/svgreader/svgimagenode.cxx @@ -235,7 +235,19 @@ namespace svgio else if(!maUrl.isEmpty()) { const OUString& rPath = getDocument().getAbsolutePath(); - const OUString aAbsUrl(rtl::Uri::convertRelToAbs(rPath, maUrl)); + OUString aAbsUrl; + try { + aAbsUrl = rtl::Uri::convertRelToAbs(rPath, maUrl); + } catch (rtl::MalformedUriException & e) { + // Happens for the odd rPath = + // "vnd.sun.star.Package:Pictures/..." scheme using + // path components not starting with a slash by mis- + // design: + SAL_INFO( + "svg", + "caught rtl::MalformedUriException \"" + << e.getMessage() << "\""); + } if(!aAbsUrl.isEmpty()) { |