]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetHyperlink.cpp
* Inset: Prepare for an eventual merge of updateLabels() and addToToc()
[lyx.git] / src / insets / InsetHyperlink.cpp
index d38509b60e7943527ed7b3a3cfb0df960d8337c1..908ddd1337c099e35bfc2b97cb58a427ebf0e4e5 100644 (file)
 #include "DispatchResult.h"
 #include "FuncRequest.h"
 #include "LaTeXFeatures.h"
-#include "gettext.h"
+#include "support/gettext.h"
 #include "OutputParams.h"
 
 #include "support/lstrings.h"
 #include "support/docstream.h"
 
-using std::string;
-using std::find;
-using std::replace;
+using namespace std;
+using namespace lyx::support;
 
 namespace lyx {
 
-using support::subst;
-
 
 InsetHyperlink::InsetHyperlink(InsetCommandParams const & p)
        : InsetCommand(p, "href")
@@ -100,7 +97,7 @@ int InsetHyperlink::latex(Buffer const &, odocstream & os,
                for (size_t i = 0, pos;
                        (pos = name.find('\\', i)) != string::npos;
                        i = pos + 2) {
-                       if      (name[pos + 1] != '\\')
+                       if (name[pos + 1] != '\\')
                                name.replace(pos, 1, textbackslash);
                }
                for (int k = 0; k < 6; k++) {
@@ -113,7 +110,7 @@ int InsetHyperlink::latex(Buffer const &, odocstream & os,
                // replace the tilde by the \sim character as suggested in the LaTeX FAQ
                // for URLs
                docstring const sim = from_ascii("$\\sim$");
-               for (int i = 0, pos;
+               for (size_t i = 0, pos;
                        (pos = name.find('~', i)) != string::npos;
                        i = pos + 1)
                        name.replace(pos, 1, sim);
@@ -160,10 +157,9 @@ int InsetHyperlink::docbook(Buffer const &, odocstream & os,
 }
 
 
-int InsetHyperlink::textString(Buffer const & buf, odocstream & os,
-                      OutputParams const & op) const
+void InsetHyperlink::textString(Buffer const & buf, odocstream & os) const
 {
-       return plaintext(buf, os, op);
+       plaintext(buf, os, OutputParams(0));
 }