upgrade to xpdf 3.00.
[swftools.git] / pdf2swf / xpdf / Annot.cc
index b9c606f..245780d 100644 (file)
@@ -2,15 +2,16 @@
 //
 // 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"
@@ -96,7 +97,7 @@ void Annot::draw(Gfx *gfx) {
 
 Annots::Annots(XRef *xref, Object *annotsObj) {
   Annot *annot;
-  Object obj1, obj2;
+  Object obj1;
   int size;
   int i;
 
@@ -107,21 +108,16 @@ Annots::Annots(XRef *xref, Object *annotsObj) {
   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();
     }