pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1651428 - in /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/documentnavigation/outline: PDDocumentOutline.java PDOutlineItem.java PDOutlineNode.java
Date Tue, 13 Jan 2015 18:01:40 GMT
Author: tilman
Date: Tue Jan 13 18:01:40 2015
New Revision: 1651428

URL: http://svn.apache.org/r1651428
Log:
PDFBOX-2576: use COSName constants where possible

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDDocumentOutline.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDOutlineItem.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDOutlineNode.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDDocumentOutline.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDDocumentOutline.java?rev=1651428&r1=1651427&r2=1651428&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDDocumentOutline.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDDocumentOutline.java
Tue Jan 13 18:01:40 2015
@@ -17,6 +17,7 @@
 package org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline;
 
 import org.apache.pdfbox.cos.COSDictionary;
+import org.apache.pdfbox.cos.COSName;
 
 /**
  * This represents an outline in a pdf document.
@@ -33,7 +34,7 @@ public class PDDocumentOutline extends P
     public PDDocumentOutline()
     {
         super();
-        node.setName( "Type", "Outlines" );
+        node.setName( COSName.TYPE, "Outlines" );
     }
 
     /**

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDOutlineItem.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDOutlineItem.java?rev=1651428&r1=1651427&r2=1651428&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDOutlineItem.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDOutlineItem.java
Tue Jan 13 18:01:40 2015
@@ -89,6 +89,7 @@ public class PDOutlineItem extends PDOut
     /**
      * {@inheritDoc}
      */
+    @Override
     public PDOutlineNode getParent()
     {
         return super.getParent();

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDOutlineNode.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDOutlineNode.java?rev=1651428&r1=1651427&r2=1651428&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDOutlineNode.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDOutlineNode.java
Tue Jan 13 18:01:40 2015
@@ -58,6 +58,7 @@ public class PDOutlineNode implements CO
      *
      * @return The cos object that matches this Java object.
      */
+    @Override
     public COSBase getCOSObject()
     {
         return node;
@@ -106,7 +107,7 @@ public class PDOutlineNode implements CO
      */
     protected void setParent( PDOutlineNode parent )
     {
-        node.setItem( "Parent", parent );
+        node.setItem(COSName.PARENT, parent );
     }
 
     /**
@@ -174,7 +175,7 @@ public class PDOutlineNode implements CO
      */
     protected void setFirstChild( PDOutlineNode outlineNode )
     {
-        node.setItem( "First", outlineNode );
+        node.setItem(COSName.FIRST, outlineNode);
     }
 
     /**



Mime
View raw message