]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetvspace.C
* BufferParams:
[lyx.git] / src / insets / insetvspace.C
index afb221aff28cc25295def2fab9f87d1cf48b3e06..789b75c585f5be64795cb03464d492cd411bea1d 100644 (file)
@@ -22,6 +22,7 @@
 #include "lyxlex.h"
 #include "lyxtext.h"
 #include "metricsinfo.h"
+#include "outputparams.h"
 
 #include "frontends/FontMetrics.h"
 #include "frontends/Painter.h"
@@ -87,7 +88,7 @@ void InsetVSpace::read(Buffer const &, LyXLex & lex)
        BOOST_ASSERT(lex.isOK());
        string vsp;
        lex >> vsp;
-       if (lex)
+       if (lex.isOK())
                space_ = VSpace(vsp);
 
        string end_token;
@@ -202,7 +203,7 @@ void InsetVSpace::draw(PainterInfo & pi, int x, int y) const
 
 
 int InsetVSpace::latex(Buffer const & buf, odocstream & os,
-                         OutputParams const &) const
+                       OutputParams const &) const
 {
        os << from_ascii(space_.asLatexCommand(buf.params())) << '\n';
        return 1;
@@ -210,15 +211,15 @@ int InsetVSpace::latex(Buffer const & buf, odocstream & os,
 
 
 int InsetVSpace::plaintext(Buffer const &, odocstream & os,
-                          OutputParams const &) const
+                           OutputParams const &) const
 {
        os << "\n\n";
-       return 2;
+       return PLAINTEXT_NEWLINE;
 }
 
 
 int InsetVSpace::docbook(Buffer const &, odocstream & os,
-                        OutputParams const &) const
+                         OutputParams const &) const
 {
        os << '\n';
        return 1;
@@ -256,7 +257,7 @@ void InsetVSpaceMailer::string2params(string const & in, VSpace & vspace)
 
        string vsp;
        lex >> vsp;
-       if (lex)
+       if (lex.isOK())
                vspace = VSpace(vsp);
 }