]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetline.C
* In the process of fixing the math background color bug, this commit transfer backgr...
[lyx.git] / src / insets / insetline.C
index 87f0de3d202ef36836d8be2cb7f050172f657e7b..de2b9996a17f342f1da8871eaadaa6df49667ff2 100644 (file)
@@ -42,12 +42,14 @@ void InsetLine::write(Buffer const &, ostream & os) const
 }
 
 
-void InsetLine::metrics(MetricsInfo & mi, Dimension & dim) const
+bool InsetLine::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        dim.asc = 3;
        dim.des = 3;
        dim.wid = mi.base.textwidth;
+       bool const changed = dim_ != dim;
        dim_ = dim;
+       return changed;
 }
 
 
@@ -59,7 +61,7 @@ void InsetLine::draw(PainterInfo & pi, int x, int y) const
 
 
 int InsetLine::latex(Buffer const &, odocstream & os,
-                       OutputParams const & runparams) const
+                     OutputParams const & runparams) const
 {
        os << "\\lyxline{\\"
           << from_ascii(runparams.local_font->latexSize()) << '}';
@@ -68,10 +70,10 @@ int InsetLine::latex(Buffer const &, odocstream & os,
 
 
 int InsetLine::plaintext(Buffer const &, odocstream & os,
-                    OutputParams const &) const
+                         OutputParams const &) const
 {
-       os << "-------------------------------------------";
-       return 0;
+       os << "\n-------------------------------------------\n";
+       return PLAINTEXT_NEWLINE;
 }