102 lines
2.7 KiB
Diff
102 lines
2.7 KiB
Diff
diff -u -Naur xpdf-4.01.01/xpdf/pdfimages.cc xpdf-4.01.01-new/xpdf/pdfimages.cc
|
|
--- xpdf-4.01.01/xpdf/pdfimages.cc 2019-03-14 22:01:02.000000000 +0100
|
|
+++ xpdf-4.01.01-new/xpdf/pdfimages.cc 2019-06-22 08:20:28.728639349 +0200
|
|
@@ -126,6 +126,7 @@
|
|
goto err1;
|
|
}
|
|
|
|
+#ifdef ENFORCE_PERMISSIONS
|
|
// check for copy permission
|
|
if (!doc->okToCopy()) {
|
|
error(errNotAllowed, -1,
|
|
@@ -133,6 +134,7 @@
|
|
exitCode = 3;
|
|
goto err1;
|
|
}
|
|
+#endif
|
|
|
|
// get page range
|
|
if (firstPage < 1)
|
|
diff -u -Naur xpdf-4.01.01/xpdf/pdftohtml.cc xpdf-4.01.01-new/xpdf/pdftohtml.cc
|
|
--- xpdf-4.01.01/xpdf/pdftohtml.cc 2019-03-14 22:01:02.000000000 +0100
|
|
+++ xpdf-4.01.01-new/xpdf/pdftohtml.cc 2019-06-22 08:20:37.809638762 +0200
|
|
@@ -138,6 +138,7 @@
|
|
goto err1;
|
|
}
|
|
|
|
+#ifdef ENFORCE_PERMISSIONS
|
|
// check for copy permission
|
|
if (!doc->okToCopy()) {
|
|
error(errNotAllowed, -1,
|
|
@@ -145,6 +146,7 @@
|
|
exitCode = 3;
|
|
goto err1;
|
|
}
|
|
+#endif
|
|
|
|
// get page range
|
|
if (firstPage < 1) {
|
|
diff -u -Naur xpdf-4.01.01/xpdf/pdftops.cc xpdf-4.01.01-new/xpdf/pdftops.cc
|
|
--- xpdf-4.01.01/xpdf/pdftops.cc 2019-03-14 22:01:02.000000000 +0100
|
|
+++ xpdf-4.01.01-new/xpdf/pdftops.cc 2019-06-22 08:21:06.118636934 +0200
|
|
@@ -318,12 +318,14 @@
|
|
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 -u -Naur xpdf-4.01.01/xpdf/pdftotext.cc xpdf-4.01.01-new/xpdf/pdftotext.cc
|
|
--- xpdf-4.01.01/xpdf/pdftotext.cc 2019-03-14 22:01:02.000000000 +0100
|
|
+++ xpdf-4.01.01-new/xpdf/pdftotext.cc 2019-06-22 08:20:10.134640549 +0200
|
|
@@ -197,6 +197,7 @@
|
|
goto err2;
|
|
}
|
|
|
|
+#ifdef ENFORCE_PERMISSIONS
|
|
// check for copy permission
|
|
if (!doc->okToCopy()) {
|
|
error(errNotAllowed, -1,
|
|
@@ -204,6 +205,7 @@
|
|
exitCode = 3;
|
|
goto err2;
|
|
}
|
|
+#endif
|
|
|
|
// construct text file name
|
|
if (argc == 3) {
|
|
diff -u -Naur xpdf-4.01.01/xpdf-qt/QtPDFCore.cc xpdf-4.01.01-new/xpdf-qt/QtPDFCore.cc
|
|
--- xpdf-4.01.01/xpdf-qt/QtPDFCore.cc 2019-03-14 22:01:02.000000000 +0100
|
|
+++ xpdf-4.01.01-new/xpdf-qt/QtPDFCore.cc 2019-06-22 08:21:56.460633683 +0200
|
|
@@ -447,9 +447,11 @@
|
|
QChar c;
|
|
int i;
|
|
|
|
+#ifdef ENFORCE_PERMISSIONS
|
|
if (!doc->okToCopy()) {
|
|
return "";
|
|
}
|
|
+#endif
|
|
if (!(s = getSelectedText())) {
|
|
return "";
|
|
}
|
|
@@ -476,9 +478,11 @@
|
|
if (!toClipboard && !QApplication::clipboard()->supportsSelection()) {
|
|
return;
|
|
}
|
|
+#ifdef ENFORCE_PERMISSIONS
|
|
if (!doc->okToCopy()) {
|
|
return;
|
|
}
|
|
+#endif
|
|
if (hasSelection()) {
|
|
QApplication::clipboard()->setText(getSelectedTextQString(),
|
|
toClipboard ? QClipboard::Clipboard
|