X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetLine.cpp;h=515efbba4f50931ec144fbeb11a7285435e811c6;hb=bfddee97e191a853f0576f4fab3f095c4e9ce0de;hp=d2908cb1c132eca76e4aac6614a433ea4de7db42;hpb=c5b9664476770aad788572fd4a16ec89ca4382ab;p=lyx.git diff --git a/src/insets/InsetLine.cpp b/src/insets/InsetLine.cpp index d2908cb1c1..515efbba4f 100644 --- a/src/insets/InsetLine.cpp +++ b/src/insets/InsetLine.cpp @@ -15,6 +15,7 @@ #include "InsetLine.h" #include "Buffer.h" +#include "Cursor.h" #include "Dimension.h" #include "DispatchResult.h" #include "FuncRequest.h" @@ -42,7 +43,7 @@ using frontend::Painter; InsetLine::InsetLine(Buffer * buf, InsetCommandParams const & p) - : InsetCommand(buf, p, "line") + : InsetCommand(buf, p) {} @@ -76,6 +77,7 @@ void InsetLine::doDispatch(Cursor & cur, FuncRequest & cmd) cur.noScreenUpdate(); break; } + cur.recordUndo(); setParams(p); break; } @@ -159,7 +161,7 @@ void InsetLine::draw(PainterInfo & pi, int x, int y) const } -int InsetLine::latex(odocstream & os, OutputParams const &) const +void InsetLine::latex(otexstream & os, OutputParams const &) const { bool have_offset = true; Length offset_len = Length(to_ascii(getParam("offset"))); @@ -178,8 +180,6 @@ int InsetLine::latex(odocstream & os, OutputParams const &) const if (have_offset) os << "[" << from_ascii(offset) << "]"; os << "{" << from_ascii(width) << "}{" << from_ascii(height) << '}'; - - return 0; } @@ -199,8 +199,7 @@ int InsetLine::docbook(odocstream & os, OutputParams const &) const docstring InsetLine::xhtml(XHTMLStream & xs, OutputParams const &) const { - xs << html::CompTag("hr"); - xs.cr(); + xs << html::CompTag("hr") << html::CR(); return docstring(); }