diff options
author | Isaac Dunham <ibid.ag@gmail.com> | 2016-01-19 22:07:41 -0800 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2016-01-20 08:33:31 +0000 |
commit | a1001dc5198b6d7a15bf535060a5d88a7ffb40af (patch) | |
tree | df510ec264c5242d38707a10315cfc5cab633695 /community/xpdf/xpdf-3.04-protection.patch | |
parent | 8c68262f6d9619eceb4ba3e573dce34318e3c3dd (diff) | |
download | aports-a1001dc5198b6d7a15bf535060a5d88a7ffb40af.tar.bz2 aports-a1001dc5198b6d7a15bf535060a5d88a7ffb40af.tar.xz |
community/xpdf: move from testing
It's been working well for quite a while.
Diffstat (limited to 'community/xpdf/xpdf-3.04-protection.patch')
-rw-r--r-- | community/xpdf/xpdf-3.04-protection.patch | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/community/xpdf/xpdf-3.04-protection.patch b/community/xpdf/xpdf-3.04-protection.patch new file mode 100644 index 0000000000..677db00095 --- /dev/null +++ b/community/xpdf/xpdf-3.04-protection.patch @@ -0,0 +1,84 @@ +Port Johannes Bauer's protection patch to 3.04. +This does NOT disable the error messages, since the user should +be aware of the author's intent. + +Also, this does not deal with permission to print. + +diff --git a/xpdf/PDFCore.cc b/xpdf/PDFCore.cc +index 34b6483..e93fe52 100644 +--- a/xpdf/PDFCore.cc ++++ b/xpdf/PDFCore.cc +@@ -1677,9 +1677,6 @@ GString *PDFCore::extractText(int pg, double xMin, double yMin, + int x0, y0, x1, y1, t; + GString *s; + +- if (!doc->okToCopy()) { +- return NULL; +- } + if ((page = findPage(pg))) { + cvtUserToDev(pg, xMin, yMin, &x0, &y0); + cvtUserToDev(pg, xMax, yMax, &x1, &y1); +diff --git a/xpdf/XPDFCore.cc b/xpdf/XPDFCore.cc +index 9a3725f..1562c7a 100644 +--- a/xpdf/XPDFCore.cc ++++ b/xpdf/XPDFCore.cc +@@ -384,9 +384,8 @@ void XPDFCore::endSelection(int wx, int wy) { + #ifndef NO_TEXT_SELECT + if (selectULX != selectLRX && + selectULY != selectLRY) { +- if (doc->okToCopy()) { + copySelection(); +- } else { ++ if (!doc->okToCopy()) { + error(errNotAllowed, -1, + "Copying of text from this document is not allowed."); + } +@@ -408,9 +407,6 @@ void XPDFCore::copySelection() { + int pg; + double ulx, uly, lrx, lry; + +- if (!doc->okToCopy()) { +- return; +- } + if (getSelection(&pg, &ulx, &uly, &lrx, &lry)) { + //~ for multithreading: need a mutex here + if (currentSelection) { +diff --git a/xpdf/pdfimages.cc b/xpdf/pdfimages.cc +index dc79443..9aaa811 100644 +--- a/xpdf/pdfimages.cc ++++ b/xpdf/pdfimages.cc +@@ -122,8 +122,6 @@ int main(int argc, char *argv[]) { + if (!doc->okToCopy()) { + error(errNotAllowed, -1, + "Copying of images from this document is not allowed."); +- exitCode = 3; +- goto err1; + } + + // get page range +diff --git a/xpdf/pdftohtml.cc b/xpdf/pdftohtml.cc +index f1fe691..824233e 100644 +--- a/xpdf/pdftohtml.cc ++++ b/xpdf/pdftohtml.cc +@@ -134,8 +134,6 @@ int main(int argc, char *argv[]) { + if (!doc->okToCopy()) { + error(errNotAllowed, -1, + "Copying of text from this document is not allowed."); +- exitCode = 3; +- goto err1; + } + + // get page range +diff --git a/xpdf/pdftotext.cc b/xpdf/pdftotext.cc +index 758413e..e6779fa 100644 +--- a/xpdf/pdftotext.cc ++++ b/xpdf/pdftotext.cc +@@ -192,8 +192,6 @@ int main(int argc, char *argv[]) { + if (!doc->okToCopy()) { + error(errNotAllowed, -1, + "Copying of text from this document is not allowed."); +- exitCode = 3; +- goto err2; + } + + // construct text file name |