diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-10-20 14:46:56 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-10-20 14:46:56 +0200 |
commit | 9bcc09dcb9a17404fd4852c61b47247886dfda0c (patch) | |
tree | bcad324689bfb8ea9cd8c8669902a8f4e341e022 /uui/source | |
parent | ac4cfb4cf76d1cf1459d3cbf1c135aae2753f32d (diff) |
Gracefully handle URLs INetURLObject refuses to parse
Change-Id: Id4d09dd32a1faa76b1be70c0478e0e76aa16b05e
Diffstat (limited to 'uui/source')
-rw-r--r-- | uui/source/passworddlg.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/uui/source/passworddlg.cxx b/uui/source/passworddlg.cxx index 4831bd38df28..bcba73ef1b26 100644 --- a/uui/source/passworddlg.cxx +++ b/uui/source/passworddlg.cxx @@ -73,7 +73,9 @@ PasswordDialog::PasswordDialog(vcl::Window* _pParent, sal_uInt16 nStrId = bOpenToModify ? STR_ENTER_PASSWORD_TO_MODIFY : STR_ENTER_PASSWORD_TO_OPEN; OUString aMessage(ResId(nStrId, *pResourceMgr).toString()); - aMessage += INetURLObject(aDocURL).GetMainURL(INetURLObject::DECODE_UNAMBIGUOUS); + INetURLObject url(aDocURL); + aMessage += url.HasError() + ? aDocURL : url.GetMainURL(INetURLObject::DECODE_UNAMBIGUOUS); m_pFTPassword->SetText(aMessage); if (bIsSimplePasswordRequest) |