mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Backport fix for bug #8087: Include children in plaintext export.
(cherry picked from commit98a810c9d8
) Forgot the return value. (cherry picked from commit0459c43769
)
This commit is contained in:
parent
6ff6d24355
commit
57e5eba4c1
@ -34,6 +34,7 @@
|
||||
#include "LyXRC.h"
|
||||
#include "Lexer.h"
|
||||
#include "MetricsInfo.h"
|
||||
#include "output_plaintext.h"
|
||||
#include "output_xhtml.h"
|
||||
#include "OutputParams.h"
|
||||
#include "TextClass.h"
|
||||
@ -796,7 +797,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';
|
||||
@ -804,11 +805,16 @@ 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);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user