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

Noel Grandin noel at peralex.com
Thu Dec 12 03:32:33 PST 2013


 editeng/source/editeng/eehtml.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1114d9275950b69c1667435793bac7d77147476b
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Dec 12 13:31:40 2013 +0200

    fix OUString simplify
    
    In my commit fb847101519ad74c02183672c04ebf1d700aae83
    "simplify - use OUString::startsWith where possible"
    
    I incorrectly converted
     if ( !aURL.isEmpty() && ( aURL[ 0 ] != '#' ) )
    to
     if ( aURL.startsWith("#") )
    
    Change-Id: I7fa3a814e13724dc65821e09c03db898b92626ec

diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx
index f09f9fd..d44c937 100644
--- a/editeng/source/editeng/eehtml.cxx
+++ b/editeng/source/editeng/eehtml.cxx
@@ -783,7 +783,7 @@ void EditHTMLParser::AnchorStart()
         if ( !aRef.isEmpty() )
         {
             OUString aURL = aRef;
-            if ( aURL.startsWith("#") )
+            if ( !aURL.isEmpty() && ( aURL[ 0 ] != '#' ) )
             {
                 INetURLObject aTargetURL;
                 INetURLObject aRootURL( aBaseURL );


More information about the Libreoffice-commits mailing list