mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-19 05:53:35 +00:00
fix quoted graphics filenames
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_3_X@10090 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
bd3566384a
commit
6033e5813f
@ -1,3 +1,8 @@
|
|||||||
|
2005-06-18 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||||
|
|
||||||
|
* insetgraphics.C (prepareFile): Don't strip the extension, because
|
||||||
|
the substitution does not work when the file names are quoted
|
||||||
|
|
||||||
2005-04-17 Angus Leeming <leeming@lyx.org>
|
2005-04-17 Angus Leeming <leeming@lyx.org>
|
||||||
|
|
||||||
* insetbib.C (latex):
|
* insetbib.C (latex):
|
||||||
|
@ -527,9 +527,18 @@ string const InsetGraphics::prepareFile(Buffer const * buf) const
|
|||||||
{
|
{
|
||||||
// LaTeX can cope if the graphics file doesn't exist, so just
|
// LaTeX can cope if the graphics file doesn't exist, so just
|
||||||
// return the filename.
|
// return the filename.
|
||||||
string const orig_file = params().filename;
|
string orig_file = params().filename;
|
||||||
string orig_file_with_path =
|
string orig_file_with_path =
|
||||||
MakeAbsPath(orig_file, buf->filePath());
|
MakeAbsPath(orig_file, buf->filePath());
|
||||||
|
if (!IsFileReadable(orig_file_with_path)) {
|
||||||
|
if (IsFileReadable(orig_file_with_path + ".eps")) {
|
||||||
|
orig_file += ".eps";
|
||||||
|
orig_file_with_path += ".eps";
|
||||||
|
} else if (IsFileReadable(orig_file_with_path + ".ps")) {
|
||||||
|
orig_file += ".ps";
|
||||||
|
orig_file_with_path += ".ps";
|
||||||
|
}
|
||||||
|
}
|
||||||
lyxerr[Debug::GRAPHICS] << "[InsetGraphics::prepareFile] orig_file = "
|
lyxerr[Debug::GRAPHICS] << "[InsetGraphics::prepareFile] orig_file = "
|
||||||
<< orig_file << "\n\twith path: "
|
<< orig_file << "\n\twith path: "
|
||||||
<< orig_file_with_path << endl;
|
<< orig_file_with_path << endl;
|
||||||
@ -592,12 +601,8 @@ string const InsetGraphics::prepareFile(Buffer const * buf) const
|
|||||||
// No conversion is needed. LaTeX can handle the
|
// No conversion is needed. LaTeX can handle the
|
||||||
// graphic file as is.
|
// graphic file as is.
|
||||||
// This is true even if the orig_file is compressed.
|
// This is true even if the orig_file is compressed.
|
||||||
if (formats.getFormat(to)->extension() == GetExtension(orig_file)) {
|
|
||||||
return RemoveExtension(orig_file_with_path);
|
|
||||||
} else {
|
|
||||||
return orig_file_with_path;
|
return orig_file_with_path;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// We're going to be running the exported buffer through the LaTeX
|
// We're going to be running the exported buffer through the LaTeX
|
||||||
// compiler, so must ensure that LaTeX can cope with the graphics
|
// compiler, so must ensure that LaTeX can cope with the graphics
|
||||||
@ -650,9 +655,6 @@ string const InsetGraphics::prepareFile(Buffer const * buf) const
|
|||||||
if (from == to) {
|
if (from == to) {
|
||||||
// No conversion is needed. LaTeX can handle the
|
// No conversion is needed. LaTeX can handle the
|
||||||
// graphic file as is.
|
// graphic file as is.
|
||||||
if (formats.getFormat(to)->extension() == GetExtension(orig_file))
|
|
||||||
return RemoveExtension(temp_file);
|
|
||||||
else
|
|
||||||
return temp_file;
|
return temp_file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -691,7 +693,7 @@ string const InsetGraphics::prepareFile(Buffer const * buf) const
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return RemoveExtension(temp_file);
|
return ChangeExtension(temp_file, formats.getFormat(to)->extension());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user