pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msahy...@apache.org
Subject svn commit: r1641243 - in /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form: PDCheckbox.java PDRadioButton.java
Date Sun, 23 Nov 2014 19:11:41 GMT
Author: msahyoun
Date: Sun Nov 23 19:11:41 2014
New Revision: 1641243

URL: http://svn.apache.org/r1641243
Log:
PDFBOX-2516 allow to retrieve default value DV

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

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDCheckbox.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDCheckbox.java?rev=1641243&r1=1641242&r2=1641243&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDCheckbox.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDCheckbox.java
Sun Nov 23 19:11:41 2014
@@ -134,6 +134,12 @@ public final class PDCheckbox extends PD
     }
 
     @Override
+    public COSName getDefaultValue()
+    {
+        return getDictionary().getCOSName(COSName.DV);
+    }
+    
+    @Override
     public COSName getValue()
     {
         return getDictionary().getCOSName( COSName.V );

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDRadioButton.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDRadioButton.java?rev=1641243&r1=1641242&r2=1641243&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDRadioButton.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDRadioButton.java
Sun Nov 23 19:11:41 2014
@@ -64,6 +64,14 @@ public final class PDRadioButton extends
         return getDictionary().getFlag(COSName.FF, FLAG_RADIOS_IN_UNISON);
     }
 
+    
+    @Override
+    public COSName getDefaultValue()
+    {
+        return getDictionary().getCOSName(COSName.DV);
+    }
+    
+    
     @Override
     public COSName getValue()
     {
@@ -99,7 +107,7 @@ public final class PDRadioButton extends
         }
         else
         {
-            throw new RuntimeException("The value of a redio button has to be a name object.");
+            throw new RuntimeException("The value of a radio button has to be a name object.");
         }
     }
 



Mime
View raw message