]> git.lyx.org Git - lyx.git/blobdiff - src/insets/inseturl.C
Enable convertDefault.sh to run even if its executable bit is not set.
[lyx.git] / src / insets / inseturl.C
index 56f85717ef69878044cbbb28dec0cf47e61f4d34..c60b5f620bbf10421ddc6b2c6df4dd64a3657239 100644 (file)
@@ -5,7 +5,7 @@
  *
  * \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 "funcrequest.h"
 #include "BufferView.h"
 #include "LaTeXFeatures.h"
+#include "latexrunparams.h"
 #include "frontends/LyXView.h"
 #include "debug.h"
 #include "frontends/Dialogs.h"
 #include "support/lstrings.h"
 #include "gettext.h"
 
+using namespace lyx::support;
+
 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 +54,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 +78,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 +100,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 +110,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>";