[poppler] poppler/Annot.h poppler/Page.cc
Carlos Garcia Campos
carlosgc at kemper.freedesktop.org
Sat Apr 18 02:53:23 PDT 2015
poppler/Annot.h | 2 +-
poppler/Page.cc | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 1aae63ebc6fffe9fa1a2898e4ed733c22e312015
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date: Sat Apr 18 11:46:41 2015 +0200
annots: Add popup annots without a markup annot associated to the list of annots
For consistency with Annots::createAnnot().
diff --git a/poppler/Annot.h b/poppler/Annot.h
index 8fde6a6..7afed5f 100644
--- a/poppler/Annot.h
+++ b/poppler/Annot.h
@@ -697,7 +697,7 @@ public:
~AnnotPopup();
Object *getParent(Object *obj) { return parent.fetch (xref, obj); }
- Object *getParentNF(Object *obj) { return &parent; }
+ Object *getParentNF() { return &parent; }
void setParent(Object *parentA);
void setParent(Annot *parentA);
GBool getOpen() const { return open; }
diff --git a/poppler/Page.cc b/poppler/Page.cc
index ef0811b..c56b41f 100644
--- a/poppler/Page.cc
+++ b/poppler/Page.cc
@@ -442,7 +442,11 @@ void Page::addAnnot(Annot *annot) {
obj1.free();
}
- if (annot->getType() != Annot::typePopup) {
+ // Popup annots are already handled by markup annots,
+ // so add to the list only Popup annots without a
+ // markup annotation associated.
+ if (annot->getType() != Annot::typePopup ||
+ static_cast<AnnotPopup*>(annot)->getParentNF()->isNull()) {
annots->appendAnnot(annot);
}
annot->setPage(num, gTrue);
More information about the poppler
mailing list