]> git.lyx.org Git - lyx.git/blobdiff - src/insets/inseturl.C
ws changes only
[lyx.git] / src / insets / inseturl.C
index 56f85717ef69878044cbbb28dec0cf47e61f4d34..5fcd8ef1c1ea50bc90db2e7e20db5de48d1775f5 100644 (file)
@@ -5,29 +5,38 @@
  *
  * \author José Matos
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
 
 #include "inseturl.h"
+
 #include "funcrequest.h"
-#include "BufferView.h"
+#include "latexrunparams.h"
 #include "LaTeXFeatures.h"
-#include "frontends/LyXView.h"
-#include "debug.h"
-#include "frontends/Dialogs.h"
-#include "support/lstrings.h"
 #include "gettext.h"
 
+#include "support/lstrings.h"
+
+#include "support/std_ostream.h"
+
+using lyx::support::subst;
+
+using std::string;
 using std::ostream;
 
 
-InsetUrl::InsetUrl(InsetCommandParams const & p, bool)
+InsetUrl::InsetUrl(InsetCommandParams const & p)
                : InsetCommand(p)
 {}
 
 
+// InsetUrl::InsetUrl(InsetCommandParams const & p, bool)
+//             : InsetCommand(p, false)
+// {}
+
+
 InsetUrl::~InsetUrl()
 {
        InsetCommandMailer("url", *this).hideDialog();
@@ -46,7 +55,7 @@ dispatch_result InsetUrl::localDispatch(FuncRequest const & cmd)
 }
 
 
-string const InsetUrl::getScreenLabel(Buffer const *) const
+string const InsetUrl::getScreenLabel(Buffer const &) const
 {
        string temp;
        if (getCmdName() == "url")
@@ -70,19 +79,19 @@ string const InsetUrl::getScreenLabel(Buffer const *) const
 }
 
 
-int InsetUrl::latex(Buffer const *, ostream & os,
-                   bool fragile, bool /*free_spc*/) const
+int InsetUrl::latex(Buffer const &, ostream & os,
+                   LatexRunParams const & runparams) const
 {
        if (!getOptions().empty())
                os << getOptions() + ' ';
-       if (fragile)
+       if (runparams.moving_arg)
                os << "\\protect";
        os << "\\url{" << getContents() << '}';
        return 0;
 }
 
 
-int InsetUrl::ascii(Buffer const *, ostream & os, int) const
+int InsetUrl::ascii(Buffer const &, ostream & os, int) const
 {
        if (getOptions().empty())
                os << '[' << getContents() << ']';
@@ -92,7 +101,7 @@ int InsetUrl::ascii(Buffer const *, ostream & os, int) const
 }
 
 
-int InsetUrl::linuxdoc(Buffer const *, ostream & os) const
+int InsetUrl::linuxdoc(Buffer const &, ostream & os) const
 {
        os << '<' << getCmdName()
           << " url=\""  << getContents() << "\""
@@ -102,7 +111,7 @@ int InsetUrl::linuxdoc(Buffer const *, ostream & os) const
 }
 
 
-int InsetUrl::docbook(Buffer const *, ostream & os, bool) const
+int InsetUrl::docbook(Buffer const &, ostream & os, bool) const
 {
        os << "<ulink url=\"" << subst(getContents(),"&","&amp;")
           << "\">" << getOptions() << "</ulink>";