openbsd-ports/print/poppler/patches/patch-poppler_XRef_cc
kili b5659e40c4 Update to poppler-0.12.1.
Contains the xpdf-3.02pl4 diffs and some additional bug fixes.

ok ajacoutot@
2009-10-26 19:23:45 +00:00

58 lines
1.8 KiB
Plaintext

$OpenBSD: patch-poppler_XRef_cc,v 1.4 2009/10/26 19:23:46 kili Exp $
--- poppler/XRef.cc.orig Sun Sep 14 22:35:48 2008
+++ poppler/XRef.cc Sun Oct 26 12:45:54 2008
@@ -850,45 +850,38 @@ void XRef::setEncryption(int permFlagsA, GBool ownerPa
}
GBool XRef::okToPrint(GBool ignoreOwnerPW) {
- return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permPrint);
+ return (1);
}
// we can print at high res if we are only doing security handler revision
// 2 (and we are allowed to print at all), or with security handler rev
// 3 and we are allowed to print, and bit 12 is set.
GBool XRef::okToPrintHighRes(GBool ignoreOwnerPW) {
- if (2 == encRevision) {
- return (okToPrint(ignoreOwnerPW));
- } else if (encRevision >= 3) {
- return (okToPrint(ignoreOwnerPW) && (permFlags & permHighResPrint));
- } else {
- // something weird - unknown security handler version
- return gFalse;
- }
+ return (1);
}
GBool XRef::okToChange(GBool ignoreOwnerPW) {
- return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permChange);
+ return (1);
}
GBool XRef::okToCopy(GBool ignoreOwnerPW) {
- return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permCopy);
+ return (1);
}
GBool XRef::okToAddNotes(GBool ignoreOwnerPW) {
- return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permNotes);
+ return (1);
}
GBool XRef::okToFillForm(GBool ignoreOwnerPW) {
- return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permFillForm);
+ return (1);
}
GBool XRef::okToAccessibility(GBool ignoreOwnerPW) {
- return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permAccessibility);
+ return (1);
}
GBool XRef::okToAssemble(GBool ignoreOwnerPW) {
- return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permAssemble);
+ return (1);
}
Object *XRef::fetch(int num, int gen, Object *obj) {