Annot.cc (xpdf-4.03) | : | Annot.cc (xpdf-4.04) | ||
---|---|---|---|---|
skipping to change at line 227 | skipping to change at line 227 | |||
} | } | |||
obj2.free(); | obj2.free(); | |||
} | } | |||
} else { | } else { | |||
// an empty Border array also means "no border" | // an empty Border array also means "no border" | |||
borderWidth = 0; | borderWidth = 0; | |||
} | } | |||
} | } | |||
} | } | |||
obj1.free(); | obj1.free(); | |||
// Acrobat ignores borders with unreasonable widths | ||||
if (borderWidth > 1 && (borderWidth > xMax - xMin || | ||||
borderWidth > yMax - yMin)) { | ||||
borderWidth = 0; | ||||
} | ||||
if (dict->lookup("C", &obj1)->isArray() && | if (dict->lookup("C", &obj1)->isArray() && | |||
(obj1.arrayGetLength() == 1 || | (obj1.arrayGetLength() == 1 || | |||
obj1.arrayGetLength() == 3 || | obj1.arrayGetLength() == 3 || | |||
obj1.arrayGetLength() == 4)) { | obj1.arrayGetLength() == 4)) { | |||
nBorderColorComps = obj1.arrayGetLength(); | nBorderColorComps = obj1.arrayGetLength(); | |||
for (i = 0; i < nBorderColorComps; ++i) { | for (i = 0; i < nBorderColorComps; ++i) { | |||
if (obj1.arrayGet(i, &obj2)->isNum()) { | if (obj1.arrayGet(i, &obj2)->isNum()) { | |||
borderColor[i] = obj2.getNum(); | borderColor[i] = obj2.getNum(); | |||
} else { | } else { | |||
borderColor[i] = 0; | borderColor[i] = 0; | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 5 lines changed or added |