pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msahy...@apache.org
Subject svn commit: r1655672 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDFieldTreeNode.java
Date Thu, 29 Jan 2015 14:15:50 GMT
Author: msahyoun
Date: Thu Jan 29 14:15:50 2015
New Revision: 1655672

URL: http://svn.apache.org/r1655672
Log:
PDFBOX-2640 correct resolving /Kids entries

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDFieldTreeNode.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDFieldTreeNode.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDFieldTreeNode.java?rev=1655672&r1=1655671&r2=1655672&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDFieldTreeNode.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDFieldTreeNode.java
Thu Jan 29 14:15:50 2015
@@ -609,6 +609,7 @@ public abstract class PDFieldTreeNode im
             for (int i = 0; i < kids.size(); i++)
             {
                 COSDictionary kidDictionary = (COSDictionary) kids.getObject(i);
+                
                 if (kidDictionary == null)
                 {
                     continue;
@@ -617,19 +618,12 @@ public abstract class PDFieldTreeNode im
                 // Decide if the kid is field or a widget annotation.
                 // A field dictionary that does not have a partial field name (T entry)
                 // of its own shall not be considered a field but simply a Widget annotation.

-                
                 if (kidDictionary.getDictionaryObject(COSName.T) != null)
                 {
-                    COSDictionary parentDictionary = (COSDictionary) kidDictionary.getDictionaryObject(
-                            COSName.PARENT, COSName.P);
-                    if (kidDictionary.getDictionaryObject(COSName.FT) != null
-                            || (parentDictionary != null && parentDictionary.getDictionaryObject(COSName.FT)
!= null))
+                    PDFieldTreeNode field = PDFieldTreeNode.createField(acroForm, kidDictionary,
this);
+                    if (field != null)
                     {
-                        PDFieldTreeNode field = PDFieldTreeNode.createField(acroForm, kidDictionary,
this);
-                        if (field != null)
-                        {
-                            kidsList.add(field);
-                        }
+                        kidsList.add(field);
                     }
                 }
                 else



Mime
View raw message