mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
fix uninitialized variable in insetexternal; espace ~ in \input@path
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3694 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
4653eee561
commit
61e89e29e1
@ -9,7 +9,6 @@ src/converter.C
|
|||||||
src/CutAndPaste.C
|
src/CutAndPaste.C
|
||||||
src/debug.C
|
src/debug.C
|
||||||
src/exporter.C
|
src/exporter.C
|
||||||
src/ext_l10n.h
|
|
||||||
src/FontLoader.C
|
src/FontLoader.C
|
||||||
src/frontends/controllers/biblio.C
|
src/frontends/controllers/biblio.C
|
||||||
src/frontends/controllers/ButtonController.h
|
src/frontends/controllers/ButtonController.h
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
2002-03-07 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
|
||||||
|
|
||||||
|
* buffer.C (Buffer): initialize niceFile to true
|
||||||
|
(makeLaTeXFile):
|
||||||
|
(makeLinuxDocFile):
|
||||||
|
(makeDocBookFile): make sure niceFile is true on exit
|
||||||
|
|
||||||
|
2002-03-06 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
|
||||||
|
|
||||||
|
* buffer.C (makeLaTeXFile): escape ~ in \input@path
|
||||||
|
|
||||||
2002-03-07 Angus Leeming <a.leeming@ic.ac.uk>
|
2002-03-07 Angus Leeming <a.leeming@ic.ac.uk>
|
||||||
|
|
||||||
* LyXSendto.C: remove.
|
* LyXSendto.C: remove.
|
||||||
@ -11,6 +22,7 @@
|
|||||||
* undo_funcs.C (textHandleUndo): fix problems when the paragraph
|
* undo_funcs.C (textHandleUndo): fix problems when the paragraph
|
||||||
got moved away with the DEPM and also set the inset_owner always
|
got moved away with the DEPM and also set the inset_owner always
|
||||||
right which before could have been omitted.
|
right which before could have been omitted.
|
||||||
|
|
||||||
2002-03-07 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
2002-03-07 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||||
|
|
||||||
* buffer.C (parseSingleLyXformat2Token): use default layout is the
|
* buffer.C (parseSingleLyXformat2Token): use default layout is the
|
||||||
|
23
src/buffer.C
23
src/buffer.C
@ -145,7 +145,7 @@ extern int tex_code_break_column;
|
|||||||
|
|
||||||
|
|
||||||
Buffer::Buffer(string const & file, bool ronly)
|
Buffer::Buffer(string const & file, bool ronly)
|
||||||
: paragraph(0), lyx_clean(true), bak_clean(true),
|
: paragraph(0), niceFile(true), lyx_clean(true), bak_clean(true),
|
||||||
unnamed(false), dep_clean(0), read_only(ronly),
|
unnamed(false), dep_clean(0), read_only(ronly),
|
||||||
filename_(file), users(0)
|
filename_(file), users(0)
|
||||||
{
|
{
|
||||||
@ -2037,16 +2037,16 @@ void Buffer::makeLaTeXFile(string const & fname,
|
|||||||
{
|
{
|
||||||
lyxerr[Debug::LATEX] << "makeLaTeXFile..." << endl;
|
lyxerr[Debug::LATEX] << "makeLaTeXFile..." << endl;
|
||||||
|
|
||||||
niceFile = nice; // this will be used by Insetincludes.
|
|
||||||
|
|
||||||
tex_code_break_column = lyxrc.ascii_linelen;
|
|
||||||
|
|
||||||
ofstream ofs(fname.c_str());
|
ofstream ofs(fname.c_str());
|
||||||
if (!ofs) {
|
if (!ofs) {
|
||||||
Alert::err_alert(_("Error: Cannot open file: "), fname);
|
Alert::err_alert(_("Error: Cannot open file: "), fname);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
niceFile = nice; // this will be used by Insetincludes.
|
||||||
|
|
||||||
|
tex_code_break_column = lyxrc.ascii_linelen;
|
||||||
|
|
||||||
// validate the buffer.
|
// validate the buffer.
|
||||||
lyxerr[Debug::LATEX] << " Validating buffer..." << endl;
|
lyxerr[Debug::LATEX] << " Validating buffer..." << endl;
|
||||||
LaTeXFeatures features(params);
|
LaTeXFeatures features(params);
|
||||||
@ -2084,9 +2084,11 @@ void Buffer::makeLaTeXFile(string const & fname,
|
|||||||
texrow.newline();
|
texrow.newline();
|
||||||
}
|
}
|
||||||
if (!original_path.empty()) {
|
if (!original_path.empty()) {
|
||||||
|
string inputpath = os::external_path(original_path);
|
||||||
|
subst(inputpath, "~", "\\string~");
|
||||||
ofs << "\\makeatletter\n"
|
ofs << "\\makeatletter\n"
|
||||||
<< "\\def\\input@path{{"
|
<< "\\def\\input@path{{"
|
||||||
<< os::external_path(original_path) << "/}}\n"
|
<< inputpath << "/}}\n"
|
||||||
<< "\\makeatother\n";
|
<< "\\makeatother\n";
|
||||||
texrow.newline();
|
texrow.newline();
|
||||||
texrow.newline();
|
texrow.newline();
|
||||||
@ -2519,6 +2521,9 @@ void Buffer::makeLaTeXFile(string const & fname,
|
|||||||
|
|
||||||
lyxerr[Debug::INFO] << "Finished making latex file." << endl;
|
lyxerr[Debug::INFO] << "Finished making latex file." << endl;
|
||||||
lyxerr[Debug::INFO] << "Row count was " << texrow.rows()-1 << "." << endl;
|
lyxerr[Debug::INFO] << "Row count was " << texrow.rows()-1 << "." << endl;
|
||||||
|
|
||||||
|
// we want this to be true outside previews (for insetexternal)
|
||||||
|
niceFile = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2802,6 +2807,9 @@ void Buffer::makeLinuxDocFile(string const & fname, bool nice, bool body_only)
|
|||||||
|
|
||||||
ofs.close();
|
ofs.close();
|
||||||
// How to check for successful close
|
// How to check for successful close
|
||||||
|
|
||||||
|
// we want this to be true outside previews (for insetexternal)
|
||||||
|
niceFile = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -3362,6 +3370,9 @@ void Buffer::makeDocBookFile(string const & fname, bool nice, bool only_body)
|
|||||||
|
|
||||||
ofs.close();
|
ofs.close();
|
||||||
// How to check for successful close
|
// How to check for successful close
|
||||||
|
|
||||||
|
// we want this to be true outside previews (for insetexternal)
|
||||||
|
niceFile = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2002-03-06 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
|
||||||
|
|
||||||
|
* insetexternal.C (doSubstitution): check whether we are using a
|
||||||
|
temp dir for defining $$FPath
|
||||||
|
|
||||||
2002-03-07 Angus Leeming <a.leeming@ic.ac.uk>
|
2002-03-07 Angus Leeming <a.leeming@ic.ac.uk>
|
||||||
|
|
||||||
* insettabular.C:
|
* insettabular.C:
|
||||||
|
@ -235,7 +235,7 @@ string const InsetExternal::doSubstitution(Buffer const * buffer,
|
|||||||
string result;
|
string result;
|
||||||
string const basename = ChangeExtension(params_.filename, string());
|
string const basename = ChangeExtension(params_.filename, string());
|
||||||
string filepath;
|
string filepath;
|
||||||
if (buffer && (!buffer->niceFile)) {
|
if (buffer && !buffer->tmppath.empty() && !buffer->niceFile) {
|
||||||
filepath = buffer->filePath();
|
filepath = buffer->filePath();
|
||||||
}
|
}
|
||||||
result = subst(s, "$$FName", params_.filename);
|
result = subst(s, "$$FName", params_.filename);
|
||||||
|
Loading…
Reference in New Issue
Block a user