(Herbert): strip the extension from the graphics filename when exporting

to latex.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4036 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2002-04-19 17:16:00 +00:00
parent 43ad9cf095
commit b6126838b5
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2002-04-19 Herbert Voss <voss@perce.de>
* insetgraphic.C (prepareFile): return filename without
extension if we only export without compiling
2002-04-19 Juergen Vigna <jug@sad.it>
* insettext.C (draw): call a fullRebreak on the row where we had a

View File

@ -614,11 +614,14 @@ string const InsetGraphics::prepareFile(Buffer const *buf) const
string filename_ = params().filename;
bool const zipped = zippedFile(filename_);
if ((zipped && params().noUnzip) || buf->niceFile) {
if (zipped && params().noUnzip) {
lyxerr[Debug::GRAPHICS] << "don't unzip file or export latex"
<< filename_ << endl;
return filename_;
}
// only export latex without compiling the file
if (buf->niceFile)
return RemoveExtension(filename_);
// Enable these helper functions to find the file if it is stored as
// a relative path.