summaryrefslogtreecommitdiff
path: root/poppler
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2006-02-06 18:50:10 +0000
committerAlbert Astals Cid <aacid@kde.org>2006-02-06 18:50:10 +0000
commitf04e2c4f20f821ff8cb9465a715ccbb22091d449 (patch)
tree891e4939970b012cc7116b01f424684f9cdf01ad /poppler
parent33e98f81cdfda0935ac7ea79a691976465ec790b (diff)
Jeff Muizelaar's improvements to my yesterday's small patches
Diffstat (limited to 'poppler')
-rw-r--r--poppler/Annot.cc9
-rw-r--r--poppler/JBIG2Stream.cc2
2 files changed, 5 insertions, 6 deletions
diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index b7d13561..2e39f3a6 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -211,15 +211,14 @@ void Annot::generateAppearance(Dict *acroForm, Dict *dict) {
// build the appearance stream dictionary
appearDict.initDict(xref);
- appearDict.dictAdd(copyString("Length"),
- obj1.initInt(appearBuf->getLength()));
- appearDict.dictAdd(copyString("Subtype"), obj1.initName("Form"));
+ appearDict.dictAdd("Length", obj1.initInt(appearBuf->getLength()));
+ appearDict.dictAdd("Subtype", obj1.initName("Form"));
obj1.initArray(xref);
obj1.arrayAdd(obj2.initReal(0));
obj1.arrayAdd(obj2.initReal(0));
obj1.arrayAdd(obj2.initReal(xMax - xMin));
obj1.arrayAdd(obj2.initReal(yMax - yMin));
- appearDict.dictAdd(copyString("BBox"), &obj1);
+ appearDict.dictAdd("BBox", &obj1);
// find the resource dictionary
dict->lookup("DR", &drObj);
@@ -244,7 +243,7 @@ void Annot::generateAppearance(Dict *acroForm, Dict *dict) {
}
}
if (drObj.isDict()) {
- appearDict.dictAdd(copyString("Resources"), drObj.copy(&obj1));
+ appearDict.dictAdd("Resources", drObj.copy(&obj1));
}
drObj.free();
diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc
index 3ce53e99..337f5ccc 100644
--- a/poppler/JBIG2Stream.cc
+++ b/poppler/JBIG2Stream.cc
@@ -2325,7 +2325,7 @@ void JBIG2Stream::readHalftoneRegionSeg(Guint segNum, GBool imm,
error(getPos(), "Bad size in JBIG2 halftone segment");
return;
}
- if (h < 0 || w == 0 || h >= INT_MAX / w) {
+ if (w == 0 || h >= INT_MAX / w) {
error(getPos(), "Bad size in JBIG2 bitmap segment");
return;
}