summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-01-18 14:00:44 +0100
committerMike Kaganski <mike.kaganski@collabora.com>2022-01-18 17:49:02 +0100
commita8795a983b48ed7b9820b746fb70c173a7d230b1 (patch)
treebe38510427753294bebcdf4fbf06d74c28043b30 /cui/source
parent21215562cde2378245a3641457c00e5fad82981a (diff)
Use "smart" INetURLObject ctor for user input right away
... instead of trying to process it strict, falling back to smart processing on error. Similar change was implemented to SvxHyperlinkInternetTp in commit 6b973753d407d66dfa5fda86547246c486ab7087. Trying to parse it strict initially there resulted in wrong detection of "generic" protocol in incomplete URLs missing scheme and having port. This change simply unifies the code, no specific behavior change intended. Change-Id: I48ba4187a27644f42f3fd5a3b6cd77e55038cb0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128534 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/dialogs/hlmailtp.cxx8
1 files changed, 1 insertions, 7 deletions
diff --git a/cui/source/dialogs/hlmailtp.cxx b/cui/source/dialogs/hlmailtp.cxx
index 521af033b422..f02a8f7653ee 100644
--- a/cui/source/dialogs/hlmailtp.cxx
+++ b/cui/source/dialogs/hlmailtp.cxx
@@ -120,13 +120,7 @@ void SvxHyperlinkMailTp::GetCurentItemData ( OUString& rStrURL, OUString& aStrNa
OUString SvxHyperlinkMailTp::CreateAbsoluteURL() const
{
OUString aStrURL = m_xCbbReceiver->get_active_text();
- INetURLObject aURL(aStrURL);
-
- if( aURL.GetProtocol() == INetProtocol::NotValid )
- {
- aURL.SetSmartProtocol( INetProtocol::Mailto );
- aURL.SetSmartURL(aStrURL);
- }
+ INetURLObject aURL(aStrURL, INetProtocol::Mailto);
// subject for EMail-url
if( aURL.GetProtocol() == INetProtocol::Mailto )