From a92f266a923663f6613d5ed2290feda3c6254a9b Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Mon, 28 Feb 2011 16:03:31 +0000 Subject: [PATCH] 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 --- src/insets/InsetInclude.cpp | 16 +++++++++++++--- status.16x | 2 ++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp index c83006ff11..a387a4f994 100644 --- a/src/insets/InsetInclude.cpp +++ b/src/insets/InsetInclude.cpp @@ -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 { diff --git a/status.16x b/status.16x index 26946ea78f..56bcdcacd1 100644 --- a/status.16x +++ b/status.16x @@ -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