void InsetNewline::write(Buffer const &, ostream & os) const
{
- os << "\n\\newline \n";
+ os << "\n\\newline\n";
}
int InsetNewline::latex(Buffer const &, ostream &,
- LatexRunParams const &) const
+ OutputParams const &) const
{
lyxerr << "Eek, calling InsetNewline::latex !" << endl;
return 0;
}
-int InsetNewline::ascii(Buffer const &, ostream & os, int) const
+int InsetNewline::plaintext(Buffer const &, ostream & os,
+ OutputParams const &) const
{
os << '\n';
return 0;
}
-int InsetNewline::linuxdoc(Buffer const &, std::ostream & os) const
+int InsetNewline::linuxdoc(Buffer const &, std::ostream & os,
+ OutputParams const &) const
{
os << '\n';
return 0;
}
-int InsetNewline::docbook(Buffer const &, std::ostream & os, bool) const
+int InsetNewline::docbook(Buffer const &, std::ostream & os,
+ OutputParams const &) const
{
os << '\n';
return 0;
int const wid = font_metrics::width('n', pi.base.font);
int const asc = font_metrics::maxAscent(pi.base.font);
- // hack, and highly dubious
- lyx::pos_type pos = ownerPar(*pi.base.bv->buffer(), this)
- .getPositionOfInset(this);
- bool const ltr_pos = (pi.base.bv->text->bidi_level(pos) % 2 == 0);
-
int xp[3];
int yp[3];
yp[1] = int(y - 0.500 * asc * 0.75);
yp[2] = int(y - 0.125 * asc * 0.75);
- if (ltr_pos) {
+ if (pi.ltr_pos) {
xp[0] = int(x + wid * 0.375);
xp[1] = int(x);
xp[2] = int(x + wid * 0.375);
yp[1] = int(y - 0.500 * asc * 0.75);
yp[2] = int(y - asc * 0.75);
- if (ltr_pos) {
+ if (pi.ltr_pos) {
xp[0] = int(x);
xp[1] = int(x + wid);
xp[2] = int(x + wid);
pi.pain.lines(xp, yp, 3, LColor::eolmarker);
}
+
+
+bool InsetNewline::isSpace() const
+{
+ return true;
+}