Enlightenment CVS committal

Author  : doursse
Project : e17
Module  : proto

Dir     : e17/proto/epdf/src/lib


Modified Files:
        poppler_postscript.h poppler_postscript.cpp 


Log Message:
more checks

===================================================================
RCS file: /cvs/e/e17/proto/epdf/src/lib/poppler_postscript.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- poppler_postscript.h        23 Apr 2006 23:07:18 -0000      1.1
+++ poppler_postscript.h        25 Apr 2006 07:08:27 -0000      1.2
@@ -23,7 +23,8 @@
  * PDF document @p document,  whose name will be @p filename. The
  * first and last pages that will be printed are respectively @p
  * first_page and @p last_page. The count of the pages begins from 1
- * and not 0
+ * and not 0. if @p first_page is < 1, 1 is used. If @p last_page is >
+ * #pages, #pages is used
  */
 Epdf_Postscript *epdf_postscript_new (Epdf_Document *document,
                                       const char    *filename,
===================================================================
RCS file: /cvs/e/e17/proto/epdf/src/lib/poppler_postscript.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- poppler_postscript.cpp      23 Apr 2006 23:07:18 -0000      1.1
+++ poppler_postscript.cpp      25 Apr 2006 07:08:27 -0000      1.2
@@ -6,6 +6,7 @@
 
 #include "poppler_enum.h"
 #include "poppler_private.h"
+#include "poppler_document.h"
 #include "poppler_postscript.h"
 
 
@@ -26,8 +27,10 @@
 
   ps->pdfdoc = document->pdfdoc;
   ps->filename = strdup (filename);
-  ps->first_page = first_page;
-  ps->last_page = last_page;
+  ps->first_page = (first_page < 1) ? 1 : first_page;
+  ps->last_page = (last_page > epdf_document_page_count_get (document)) ?
+    epdf_document_page_count_get (document) :
+    last_page;
 
   ps->width = -1.0;
   ps->height = -1.0;




-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to