rio: 0.0.36 -> 0.0.37
[NixPkgs.git] / pkgs / applications / misc / xpdf / xpdf-3.02-protection.patch
blob598fc6dbd07334f0c78f0c97efadd31894e95348
1 diff -C 3 -r orig/xpdf/pdfimages.cc xpdf-3.02/xpdf/pdfimages.cc
2 *** orig/xpdf/pdfimages.cc 2007-02-27 23:05:52.000000000 +0100
3 --- xpdf-3.02/xpdf/pdfimages.cc 2007-10-31 20:17:22.601449943 +0100
4 ***************
5 *** 118,130 ****
6 goto err1;
9 - // check for copy permission
10 - if (!doc->okToCopy()) {
11 - error(-1, "Copying of images from this document is not allowed.");
12 - exitCode = 3;
13 - goto err1;
14 - }
16 // get page range
17 if (firstPage < 1)
18 firstPage = 1;
19 --- 118,123 ----
20 diff -C 3 -r orig/xpdf/pdftotext.cc xpdf-3.02/xpdf/pdftotext.cc
21 *** orig/xpdf/pdftotext.cc 2007-02-27 23:05:52.000000000 +0100
22 --- xpdf-3.02/xpdf/pdftotext.cc 2007-10-31 20:17:34.392224196 +0100
23 ***************
24 *** 160,172 ****
25 goto err2;
28 - // check for copy permission
29 - if (!doc->okToCopy()) {
30 - error(-1, "Copying of text from this document is not allowed.");
31 - exitCode = 3;
32 - goto err2;
33 - }
35 // construct text file name
36 if (argc == 3) {
37 textFileName = new GString(argv[2]);
38 --- 160,165 ----
39 diff -C 3 -r orig/xpdf/XPDFCore.cc xpdf-3.02/xpdf/XPDFCore.cc
40 *** orig/xpdf/XPDFCore.cc 2007-02-27 23:05:52.000000000 +0100
41 --- xpdf-3.02/xpdf/XPDFCore.cc 2007-10-31 20:18:05.370494431 +0100
42 ***************
43 *** 384,394 ****
44 #ifndef NO_TEXT_SELECT
45 if (selectULX != selectLRX &&
46 selectULY != selectLRY) {
47 ! if (doc->okToCopy()) {
48 ! copySelection();
49 ! } else {
50 ! error(-1, "Copying of text from this document is not allowed.");
51 ! }
53 #endif
55 --- 384,390 ----
56 #ifndef NO_TEXT_SELECT
57 if (selectULX != selectLRX &&
58 selectULY != selectLRY) {
59 ! copySelection();
61 #endif
63 ***************
64 *** 407,415 ****
65 int pg;
66 double ulx, uly, lrx, lry;
68 - if (!doc->okToCopy()) {
69 - return;
70 - }
71 if (getSelection(&pg, &ulx, &uly, &lrx, &lry)) {
72 //~ for multithreading: need a mutex here
73 if (currentSelection) {
74 --- 403,408 ----