[poppler] Branch 'xpdf303merge' - poppler/Gfx.cc

Carlos Garcia Campos carlosgc at kemper.freedesktop.org
Sun Sep 18 04:32:42 PDT 2011


 poppler/Gfx.cc |   17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

New commits:
commit c40353d3bb761f5be8ddbd2bf5341e83901fb132
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Sun Sep 18 13:32:07 2011 +0200

    xpdf303: OC entry is specific to form XObjects

diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
index 70c3b09..e931925 100644
--- a/poppler/Gfx.cc
+++ b/poppler/Gfx.cc
@@ -3987,14 +3987,6 @@ void Gfx::opXObject(Object args[], int numArgs) {
     return;
   }
 
-  obj1.streamGetDict()->lookupNF("OC", &obj2);
-  if (catalog->getOptContentConfig() && !catalog->getOptContentConfig()->optContentIsVisible(&obj2)) {
-    obj2.free();
-    obj1.free();
-    return;
-  }
-  obj2.free();
-
 #if OPI_SUPPORT
   obj1.streamGetDict()->lookup("OPI", &opiDict);
   if (opiDict.isDict()) {
@@ -4466,6 +4458,15 @@ void Gfx::doForm(Object *str) {
   }
   obj1.free();
 
+  // check for optional content key
+  dict->lookupNF("OC", &obj1);
+  if (catalog->getOptContentConfig() && !catalog->getOptContentConfig()->optContentIsVisible(&obj1)) {
+    obj2.free();
+    obj1.free();
+    return;
+  }
+  obj1.free();
+
   // get bounding box
   dict->lookup("BBox", &bboxObj);
   if (!bboxObj.isArray()) {


More information about the poppler mailing list