]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetBranch.cpp
Fix crash when outputting XHTML. Not resetting the paragraphs
[lyx.git] / src / insets / InsetBranch.cpp
index c7a01ee360fe4152dc09e32d1717a5cf79786df2..174b3e655bc6c9274f41a0e416c2c83ee611faae 100644 (file)
@@ -230,8 +230,12 @@ int InsetBranch::docbook(odocstream & os,
 
 docstring InsetBranch::xhtml(XHTMLStream & xs, OutputParams const & rp) const
 {
-       if (isBranchSelected())
-                return InsetText::xhtml(xs, rp);
+       if (isBranchSelected()) {
+               OutputParams newrp = rp;
+               newrp.par_begin = 0;
+               newrp.par_end = text().paragraphs().size();
+               xhtmlParagraphs(text(), buffer(), xs, newrp);
+       }
        return docstring();
 }
 
@@ -257,9 +261,9 @@ void InsetBranch::validate(LaTeXFeatures & features) const
 }
 
 
-docstring InsetBranch::contextMenuName() const
+string InsetBranch::contextMenuName() const
 {
-       return from_ascii("context-branch");
+       return "context-branch";
 }
 
 
@@ -314,7 +318,8 @@ void InsetBranchParams::write(ostream & os) const
 
 void InsetBranchParams::read(Lexer & lex)
 {
-       lex >> branch;
+       lex.eatLine();
+       branch = lex.getDocString();
 }
 
 } // namespace lyx