]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetbranch.C
* In the process of fixing the math background color bug, this commit transfer backgr...
[lyx.git] / src / insets / insetbranch.C
index d39d69c718adfa5716e679c9fdecbfba235e1e53..3c28c079c6eef8958169aa9422c62cb036c9163f 100644 (file)
@@ -23,6 +23,7 @@
 #include "LColor.h"
 #include "lyxlex.h"
 #include "paragraph.h"
+#include "outputparams.h"
 
 #include <sstream>
 
@@ -222,26 +223,32 @@ bool InsetBranch::isBranchSelected(Buffer const & buffer) const
 
 
 int InsetBranch::latex(Buffer const & buf, odocstream & os,
-                      OutputParams const & runparams) const
+                       OutputParams const & runparams) const
 {
        return isBranchSelected(buf) ?
                InsetText::latex(buf, os, runparams) : 0;
 }
 
 
-int InsetBranch::docbook(Buffer const & buf, odocstream & os,
-                        OutputParams const & runparams) const
+int InsetBranch::plaintext(Buffer const & buf, odocstream & os,
+                           OutputParams const & runparams) const
 {
-       return isBranchSelected(buf) ?
-               InsetText::docbook(buf, os, runparams) : 0;
+       if (!isBranchSelected(buf))
+               return 0;
+
+       os << '[' << _("branch") << ' ' << params_.branch << ":\n";
+       InsetText::plaintext(buf, os, runparams);
+       os << "\n]";
+
+       return PLAINTEXT_NEWLINE + 1; // one char on a separate line
 }
 
 
-int InsetBranch::plaintext(Buffer const & buf, odocstream & os,
-                          OutputParams const & runparams) const
+int InsetBranch::docbook(Buffer const & buf, odocstream & os,
+                         OutputParams const & runparams) const
 {
        return isBranchSelected(buf) ?
-               InsetText::plaintext(buf, os, runparams): 0;
+               InsetText::docbook(buf, os, runparams) : 0;
 }