[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdegraphics/kpdf/xpdf/xpdf
From:       Albert Astals Cid <tsdgeos () terra ! es>
Date:       2007-03-22 20:42:26
Message-ID: 1174596146.943140.21780.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 645533 by aacid:

Accept Width and Height as reals too
BUGS: 143322


 M  +10 -4     Gfx.cc  


--- branches/KDE/3.5/kdegraphics/kpdf/xpdf/xpdf/Gfx.cc #645532:645533
@@ -3389,18 +3389,24 @@
     obj1.free();
     dict->lookup("W", &obj1);
   }
-  if (!obj1.isInt())
+  if (obj1.isInt())
+    width = obj1.getInt();
+  else if (obj1.isReal())
+    width = (int)obj1.getReal();
+  else
     goto err2;
-  width = obj1.getInt();
   obj1.free();
   dict->lookup("Height", &obj1);
   if (obj1.isNull()) {
     obj1.free();
     dict->lookup("H", &obj1);
   }
-  if (!obj1.isInt())
+  if (obj1.isInt())
+    height = obj1.getInt();
+  else if (obj1.isReal())
+    height = (int)obj1.getReal();
+  else
     goto err2;
-  height = obj1.getInt();
   obj1.free();
 
   // image or mask?
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic