poppler/Form.cc |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 31f3eb2d6b43f7fbf4d978730d109b08b1563989
Author: Albert Astals Cid <[EMAIL PROTECTED]>
Date:   Wed Sep 3 21:49:23 2008 +0200

    Only set the state to true if the AS value is the same as parent's V
    
    Fixes bug 16121 and 15535

diff --git a/poppler/Form.cc b/poppler/Form.cc
index 27a4d16..192d428 100644
--- a/poppler/Form.cc
+++ b/poppler/Form.cc
@@ -278,9 +278,13 @@ void FormWidgetButton::loadDefaults ()
   }
 
   if (Form::fieldLookup(dict, "V", &obj1)->isName()) {
-    if (strcmp (obj1.getName(), "Off") != 0) {
-      setState(gTrue);
+    Object obj2;
+    if (dict->lookup("AS", &obj2)->isName(obj1.getName())) {
+      if (strcmp (obj1.getName(), "Off") != 0) {
+        setState(gTrue);
+      }
     }
+    obj2.free();
   } else if (obj1.isArray()) { //handle the case where we have multiple choices
     error(-1, "FormWidgetButton:: multiple choice isn't supported yet\n");
   }
_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to