mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Fix crash with included files
* src/buffer.C (Buffer::makeLaTeXFile): Use runparams.encoding to be consistent * src/insets/insetinclude.C (InsetInclude::latex): Change runparams.encoding to the encoding of the child document for makeLateXFile git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17555 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2ccde85cb5
commit
e4fd77faf7
@ -872,7 +872,7 @@ bool Buffer::makeLaTeXFile(FileName const & fname,
|
||||
OutputParams const & runparams,
|
||||
bool output_preamble, bool output_body)
|
||||
{
|
||||
string const encoding = params().encoding().iconvName();
|
||||
string const encoding = runparams.encoding->iconvName();
|
||||
lyxerr[Debug::LATEX] << "makeLaTeXFile encoding: "
|
||||
<< encoding << "..." << endl;
|
||||
|
||||
|
@ -426,9 +426,13 @@ int InsetInclude::latex(Buffer const & buffer, odocstream & os,
|
||||
// argument. Should we set it to string(), or should makeLaTeXFile
|
||||
// make use of it somehow? (JMarc 20031002)
|
||||
#endif
|
||||
// The included file might be written in a different encoding
|
||||
Encoding const * const oldEnc = runparams.encoding;
|
||||
runparams.encoding = &tmp->params().encoding();
|
||||
tmp->makeLaTeXFile(writefile,
|
||||
onlyPath(masterFilename(buffer)),
|
||||
runparams, false);
|
||||
runparams.encoding = oldEnc;
|
||||
} else {
|
||||
// Copy the file to the temp dir, so that .aux files etc.
|
||||
// are not created in the original dir. Files included by
|
||||
|
Loading…
Reference in New Issue
Block a user