//
// Annot.cc
//
-// Copyright 2000-2002 Glyph & Cog, LLC
+// Copyright 2000-2003 Glyph & Cog, LLC
//
//========================================================================
-#ifdef __GNUC__
+#include <aconf.h>
+
+#ifdef USE_GCC_PRAGMAS
#pragma implementation
#endif
-#include <aconf.h>
#include "gmem.h"
#include "Object.h"
#include "Gfx.h"
Annots::Annots(XRef *xref, Object *annotsObj) {
Annot *annot;
- Object obj1, obj2;
+ Object obj1;
int size;
int i;
if (annotsObj->isArray()) {
for (i = 0; i < annotsObj->arrayGetLength(); ++i) {
if (annotsObj->arrayGet(i, &obj1)->isDict()) {
- obj1.dictLookup("Subtype", &obj2);
- if (obj2.isName("Widget") ||
- obj2.isName("Stamp")) {
- annot = new Annot(xref, obj1.getDict());
- if (annot->isOk()) {
- if (nAnnots >= size) {
- size += 16;
- annots = (Annot **)grealloc(annots, size * sizeof(Annot *));
- }
- annots[nAnnots++] = annot;
- } else {
- delete annot;
+ annot = new Annot(xref, obj1.getDict());
+ if (annot->isOk()) {
+ if (nAnnots >= size) {
+ size += 16;
+ annots = (Annot **)grealloc(annots, size * sizeof(Annot *));
}
+ annots[nAnnots++] = annot;
+ } else {
+ delete annot;
}
- obj2.free();
}
obj1.free();
}