pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msahy...@apache.org
Subject svn commit: r1647207 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDVariableText.java
Date Sun, 21 Dec 2014 20:33:39 GMT
Author: msahyoun
Date: Sun Dec 21 20:33:39 2014
New Revision: 1647207

URL: http://svn.apache.org/r1647207
Log:
PDFBOX-2516 don't cache default appearance string

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

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDVariableText.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDVariableText.java?rev=1647207&r1=1647206&r2=1647207&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDVariableText.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDVariableText.java
Sun Dec 21 20:33:39 2014
@@ -32,11 +32,6 @@ public abstract class PDVariableText ext
 {
 
     /**
-     * DA    Default appearance.
-     */
-    private COSString defaultAppearance;
-
-    /**
      * A Q value.
      */
     public static final int QUADDING_LEFT = 0;
@@ -85,9 +80,7 @@ public abstract class PDVariableText ext
      */
     public COSString getDefaultAppearance()
     {
-        COSBase daValue = getInheritableAttribute(COSName.DA);
-        defaultAppearance = (COSString) daValue;
-        return defaultAppearance;
+        return (COSString) getInheritableAttribute(COSName.DA);
     }
 
     /**
@@ -104,13 +97,11 @@ public abstract class PDVariableText ext
     {
         if (daValue != null)
         {
-            defaultAppearance = new COSString(daValue);
-            getDictionary().setItem(COSName.DA, defaultAppearance);
+            setInheritableAttribute(COSName.DA, new COSString(daValue));
         }
         else
         {
-            defaultAppearance = null;
-            getDictionary().removeItem(COSName.DA);
+            removeInheritableAttribute(COSName.DA);
         }
     }
     



Mime
View raw message