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
+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()
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.
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") {