Fix #7326 (Latex export of child docs silently fails with uncodable characters)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37795 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2011-02-28 01:14:19 +00:00
parent 7edf2691ae
commit a889fd0438

View File

@ -608,9 +608,19 @@ void InsetInclude::latex(otexstream & os, OutputParams const & runparams) const
runparams.master_language = buffer().params().language;
runparams.par_begin = 0;
runparams.par_end = tmp->paragraphs().size();
tmp->makeLaTeXFile(writefile,
masterFileName(buffer()).onlyPath().absFileName(),
runparams, false);
if (!tmp->makeLaTeXFile(writefile, masterFileName(buffer()).
onlyPath().absFileName(), runparams, false)) {
docstring msg = bformat(_("Included file `%1$s' "
"was not exported correctly.\nWarning: "
"LaTeX export is probably incomplete."),
included_file.displayName());
ErrorList & el = tmp->errorList("Export");
if (!el.empty())
msg = bformat(from_ascii("%1$s\n\n%2$s\n\n%3$s"),
msg, el.begin()->error,
el.begin()->description);
Alert::warning(_("Export failure"), msg);
}
runparams.encoding = oldEnc;
runparams.master_language = oldLang;
} else {