]> git.lyx.org Git - features.git/commitdiff
Fix concatenation bug introduced in rev 21363 and simplify the code a bit.
authorAbdelrazak Younes <younes@lyx.org>
Fri, 2 Nov 2007 13:56:46 +0000 (13:56 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Fri, 2 Nov 2007 13:56:46 +0000 (13:56 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21370 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetHyperlink.cpp

index 55058dffa3ad7532a40c798d196cded2599506af..d38509b60e7943527ed7b3a3cfb0df960d8337c1 100644 (file)
@@ -120,18 +120,13 @@ int InsetHyperlink::latex(Buffer const &, odocstream & os,
 
        }  // end if (!name.empty())
        
-       //for the case there is no name given, the target is set as name
-       docstring const urlname = url;
-       // set the hyperlink type
-       url += getParam("type");
-
        if (runparams.moving_arg)
                os << "\\protect";
-       //set the target for the name when no name is given
-       if (!name.empty())
-               os << "\\href{" << url << "}{" << name << '}';
-       else
-               os << "\\href{" << url << "}{" << urlname << '}';
+
+       //for the case there is no name given, the target is set as name
+       os << "\\href{" << getParam("type") << url << "}{"
+               << (name.empty()? url : name) << '}';
+
        return 0;
 }