]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetNewline.cpp
Remove all BufferParam arguments in InsetXXX methods (since insets know about their...
[lyx.git] / src / insets / InsetNewline.cpp
index b94dd25dbc7234492a627f8ebfc89f60ace6e355..9ee9f4b8627364057025d9331c9960d5b560d414 100644 (file)
@@ -4,7 +4,7 @@
  * Licence details can be found in the file COPYING.
  *
  * \author John Levon
- * \author Jürgen Spitzmüller
+ * \author Jürgen Spitzmüller
  *
  * Full author contact details are available in file CREDITS.
  */
@@ -61,7 +61,6 @@ void InsetNewlineParams::read(Lexer & lex)
                kind = InsetNewlineParams::LINEBREAK;
        else
                lex.printError("Unknown kind: `$$Token'");
-       lex >> "\\end_inset";
 }
 
 
@@ -75,6 +74,7 @@ void InsetNewline::write(ostream & os) const
 void InsetNewline::read(Lexer & lex)
 {
        params_.read(lex);
+       lex >> "\\end_inset";
 }
 
 
@@ -133,10 +133,9 @@ ColorCode InsetNewline::ColorName() const
                case InsetNewlineParams::LINEBREAK:
                        return Color_pagebreak;
                        break;
-               default:
-                       return Color_eolmarker;
-                       break;
        }
+       // not really useful, but to avoids gcc complaints
+       return Color_eolmarker;
 }
 
 
@@ -174,6 +173,13 @@ int InsetNewline::docbook(odocstream & os, OutputParams const &) const
 }
 
 
+docstring InsetNewline::xhtml(odocstream & os, OutputParams const &) const
+{
+       os << "<br />\n";
+       return docstring();
+}
+
+
 void InsetNewline::draw(PainterInfo & pi, int x, int y) const
 {
        FontInfo font;