]> git.lyx.org Git - features.git/commitdiff
parch from Herbert
authorLars Gullik Bjønnes <larsbj@gullik.org>
Sun, 7 Apr 2002 15:31:16 +0000 (15:31 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Sun, 7 Apr 2002 15:31:16 +0000 (15:31 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3931 a592a061-630c-0410-9148-cb99ea01b6c8

src/support/ChangeLog
src/support/filetools.C

index e61fc01c14e80248781b419be4115c03546be818..6b14f8c1bacc876a26416bd6efb60ba0c95643fe 100644 (file)
@@ -1,3 +1,7 @@
+2002-04-07  Herbert Voss  <voss@perce.de>
+
+       * filetools.C: fix bug for eps. scans now a whole line
+
 2002-04-06  Lars Gullik Bjønnes  <larsbj@birdstep.com>
 
        * lyxstring.C (operator>>): use the better solution, this fixes a
index 878e1e7b7bc244abded5aab5d62749a77bf4b0d9..b95b23c767bfc5ba23feb4dcea4272e252e070c4 100644 (file)
@@ -997,7 +997,8 @@ string const GetExtension(string const & name)
 // TGIF        %TGIF...
 // TIFF        II... or MM...
 // XBM ..._bits[]...
-// XPM /* XPM */
+// XPM /* XPM */    sometimes missing (f.ex. tgif-export)
+//      ...static char *...
 // XWD \000\000\000\151        (0x00006900) decimal 105
 //
 // GZIP        \037\213\010\010...     http://www.ietf.org/rfc/rfc1952.txt
@@ -1042,9 +1043,9 @@ string const getExtFromContents(string const & filename)
                        break;
                }
 
-               ifs >> str;
-               lyxerr[Debug::GRAPHICS]
-                   << "Scanstring: " << str << endl;
+               getline(ifs, str);
+               lyxerr[Debug::GRAPHICS] << "Scanstring: " << str << endl;
+               
                string const stamp = str.substr(0,2);
                if (firstLine && str.size() >= 2) {
                        // at first we check for a zipped file, because this
@@ -1130,7 +1131,7 @@ string const getExtFromContents(string const & filename)
                else if (contains(str,"_bits[]"))
                        format = "xbm";
 
-               else if (contains(str,"XPM"))
+               else if (contains(str,"XPM") || contains(str, "static char *"))
                        format = "xpm";
 
                else if (contains(str,"BITPIX"))