1 diff -u -Naur xpdf-3.03-old/xpdf/PDFCore.cc xpdf-3.03-new/xpdf/PDFCore.cc
2 --- xpdf-3.03-old/xpdf/PDFCore.cc 2011-08-15 23:08:53.000000000 +0200
3 +++ xpdf-3.03-new/xpdf/PDFCore.cc 2011-08-20 13:47:13.508475137 +0200
6 // Copyright 2004 Glyph & Cog, LLC
8 +// Modified for Debian by Hamish Moffatt, 18 August 2005.
10 //========================================================================
13 @@ -1619,9 +1621,11 @@
14 int x0, y0, x1, y1, t;
17 +#ifdef ENFORCE_PERMISSIONS
18 if (!doc->okToCopy()) {
22 if ((page = findPage(pg))) {
23 cvtUserToDev(pg, xMin, yMin, &x0, &y0);
24 cvtUserToDev(pg, xMax, yMax, &x1, &y1);
25 diff -u -Naur xpdf-3.03-old/xpdf/pdfimages.cc xpdf-3.03-new/xpdf/pdfimages.cc
26 --- xpdf-3.03-old/xpdf/pdfimages.cc 2011-08-15 23:08:53.000000000 +0200
27 +++ xpdf-3.03-new/xpdf/pdfimages.cc 2011-08-20 13:50:39.638162542 +0200
30 // Copyright 1998-2003 Glyph & Cog, LLC
32 +// Modified for Debian by Hamish Moffatt, 22 May 2002.
34 //========================================================================
40 // check for copy permission
41 +#ifdef ENFORCE_PERMISSIONS
42 if (!doc->okToCopy()) {
43 error(errNotAllowed, -1,
44 "Copying of images from this document is not allowed.");
52 diff -u -Naur xpdf-3.03-old/xpdf/pdftops.cc xpdf-3.03-new/xpdf/pdftops.cc
53 --- xpdf-3.03-old/xpdf/pdftops.cc 2011-08-15 23:08:53.000000000 +0200
54 +++ xpdf-3.03-new/xpdf/pdftops.cc 2011-08-20 13:51:03.830253411 +0200
57 // Copyright 1996-2003 Glyph & Cog, LLC
59 +// Modified for Debian by Hamish Moffatt, 22 May 2002.
61 //========================================================================
68 +#ifdef ENFORCE_PERMISSIONS
69 // check for print permission
70 if (!doc->okToPrint()) {
71 error(errNotAllowed, -1, "Printing this document is not allowed.");
77 // construct PostScript file name
79 diff -u -Naur xpdf-3.03-old/xpdf/pdftotext.cc xpdf-3.03-new/xpdf/pdftotext.cc
80 --- xpdf-3.03-old/xpdf/pdftotext.cc 2011-08-15 23:08:53.000000000 +0200
81 +++ xpdf-3.03-new/xpdf/pdftotext.cc 2011-08-20 13:51:24.367184150 +0200
84 // Copyright 1997-2003 Glyph & Cog, LLC
86 +// Modified for Debian by Hamish Moffatt, 22 May 2002.
88 //========================================================================
95 +#ifdef ENFORCE_PERMISSIONS
96 // check for copy permission
97 if (!doc->okToCopy()) {
98 error(errNotAllowed, -1,
105 // construct text file name
107 diff -u -Naur xpdf-3.03-old/xpdf/XPDFCore.cc xpdf-3.03-new/xpdf/XPDFCore.cc
108 --- xpdf-3.03-old/xpdf/XPDFCore.cc 2011-08-15 23:08:53.000000000 +0200
109 +++ xpdf-3.03-new/xpdf/XPDFCore.cc 2011-08-20 13:48:54.902483779 +0200
112 // Copyright 2002-2003 Glyph & Cog, LLC
114 +// Modified for Debian by Hamish Moffatt, 22 May 2002.
116 //========================================================================
119 @@ -384,12 +386,16 @@
120 #ifndef NO_TEXT_SELECT
121 if (selectULX != selectLRX &&
122 selectULY != selectLRY) {
123 +#ifdef ENFORCE_PERMISSIONS
124 if (doc->okToCopy()) {
127 error(errNotAllowed, -1,
128 "Copying of text from this document is not allowed.");
138 double ulx, uly, lrx, lry;
140 +#ifdef ENFORCE_PERMISSIONS
141 if (!doc->okToCopy()) {
145 if (getSelection(&pg, &ulx, &uly, &lrx, &lry)) {
146 //~ for multithreading: need a mutex here
147 if (currentSelection) {
148 diff -u -Naur xpdf-3.03-old/xpdf/XPDFViewer.cc xpdf-3.03-new/xpdf/XPDFViewer.cc
149 --- xpdf-3.03-old/xpdf/XPDFViewer.cc 2011-08-15 23:08:53.000000000 +0200
150 +++ xpdf-3.03-new/xpdf/XPDFViewer.cc 2011-08-20 13:49:52.908140863 +0200
153 // Copyright 2002-2003 Glyph & Cog, LLC
155 +// Modified for Debian by Hamish Moffatt, 22 May 2002.
157 //========================================================================
160 @@ -3492,10 +3494,12 @@
163 doc = viewer->core->getDoc();
164 +#ifdef ENFORCE_PERMISSIONS
165 if (!doc->okToPrint()) {
166 error(errNotAllowed, -1, "Printing this document is not allowed.");
171 viewer->core->setBusyCursor(gTrue);