As the comment says, "news:// is nonsense" here
It was introduced in the orginal commit 4d3148e0b7
"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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user