]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetLine.cpp
Restore XHTML output for InsetLine.
[lyx.git] / src / insets / InsetLine.cpp
index f34ae4259c09f52ec0ecf879dcb16766aab4103c..b2fc3b6ab0e8ea9d5ddcb1205c741dcbce8ac98b 100644 (file)
@@ -3,7 +3,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author André Pönitz
+ * \author André Pönitz
  *
  * Full author contact details are available in file CREDITS.
  */
 
 #include "InsetLine.h"
 
-#include "debug.h"
 #include "Dimension.h"
 #include "Font.h"
-#include "MetricsInfo.h"
 #include "LaTeXFeatures.h"
+#include "MetricsInfo.h"
 #include "OutputParams.h"
+#include "output_xhtml.h"
 #include "Text.h"
 
+#include "frontends/Painter.h"
+
+#include "support/debug.h"
 #include "support/docstream.h"
 
-#include "frontends/Painter.h"
 
 
+using namespace std;
+
 namespace lyx {
 
 using frontend::Painter;
 
-using std::ostream;
 
-
-void InsetLine::read(Buffer const &, Lexer &)
+void InsetLine::read(Lexer &)
 {
        /* Nothing to read */
 }
 
 
-void InsetLine::write(Buffer const &, ostream & os) const
+void InsetLine::write(ostream & os) const
 {
        os << "\n\\lyxline\n";
 }
@@ -62,8 +64,7 @@ void InsetLine::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-int InsetLine::latex(Buffer const &, odocstream & os,
-                    OutputParams const & runparams) const
+int InsetLine::latex(odocstream & os, OutputParams const & runparams) const
 {
        os << "\\lyxline{\\"
           << from_ascii(runparams.local_font->latexSize()) << '}';
@@ -71,22 +72,28 @@ int InsetLine::latex(Buffer const &, odocstream & os,
 }
 
 
-int InsetLine::plaintext(Buffer const &, odocstream & os,
-                        OutputParams const &) const
+int InsetLine::plaintext(odocstream & os, OutputParams const &) const
 {
        os << "\n-------------------------------------------\n";
        return PLAINTEXT_NEWLINE;
 }
 
 
-int InsetLine::docbook(Buffer const &, odocstream & os,
-                      OutputParams const &) const
+int InsetLine::docbook(odocstream & os, OutputParams const &) const
 {
        os << '\n';
        return 0;
 }
 
 
+docstring InsetLine::xhtml(XHTMLStream & xs, OutputParams const &) const
+{
+       xs << CompTag("hr");
+       xs.cr();
+       return docstring();
+}
+
+
 void InsetLine::validate(LaTeXFeatures & features) const
 {
        features.require("lyxline");