X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=pdf2swf%2Fxpdf%2FAnnot.cc;h=245780dab375fb9cdffd2e0cb719d18d38656c7c;hb=refs%2Ftags%2Fxpdf-3-00;hp=b9c606f4d47c305aee429846167dbee438073daf;hpb=3df3a8d12d7a516579a4eae276b077c015df0f70;p=swftools.git diff --git a/pdf2swf/xpdf/Annot.cc b/pdf2swf/xpdf/Annot.cc index b9c606f..245780d 100644 --- a/pdf2swf/xpdf/Annot.cc +++ b/pdf2swf/xpdf/Annot.cc @@ -2,15 +2,16 @@ // // Annot.cc // -// Copyright 2000-2002 Glyph & Cog, LLC +// Copyright 2000-2003 Glyph & Cog, LLC // //======================================================================== -#ifdef __GNUC__ +#include + +#ifdef USE_GCC_PRAGMAS #pragma implementation #endif -#include #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(); }