Blob Blame History Raw
diff -up xpdf-3.04/xpdf/PDFCore.cc.permissions xpdf-3.04/xpdf/PDFCore.cc
--- xpdf-3.04/xpdf/PDFCore.cc.permissions	2014-05-28 14:50:50.000000000 -0400
+++ xpdf-3.04/xpdf/PDFCore.cc	2014-05-29 15:42:47.290665898 -0400
@@ -4,6 +4,8 @@
 //
 // Copyright 2004-2013 Glyph & Cog, LLC
 //
+// Modified for Debian by Hamish Moffatt, 18 August 2005.
+//
 //========================================================================
 
 #include <aconf.h>
@@ -1677,9 +1679,11 @@ GString *PDFCore::extractText(int pg, do
   int x0, y0, x1, y1, t;
   GString *s;
 
+#ifdef ENFORCE_PERMISSIONS
   if (!doc->okToCopy()) {
     return NULL;
   }
+#endif
   if ((page = findPage(pg))) {
     cvtUserToDev(pg, xMin, yMin, &x0, &y0);
     cvtUserToDev(pg, xMax, yMax, &x1, &y1);
diff -up xpdf-3.04/xpdf/pdfimages.cc.permissions xpdf-3.04/xpdf/pdfimages.cc
--- xpdf-3.04/xpdf/pdfimages.cc.permissions	2014-05-28 14:50:50.000000000 -0400
+++ xpdf-3.04/xpdf/pdfimages.cc	2014-05-29 15:40:57.814449375 -0400
@@ -4,6 +4,8 @@
 //
 // Copyright 1998-2003 Glyph & Cog, LLC
 //
+// Modified for Debian by Hamish Moffatt, 22 May 2002.
+//
 //========================================================================
 
 #include <aconf.h>
@@ -119,12 +121,14 @@ int main(int argc, char *argv[]) {
   }
 
   // check for copy permission
+#ifdef ENFORCE_PERMISSIONS
   if (!doc->okToCopy()) {
     error(errNotAllowed, -1,
 	  "Copying of images from this document is not allowed.");
     exitCode = 3;
     goto err1;
   }
+#endif
 
   // get page range
   if (firstPage < 1)
diff -up xpdf-3.04/xpdf/pdftops.cc.permissions xpdf-3.04/xpdf/pdftops.cc
--- xpdf-3.04/xpdf/pdftops.cc.permissions	2014-05-28 14:50:50.000000000 -0400
+++ xpdf-3.04/xpdf/pdftops.cc	2014-05-29 15:40:57.815449368 -0400
@@ -4,6 +4,8 @@
 //
 // Copyright 1996-2003 Glyph & Cog, LLC
 //
+// Modified for Debian by Hamish Moffatt, 22 May 2002.
+//
 //========================================================================
 
 #include <aconf.h>
@@ -300,12 +302,14 @@ int main(int argc, char *argv[]) {
     goto err1;
   }
 
+#ifdef ENFORCE_PERMISSIONS
   // check for print permission
   if (!doc->okToPrint()) {
     error(errNotAllowed, -1, "Printing this document is not allowed.");
     exitCode = 3;
     goto err1;
   }
+#endif
 
   // construct PostScript file name
   if (argc == 3) {
diff -up xpdf-3.04/xpdf/pdftotext.cc.permissions xpdf-3.04/xpdf/pdftotext.cc
--- xpdf-3.04/xpdf/pdftotext.cc.permissions	2014-05-28 14:50:50.000000000 -0400
+++ xpdf-3.04/xpdf/pdftotext.cc	2014-05-29 15:43:37.923303455 -0400
@@ -4,6 +4,8 @@
 //
 // Copyright 1997-2013 Glyph & Cog, LLC
 //
+// Modified for Debian by Hamish Moffatt, 22 May 2002.
+//
 //========================================================================
 
 #include <aconf.h>
@@ -188,6 +190,7 @@ int main(int argc, char *argv[]) {
     goto err2;
   }
 
+#ifdef ENFORCE_PERMISSIONS
   // check for copy permission
   if (!doc->okToCopy()) {
     error(errNotAllowed, -1,
@@ -195,6 +198,7 @@ int main(int argc, char *argv[]) {
     exitCode = 3;
     goto err2;
   }
+#endif
 
   // construct text file name
   if (argc == 3) {
diff -up xpdf-3.04/xpdf/XPDFCore.cc.permissions xpdf-3.04/xpdf/XPDFCore.cc
--- xpdf-3.04/xpdf/XPDFCore.cc.permissions	2014-05-29 15:40:57.777449640 -0400
+++ xpdf-3.04/xpdf/XPDFCore.cc	2014-05-29 15:40:57.819449339 -0400
@@ -4,6 +4,8 @@
 //
 // Copyright 2002-2003 Glyph & Cog, LLC
 //
+// Modified for Debian by Hamish Moffatt, 22 May 2002.
+//
 //========================================================================
 
 #include <aconf.h>
@@ -384,12 +386,16 @@ void XPDFCore::endSelection(int wx, int
 #ifndef NO_TEXT_SELECT
       if (selectULX != selectLRX &&
 	  selectULY != selectLRY) {
+#ifdef ENFORCE_PERMISSIONS
 	if (doc->okToCopy()) {
 	  copySelection();
 	} else {
 	  error(errNotAllowed, -1,
 		"Copying of text from this document is not allowed.");
 	}
+#else
+	copySelection();
+#endif
       }
 #endif
     }
@@ -408,9 +414,11 @@ void XPDFCore::copySelection() {
   int pg;
   double ulx, uly, lrx, lry;
 
+#ifdef ENFORCE_PERMISSIONS
   if (!doc->okToCopy()) {
     return;
   }
+#endif
   if (getSelection(&pg, &ulx, &uly, &lrx, &lry)) {
     //~ for multithreading: need a mutex here
     if (currentSelection) {
diff -up xpdf-3.04/xpdf/XPDFViewer.cc.permissions xpdf-3.04/xpdf/XPDFViewer.cc
--- xpdf-3.04/xpdf/XPDFViewer.cc.permissions	2014-05-29 15:40:57.808449418 -0400
+++ xpdf-3.04/xpdf/XPDFViewer.cc	2014-05-29 15:40:57.821449325 -0400
@@ -4,6 +4,8 @@
 //
 // Copyright 2002-2003 Glyph & Cog, LLC
 //
+// Modified for Debian by Hamish Moffatt, 22 May 2002.
+//
 //========================================================================
 
 #include <aconf.h>
@@ -3503,10 +3505,12 @@ void XPDFViewer::printPrintCbk(Widget wi
   PSOutputDev *psOut;
 
   doc = viewer->core->getDoc();
+#ifdef ENFORCE_PERMISSIONS
   if (!doc->okToPrint()) {
     error(errNotAllowed, -1, "Printing this document is not allowed.");
     return;
   }
+#endif
 
   viewer->core->setBusyCursor(gTrue);