*
* \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 "dispatchresult.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"
+#include "outputparams.h"
-using std::ostream;
-
-
-InsetUrl::InsetUrl(InsetCommandParams const & p)
- : InsetCommand(p)
-{}
-
+#include "support/lstrings.h"
-// InsetUrl::InsetUrl(InsetCommandParams const & p, bool)
-// : InsetCommand(p, false)
-// {}
+#include "support/std_ostream.h"
+using lyx::support::subst;
-InsetUrl::~InsetUrl()
-{
- InsetCommandMailer("url", *this).hideDialog();
-}
+using std::string;
+using std::ostream;
-dispatch_result InsetUrl::localDispatch(FuncRequest const & cmd)
-{
- switch (cmd.action) {
- case LFUN_INSET_EDIT:
- InsetCommandMailer("url", *this).showDialog(cmd.view());
- return DISPATCHED;
- default:
- return InsetCommand::localDispatch(cmd);
- }
-}
+InsetUrl::InsetUrl(InsetCommandParams const & p)
+ : InsetCommand(p, "url")
+{}
-string const InsetUrl::getScreenLabel(Buffer const *) const
+string const InsetUrl::getScreenLabel(Buffer const &) const
{
string temp;
if (getCmdName() == "url")
}
-int InsetUrl::latex(Buffer const *, ostream & os,
- LatexRunParams const & runparams) const
+int InsetUrl::latex(Buffer const &, ostream & os,
+ OutputParams const & runparams) const
{
if (!getOptions().empty())
os << getOptions() + ' ';
}
-int InsetUrl::ascii(Buffer const *, ostream & os, int) const
+int InsetUrl::plaintext(Buffer const &, ostream & os,
+ OutputParams const &) const
{
if (getOptions().empty())
os << '[' << getContents() << ']';
}
-int InsetUrl::linuxdoc(Buffer const *, ostream & os) const
+int InsetUrl::linuxdoc(Buffer const &, ostream & os,
+ OutputParams const &) const
{
os << '<' << getCmdName()
<< " url=\"" << getContents() << "\""
}
-int InsetUrl::docbook(Buffer const *, ostream & os, bool) const
+int InsetUrl::docbook(Buffer const &, ostream & os,
+ OutputParams const &) const
{
os << "<ulink url=\"" << subst(getContents(),"&","&")
<< "\">" << getOptions() << "</ulink>";