]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetNewpage.cpp
Restore XHTML output for InsetListings.
[lyx.git] / src / insets / InsetNewpage.cpp
index fae6d699a4e250ac075f230b11bc8073a2d36d42..35c5b0a5acac17f46bdf9f7bd81a65c120fe2e6d 100644 (file)
@@ -3,8 +3,8 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author André Pönitz
- * \author Jürgen Spitzmüller
+ * \author André Pönitz
+ * \author Jürgen Spitzmüller
  *
  * Full author contact details are available in file CREDITS.
  */
@@ -18,6 +18,7 @@
 #include "Lexer.h"
 #include "MetricsInfo.h"
 #include "OutputParams.h"
+#include "output_xhtml.h"
 #include "Text.h"
 #include "TextMetrics.h"
 
@@ -34,12 +35,12 @@ using namespace std;
 
 namespace lyx {
 
-InsetNewpage::InsetNewpage()
+       InsetNewpage::InsetNewpage() : Inset(0)
 {}
 
 
 InsetNewpage::InsetNewpage(InsetNewpageParams const & params)
-       : params_(params)
+       : Inset(0), params_(params)
 {}
 
 
@@ -79,8 +80,6 @@ void InsetNewpageParams::read(Lexer & lex)
                kind = InsetNewpageParams::CLEARDOUBLEPAGE;
        else
                lex.printError("Unknown kind");
-
-       lex >> "\\end_inset";
 }
 
 
@@ -94,6 +93,7 @@ void InsetNewpage::write(ostream & os) const
 void InsetNewpage::read(Lexer & lex)
 {
        params_.read(lex);
+       lex >> "\\end_inset";
 }
 
 
@@ -248,6 +248,13 @@ int InsetNewpage::docbook(odocstream & os, OutputParams const &) const
 }
 
 
+docstring InsetNewpage::xhtml(XHTMLStream & xs, OutputParams const &) const
+{
+       xs << CompTag("br");
+       return docstring();
+}
+
+
 docstring InsetNewpage::contextMenu(BufferView const &, int, int) const
 {
        return from_ascii("context-newpage");