]> git.lyx.org Git - features.git/commitdiff
(Herbert): strip the extension from the graphics filename when exporting
authorAngus Leeming <leeming@lyx.org>
Fri, 19 Apr 2002 17:16:00 +0000 (17:16 +0000)
committerAngus Leeming <leeming@lyx.org>
Fri, 19 Apr 2002 17:16:00 +0000 (17:16 +0000)
to latex.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4036 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/ChangeLog
src/insets/insetgraphics.C

index 0162a84c56769a716cb1b62e9e79fbe5455fa98a..50596136ab5485aa7d796108712ad822a73bd930 100644 (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
index f7848051c9cbd06eb10cfe95584066a4a58e0ade..e6e352ec7ea5be784f9b5485c30d5d4fbff7ca7a 100644 (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.