pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jahew...@apache.org
Subject svn commit: r1634679 - in /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel: PDPage.java PDPageTree.java
Date Mon, 27 Oct 2014 20:33:59 GMT
Author: jahewson
Date: Mon Oct 27 20:33:59 2014
New Revision: 1634679

URL: http://svn.apache.org/r1634679
Log:
PDFBOX-2423: Change name of  PDPageTree#getInheritedAttribute as suggested by Maruan

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageTree.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java?rev=1634679&r1=1634678&r2=1634679&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java Mon Oct 27 20:33:59
2014
@@ -116,7 +116,7 @@ public class PDPage implements COSObject
         if (pageResources == null)
         {
             COSDictionary resources = (COSDictionary)
-                    PDPageTree.getInheritedAttribute(page, COSName.RESOURCES);
+                    PDPageTree.getInheritableAttribute(page, COSName.RESOURCES);
 
             // note: it's an error for resources to not be present
             if (resources != null)
@@ -179,7 +179,7 @@ public class PDPage implements COSObject
     {
         if (mediaBox == null)
         {
-            COSArray array = (COSArray) PDPageTree.getInheritedAttribute(page, COSName.MEDIA_BOX);
+            COSArray array = (COSArray) PDPageTree.getInheritableAttribute(page, COSName.MEDIA_BOX);
             if (array != null)
             {
                 mediaBox = new PDRectangle(array);
@@ -213,7 +213,7 @@ public class PDPage implements COSObject
      */
     public PDRectangle getCropBox()
     {
-        COSArray array = (COSArray) PDPageTree.getInheritedAttribute(page, COSName.CROP_BOX);
+        COSArray array = (COSArray) PDPageTree.getInheritableAttribute(page, COSName.CROP_BOX);
         if (array != null)
         {
             return clipToMediaBox(new PDRectangle(array));
@@ -378,7 +378,7 @@ public class PDPage implements COSObject
      */
     public int getRotation()
     {
-        COSNumber value = (COSNumber) PDPageTree.getInheritedAttribute(page, COSName.ROTATE);
+        COSNumber value = (COSNumber) PDPageTree.getInheritableAttribute(page, COSName.ROTATE);
         if (value != null)
         {
            return value.intValue();

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageTree.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageTree.java?rev=1634679&r1=1634678&r2=1634679&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageTree.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageTree.java Mon Oct 27
20:33:59 2014
@@ -28,7 +28,6 @@ import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.pdmodel.common.COSObjectable;
 
 import java.util.ArrayList;
-import java.util.HashSet;
 import java.util.List;
 
 /**
@@ -76,7 +75,7 @@ public class PDPageTree implements COSOb
      * @param key the key to look up
      * @return COS value for the given key
      */
-    public static COSBase getInheritedAttribute(COSDictionary node, COSName key)
+    public static COSBase getInheritableAttribute(COSDictionary node, COSName key)
     {
         COSBase value = node.getDictionaryObject(key);
         if (value != null)
@@ -87,7 +86,7 @@ public class PDPageTree implements COSOb
         COSDictionary parent = (COSDictionary) node.getDictionaryObject(COSName.PARENT, COSName.P);
         if (parent != null)
         {
-            return getInheritedAttribute(parent, key);
+            return getInheritableAttribute(parent, key);
         }
 
         return null;



Mime
View raw message