]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetBranch.cpp
Does not compile on older gcc.
[lyx.git] / src / insets / InsetBranch.cpp
index 6afa0c72ea6f575491359a7949e5de09dc0e5d8c..a70ff27463c6db5003efc637d6e33315d02aff80 100644 (file)
@@ -24,6 +24,7 @@
 #include "Lexer.h"
 #include "LyX.h"
 #include "OutputParams.h"
+#include "output_docbook.h"
 #include "output_xhtml.h"
 #include "TextClass.h"
 #include "TocBackend.h"
@@ -311,6 +312,9 @@ void InsetBranch::latex(otexstream & os, OutputParams const & runparams) const
                OutputParams rp = runparams;
                rp.inbranch = true;
                InsetText::latex(os, rp);
+               // These need to be passed upstream
+               runparams.need_maketitle = rp.need_maketitle;
+               runparams.have_maketitle = rp.have_maketitle;
        }
 }
 
@@ -326,14 +330,18 @@ int InsetBranch::plaintext(odocstringstream & os,
 }
 
 
-int InsetBranch::docbook(odocstream & os,
-                        OutputParams const & runparams) const
+void InsetBranch::docbook(XMLStream & xs, OutputParams const & runparams) const
 {
-       return producesOutput() ?  InsetText::docbook(os, runparams) : 0;
+       if (producesOutput()) {
+               OutputParams rp = runparams;
+               rp.par_begin = 0;
+               rp.par_end = text().paragraphs().size();
+               docbookParagraphs(text(), buffer(), xs, rp);
+       }
 }
 
 
-docstring InsetBranch::xhtml(XHTMLStream & xs, OutputParams const & rp) const
+docstring InsetBranch::xhtml(XMLStream & xs, OutputParams const & rp) const
 {
        if (producesOutput()) {
                OutputParams newrp = rp;
@@ -402,10 +410,10 @@ void InsetBranch::string2params(string const & in, InsetBranchParams & params)
 }
 
 
-void InsetBranch::updateBuffer(ParIterator const & it, UpdateType utype)
+void InsetBranch::updateBuffer(ParIterator const & it, UpdateType utype, bool const deleted)
 {
        setLabel(params_.branch + (params_.inverted ? " (-)" : ""));
-       InsetCollapsible::updateBuffer(it, utype);
+       InsetCollapsible::updateBuffer(it, utype, deleted);
 }