On 05/03/2012 03:12 AM, Vincent van Ravesteijn wrote:
Op 2-5-2012 23:40, Richard Heck schreef:
commit 98a810c9d8b8d6bc0086779b7fa2d5be434bdbe2
Author: Richard Heck<rgh...@lyx.org>
Date:   Mon Mar 19 17:33:47 2012 -0400

     Fix bug #8087: Include children in plaintext export.

@@ -804,7 +805,7 @@ docstring InsetInclude::xhtml(XHTMLStream& xs, OutputParams const& rp) const
  }


-int InsetInclude::plaintext(odocstream&  os, OutputParams const&) const
+int InsetInclude::plaintext(odocstream& os, OutputParams const& op) const
  {
      if (isVerbatim(params()) || isListings(params())) {
          os<<  '['<<  screenLabel()<<  '\n';
@@ -812,11 +813,15 @@ int InsetInclude::plaintext(odocstream& os, OutputParams const&) const os<< includedFileName(buffer(), params()).fileContents("UTF-8");
          os<<  "\n]";
          return PLAINTEXT_NEWLINE + 1; // one char on a separate line
-    } else {
+    }
+
+    Buffer const * const ibuf = loadIfNeeded();
+    if (!ibuf) {
          docstring const str = '[' + screenLabel() + ']';
          os<<  str;
          return str.size();
      }
+    writePlaintextFile(*ibuf, os, op);
  }

We need to return something here.

Silly me.

Richard

Reply via email to