[Libreoffice-commits] core.git: cui/source

Stephan Bergmann sbergman at redhat.com
Tue Feb 4 06:12:00 PST 2014


 cui/source/dialogs/cuihyperdlg.cxx |   15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

New commits:
commit dda9037e4123abe5d6faf3b19c1a7061189c1354
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Feb 4 15:06:48 2014 +0100

    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

diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx
index 1421e14..de58b79 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;
     }


More information about the Libreoffice-commits mailing list