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

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@37803 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2011-02-28 16:03:31 +00:00
parent 1f6ce88328
commit a92f266a92
2 changed files with 15 additions and 3 deletions

View File

@ -560,9 +560,19 @@ int InsetInclude::latex(odocstream & os, OutputParams const & runparams) const
Language const * const oldLang = runparams.master_language;
runparams.encoding = &tmp->params().encoding();
runparams.master_language = buffer().params().language;
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 {

View File

@ -54,6 +54,8 @@ What's new
- When exporting, alert about uncodable characters in ERT insets (bug 7310).
- When exporting, alert about uncodable characters in child docs (bug 7326).
* USER INTERFACE