pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msahy...@apache.org
Subject svn commit: r1666799 - /pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDField.java
Date Sun, 15 Mar 2015 13:51:40 GMT
Author: msahyoun
Date: Sun Mar 15 13:51:39 2015
New Revision: 1666799

URL: http://svn.apache.org/r1666799
Log:
PDFBOX-2710 fix handling of non terminal fields

Modified:
    pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDField.java

Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDField.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDField.java?rev=1666799&r1=1666798&r2=1666799&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDField.java
(original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDField.java
Sun Mar 15 13:51:39 2015
@@ -521,6 +521,7 @@ public abstract class PDField implements
     {
         List<COSObjectable> retval = null;
         COSArray kids = (COSArray) getDictionary().getDictionaryObject(COSName.KIDS);
+        
         if (kids != null)
         {
             List<COSObjectable> kidsList = new ArrayList<COSObjectable>();
@@ -538,15 +539,11 @@ public abstract class PDField implements
                 // of its own shall not be considered a field but simply a Widget annotation.
                 if (kidDictionary.getDictionaryObject(COSName.T) != null)
                 {
-                    COSDictionary parent = (COSDictionary) kidDictionary.getDictionaryObject(COSName.PARENT,
COSName.P);
-                    if (kidDictionary.getDictionaryObject(COSName.FT) != null
-                            || (parent != null && parent.getDictionaryObject(COSName.FT)
!= null))
+                    PDField field = PDFieldFactory.createField(acroForm, kidDictionary);
+                        
+                    if (field != null)
                     {
-                        PDField field = PDFieldFactory.createField(acroForm, kidDictionary);
-                        if (field != null)
-                        {
-                            kidsList.add(field);
-                        }
+                       kidsList.add(field);
                     }
                 }
                 else if ("Widget".equals(kidDictionary.getNameAsString(COSName.SUBTYPE)))



Mime
View raw message