]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetSeparator.cpp
New DocBook support
[lyx.git] / src / insets / InsetSeparator.cpp
index 27aeb7c62b6240eb922147777331520c23c30aef..b588b3943994abb17ba1d913e094d03af55ed849 100644 (file)
@@ -9,6 +9,7 @@
  */
 
 #include <config.h>
+#include <output_docbook.h>
 
 #include "InsetSeparator.h"
 
@@ -20,6 +21,7 @@
 #include "MetricsInfo.h"
 #include "OutputParams.h"
 #include "output_xhtml.h"
+#include "texstream.h"
 
 #include "frontends/Application.h"
 #include "frontends/FontMetrics.h"
@@ -135,7 +137,7 @@ ColorCode InsetSeparator::ColorName() const
 }
 
 
-void InsetSeparator::latex(otexstream & os, OutputParams const &) const
+void InsetSeparator::latex(otexstream & os, OutputParams const & runparams) const
 {
        // Do nothing if a paragraph break was just output
        if (!os.afterParbreak()) {
@@ -145,7 +147,10 @@ void InsetSeparator::latex(otexstream & os, OutputParams const &) const
                                break;
                        case InsetSeparatorParams::PARBREAK:
                        case InsetSeparatorParams::LATEXPAR:
-                               os << breakln << "\n";
+                               if (runparams.inDeletedInset)
+                                       os << breakln << "}\n\n{";
+                               else
+                                       os << breakln << "\n";
                                break;
                        default:
                                os << breakln << "%\n";
@@ -163,16 +168,15 @@ int InsetSeparator::plaintext(odocstringstream & os,
 }
 
 
-int InsetSeparator::docbook(odocstream & os, OutputParams const &) const
+void InsetSeparator::docbook(XMLStream & xs, OutputParams const &) const
 {
-       os << '\n';
-       return 0;
+       xs << xml::CR();
 }
 
 
-docstring InsetSeparator::xhtml(XHTMLStream & xs, OutputParams const &) const
+docstring InsetSeparator::xhtml(XMLStream & xs, OutputParams const &) const
 {
-       xs << html::CR() << html::CompTag("br") << html::CR();
+       xs << xml::CR() << xml::CompTag("br") << xml::CR();
        return docstring();
 }