int InsetCommand::latex(Buffer const &, odocstream & os,
- OutputParams const &) const
+ OutputParams const &) const
{
os << getCommand();
return 0;
int InsetCommand::plaintext(Buffer const &, odocstream &,
- OutputParams const &) const
+ OutputParams const &) const
{
return 0;
}
int InsetCommand::docbook(Buffer const &, odocstream &,
- OutputParams const &) const
+ OutputParams const &) const
{
return 0;
}
virtual void read(Buffer const &, LyXLex & lex)
{ p_.read(lex); }
///
- virtual int latex(Buffer const &, odocstream &,
- OutputParams const &) const;
+ int latex(Buffer const &, odocstream &, OutputParams const &) const;
///
- int plaintext(Buffer const &, odocstream &,
- OutputParams const &) const;
+ int plaintext(Buffer const &, odocstream &, OutputParams const &) const;
///
- virtual int docbook(Buffer const &, odocstream &,
- OutputParams const & runparams) const;
+ int docbook(Buffer const &, odocstream &, OutputParams const & runparams) const;
///
InsetBase::Code lyxCode() const { return InsetBase::NO_CODE; }
#include "LColor.h"
#include "lyxtext.h"
#include "metricsinfo.h"
+#include "outputparams.h"
#include "TextMetrics.h"
#include "frontends/FontMetrics.h"
int InsetPagebreak::latex(Buffer const &, odocstream & os,
- OutputParams const &) const
+ OutputParams const &) const
{
os << from_ascii(getCmdName()) << "{}";
return 0;
int InsetPagebreak::plaintext(Buffer const &, odocstream & os,
- OutputParams const &) const
+ OutputParams const & runparams) const
{
os << '\n';
- return 0;
+ return runparams.linelen;
}
int InsetPagebreak::docbook(Buffer const &, odocstream & os,
- OutputParams const &) const
+ OutputParams const &) const
{
os << '\n';
return 0;
void draw(PainterInfo & pi, int x, int y) const;
- virtual int latex(Buffer const &, odocstream &,
- OutputParams const &) const;
+ int latex(Buffer const &, odocstream &,
+ OutputParams const &) const;
int plaintext(Buffer const &, odocstream &,
- OutputParams const &) const;
+ OutputParams const &) const;
int docbook(Buffer const &, odocstream &,
- OutputParams const &) const;
+ OutputParams const &) const;
void read(Buffer const &, LyXLex & lex);
int InsetRef::latex(Buffer const &, odocstream & os,
- OutputParams const &) const
+ OutputParams const &) const
{
// Don't output p_["name"], this is only used in docbook
InsetCommandParams p(getCmdName());
int InsetRef::plaintext(Buffer const &, odocstream & os,
- OutputParams const &) const
+ OutputParams const &) const
{
- os << '[' << getParam("reference") << ']';
- return 0;
+ docstring str = getParam("reference");
+ os << '[' << str << ']';
+ return 2 + str.size();
}
int InsetRef::docbook(Buffer const & buf, odocstream & os,
- OutputParams const & runparams) const
+ OutputParams const & runparams) const
{
docstring const & name = getParam("name");
if (name.empty()) {