Kaydet (Commit) 9bcc09dc authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Gracefully handle URLs INetURLObject refuses to parse

Change-Id: Id4d09dd32a1faa76b1be70c0478e0e76aa16b05e
üst ac4cfb4c
...@@ -73,7 +73,9 @@ PasswordDialog::PasswordDialog(vcl::Window* _pParent, ...@@ -73,7 +73,9 @@ PasswordDialog::PasswordDialog(vcl::Window* _pParent,
sal_uInt16 nStrId = bOpenToModify ? STR_ENTER_PASSWORD_TO_MODIFY : STR_ENTER_PASSWORD_TO_OPEN; sal_uInt16 nStrId = bOpenToModify ? STR_ENTER_PASSWORD_TO_MODIFY : STR_ENTER_PASSWORD_TO_OPEN;
OUString aMessage(ResId(nStrId, *pResourceMgr).toString()); 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); m_pFTPassword->SetText(aMessage);
if (bIsSimplePasswordRequest) if (bIsSimplePasswordRequest)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment