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;
|
nPageId = RID_SVXPAGE_HYPERLINK_MAIL;
|
||||||
break;
|
break;
|
||||||
default :
|
default :
|
||||||
sal_Char const sNewsSrvScheme[] = "news://";
|
if (aStrURL.startsWith("#"))
|
||||||
// TODO news:// is nonsense
|
|
||||||
|
|
||||||
if (aStrURL.startsWith(sNewsSrvScheme))
|
|
||||||
nPageId = RID_SVXPAGE_HYPERLINK_DOCUMENT;
|
nPageId = RID_SVXPAGE_HYPERLINK_DOCUMENT;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sal_Char const sHash[] = "#";
|
eProtocolTyp = INET_PROT_NOT_VALID;
|
||||||
if (aStrURL.startsWith(sHash))
|
nPageId = GetCurPageId();
|
||||||
nPageId = RID_SVXPAGE_HYPERLINK_DOCUMENT;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
eProtocolTyp = INET_PROT_NOT_VALID;
|
|
||||||
nPageId = GetCurPageId();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user