openbsd-ports/print/poppler/patches/patch-poppler_XRef_cc
kili 58d821bbc6 Update to poppler-0.12.4.
Use the converters/libiconv MODULE (prompted by ajacoutot).

ok ajacoutot@, edd@ (except for the patch hunk move bits, but I
really prefer a silent `make update-patches')
2010-05-08 17:09:48 +00:00

58 lines
1.8 KiB
Plaintext

$OpenBSD: patch-poppler_XRef_cc,v 1.6 2010/05/08 17:09:48 kili Exp $
--- poppler/XRef.cc.orig Sun Jan 17 01:06:57 2010
+++ poppler/XRef.cc Fri May 7 23:04:39 2010
@@ -881,45 +881,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) {