openbsd-ports/print/poppler/patches/patch-poppler_XRef_cc
kili 99ae2676d5 Update to poppler-0.14.3.
Major bumps on all shared libs.

Don't build the new poppler-cpp for now (still needs some tweaks).

Note: glitz omitted from WANTLIB on purpose -- according to landry@ it
will disappear after the upcoming cairo update.

ok ajacoutot@
2010-10-09 08:05:30 +00:00

62 lines
1.9 KiB
Plaintext

$OpenBSD: patch-poppler_XRef_cc,v 1.7 2010/10/09 08:05:30 kili Exp $
--- poppler/XRef.cc.orig Mon Jun 14 20:19:46 2010
+++ poppler/XRef.cc Wed Oct 6 17:22:17 2010
@@ -926,49 +926,38 @@ void XRef::setEncryption(int permFlagsA, GBool ownerPa
}
GBool XRef::okToPrint(GBool ignoreOwnerPW) {
- return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permPrint);
+ return gTrue;
}
// 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 (encrypted) {
- if (2 == encRevision) {
- return (okToPrint(ignoreOwnerPW));
- } else if (encRevision >= 3) {
- return (okToPrint(ignoreOwnerPW) && (permFlags & permHighResPrint));
- } else {
- // something weird - unknown security handler version
- return gFalse;
- }
- } else {
- return gTrue;
- }
+ return gTrue;
}
GBool XRef::okToChange(GBool ignoreOwnerPW) {
- return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permChange);
+ return gTrue;
}
GBool XRef::okToCopy(GBool ignoreOwnerPW) {
- return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permCopy);
+ return gTrue;
}
GBool XRef::okToAddNotes(GBool ignoreOwnerPW) {
- return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permNotes);
+ return gTrue;
}
GBool XRef::okToFillForm(GBool ignoreOwnerPW) {
- return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permFillForm);
+ return gTrue;
}
GBool XRef::okToAccessibility(GBool ignoreOwnerPW) {
- return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permAccessibility);
+ return gTrue;
}
GBool XRef::okToAssemble(GBool ignoreOwnerPW) {
- return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permAssemble);
+ return gTrue;
}
Object *XRef::fetch(int num, int gen, Object *obj) {