diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-02-04 15:06:48 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-02-04 15:06:48 +0100 |
commit | dda9037e4123abe5d6faf3b19c1a7061189c1354 (patch) | |
tree | 4f0bed3a7f1630cec581ef3f8b4c10cedfc83856 /cui | |
parent | e0e82c6d12938d3eb4ff63589980a781365640c7 (diff) |
As the comment says, "news:// is nonsense" here
It was introduced in the orginal commit 4d3148e0b7ee607de9c86e9e9aa79e9cd423f1f1
"CWS-TOOLING: integrate CWS mba32issues01" but for copletely unclear reasons.
It looks like it serves as a placeholder for those "unknown-URI-scheme" cases
that shall go to RID_SVXPAGE_HYPERLINK_DOCUMENT, but for a news:// URI it would
make more sense to go to RID_SVXPAGE_HYPERLINK_MAIL anyway. (Note that
INetURLObject only supports RFC 1738 news URIs that cannot have an authority
part, not RFC 5538 ones that allow for an optional authority part.)
Change-Id: I5db76fc2a733d0c334e24fecb9d7078bedbdbe08
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/cuihyperdlg.cxx | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx index 1421e1442802..de58b79976d7 100644 --- a/cui/source/dialogs/cuihyperdlg.cxx +++ b/cui/source/dialogs/cuihyperdlg.cxx @@ -287,21 +287,12 @@ sal_uInt16 SvxHpLinkDlg::SetPage ( SvxHyperlinkItem* pItem ) nPageId = RID_SVXPAGE_HYPERLINK_MAIL; break; default : - sal_Char const sNewsSrvScheme[] = "news://"; - // TODO news:// is nonsense - - if (aStrURL.startsWith(sNewsSrvScheme)) + if (aStrURL.startsWith("#")) nPageId = RID_SVXPAGE_HYPERLINK_DOCUMENT; else { - sal_Char const sHash[] = "#"; - if (aStrURL.startsWith(sHash)) - nPageId = RID_SVXPAGE_HYPERLINK_DOCUMENT; - else - { - eProtocolTyp = INET_PROT_NOT_VALID; - nPageId = GetCurPageId(); - } + eProtocolTyp = INET_PROT_NOT_VALID; + nPageId = GetCurPageId(); } break; } |