bug 462 - Herbert's patch

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH-1_2_X@4447 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2002-06-20 23:57:53 +00:00
parent b12370f61a
commit 13c92a4478
2 changed files with 18 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2002-06-21 Herbert Voss <voss@lyx.org>
* GraphicsCacheItem.C: convert .ps as .eps to avoid
problems with old ps files
2002-06-13 Angus Leeming <leeming@lyx.org>
Fixes needed to compile with Compaq cxx 6.3.

View File

@ -477,11 +477,20 @@ void GCacheItem::convertToDisplayFormat()
unzipped_filename_ = filename;
}
string const from = getExtFromContents(filename);
string const to = grfx::findTargetFormat(from);
string from = getExtFromContents(filename);
// Some old ps-files make problems, so we do not need direct
// loading of an ps-file
if (from == "ps") {
lyxerr[Debug::GRAPHICS]
<< "\n\tThe file contains PostScript format data.\n"
<< "\tchanging it to eps-format to get it converted to xpm\n";
from = "eps";
} else {
lyxerr[Debug::GRAPHICS]
<< "\n\tThe file contains " << from << " format data." << endl;
}
string const to = grfx::findTargetFormat(from);
lyxerr[Debug::GRAPHICS]
<< "The file contains " << from << " format data." << endl;
if (to.empty()) {
setStatus(ErrorConverting);