]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetLine.cpp
tex2lyx/text.cpp: fix typos
[lyx.git] / src / insets / InsetLine.cpp
index 5c12d37e09539a23430ffc21be0020fd3d4eaf9d..86a7e5cd056c96e58c5c82caa4373f9984394a3c 100644 (file)
@@ -77,6 +77,7 @@ void InsetLine::doDispatch(Cursor & cur, FuncRequest & cmd)
                        cur.noScreenUpdate();
                        break;
                }
+               cur.recordUndo();
                setParams(p);
                break;
        }
@@ -120,7 +121,7 @@ void InsetLine::metrics(MetricsInfo & mi, Dimension & dim) const
        dim.wid = max(minw, max(dim.wid, -dim.wid));
 
        Length height = Length(to_ascii(getParam("height")));
-       height_ = height.inPixels(dim.height(), fm.width(char_type('M')));
+       height_ = height.inPixels(max_width, fm.width(char_type('M')));
 
        // get the length of the parameters in pixels
        Length offset = Length(to_ascii(getParam("offset")));
@@ -160,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")));
@@ -179,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;
 }
 
 
@@ -200,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();
 }