* Revert Herbert's patch of yesterday to deal with non-existent

graphics files; it isn't needed anymore.
* Produce "pretty" latex output if the graphics file isn't found.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3837 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2002-03-26 12:17:04 +00:00
parent d11fd01ce7
commit 07386186b0
3 changed files with 15 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2002-03-26 Angus Leeming <a.leeming@ic.ac.uk>
* insetgraphicsParams.C (Read): revert Herbert's fix and apply the
proper fix to the graphics cache.
(latex): nice output if the file is not found.
2002-03-26 Juergen Vigna <jug@sad.it>
* insettext.C (setText): added a LyXFont param and call reinitLyXText()

View File

@ -650,7 +650,13 @@ int InsetGraphics::latex(Buffer const *buf, ostream & os,
if (params().filename.empty()) {
os << "\\fbox{\\rule[-0.5in]{0pt}{1in}"
<< _("empty figure path") << "}\n";
return 1; // One end of line marker added to the stream.
return 1; // One end-of-line marker added to the stream.
}
// Ditto if the file is not there.
if (!IsFileReadable(MakeAbsPath(params().filename, buf->filePath()))) {
os << "\\fbox{\\rule[-0.5in]{0pt}{1in}"
<< _("file not found") << "}\n";
return 1; // One end-of-line marker added to the stream.
}
// These variables collect all the latex code that should be before and
// after the actual includegraphics command.

View File

@ -251,11 +251,8 @@ bool InsetGraphicsParams::Read(LyXLex & lex, string const& token)
draft = true;
} else if (token == "display") {
lex.next();
if (IsFileReadable(filename)) {
string const type = lex.getString();
display = displayTranslator.find(type);
} else
display = NONE;
string const type = lex.getString();
display = displayTranslator.find(type);
} else if (token == "subcaption") {
subcaption = true;
} else if (token == "subcaptionText") {