]> git.lyx.org Git - lyx.git/blobdiff - src/insets/inseturl.C
* In the process of fixing the math background color bug, this commit transfer backgr...
[lyx.git] / src / insets / inseturl.C
index 4bd7f5765a8d581e512c828af431d7aafdd426ab..eb67e6e11775676ceec5706b602e2a0364651c58 100644 (file)
@@ -58,7 +58,7 @@ docstring const InsetUrl::getScreenLabel(Buffer const &) const
 
 
 int InsetUrl::latex(Buffer const &, odocstream & os,
-                   OutputParams const & runparams) const
+                    OutputParams const & runparams) const
 {
        docstring const & name = getParam("name");
        if (!name.empty())
@@ -71,19 +71,24 @@ int InsetUrl::latex(Buffer const &, odocstream & os,
 
 
 int InsetUrl::plaintext(Buffer const &, odocstream & os,
-                   OutputParams const &) const
+                        OutputParams const &) const
 {
-       os << '[' << getParam("target");
+       odocstringstream oss;
+
+       oss << '[' << getParam("target");
        if (getParam("name").empty())
-               os << ']';
+               oss << ']';
        else
-               os << "||" << getParam("name") << ']';
-       return 0;
+               oss << "||" << getParam("name") << ']';
+
+       docstring const str = oss.str();
+       os << str;
+       return str.size();
 }
 
 
 int InsetUrl::docbook(Buffer const &, odocstream & os,
-                     OutputParams const &) const
+                      OutputParams const &) const
 {
        os << "<ulink url=\"" 
           << subst(getParam("target"), from_ascii("&"), from_ascii("&amp;"))