pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1855010 - in /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption: PDCryptFilterDictionary.java PDEncryption.java
Date Thu, 07 Mar 2019 21:01:41 GMT
Author: tilman
Date: Thu Mar  7 21:01:40 2019
New Revision: 1855010

URL: http://svn.apache.org/viewvc?rev=1855010&view=rev
Log:
PDFBOX-4436: make PDCryptFilterDictionary a COSObjectable

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PDCryptFilterDictionary.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PDEncryption.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PDCryptFilterDictionary.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PDCryptFilterDictionary.java?rev=1855010&r1=1855009&r2=1855010&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PDCryptFilterDictionary.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PDCryptFilterDictionary.java
Thu Mar  7 21:01:40 2019
@@ -19,6 +19,7 @@ package org.apache.pdfbox.pdmodel.encryp
 
 import org.apache.pdfbox.cos.COSDictionary;
 import org.apache.pdfbox.cos.COSName;
+import org.apache.pdfbox.pdmodel.common.COSObjectable;
 
 /**
  * This class is a specialized view of the crypt filter dictionary of a PDF document.
@@ -26,7 +27,7 @@ import org.apache.pdfbox.cos.COSName;
  * manage its fields.
  *
  */
-public class PDCryptFilterDictionary
+public class PDCryptFilterDictionary implements COSObjectable
 {
 
     /**
@@ -56,7 +57,7 @@ public class PDCryptFilterDictionary
      *
      * @return The COS dictionary that this object wraps.
      */
-    public COSDictionary getCOSDictionary()
+    public COSDictionary getCOSObject()
     {
         return cryptFilterDictionary;
     }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PDEncryption.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PDEncryption.java?rev=1855010&r1=1855009&r2=1855010&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PDEncryption.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PDEncryption.java
Thu Mar  7 21:01:40 2019
@@ -507,7 +507,7 @@ public class PDEncryption
             dictionary.setItem(COSName.CF, cfDictionary);
         }
         cfDictionary.setDirect(true); // PDFBOX-4436 direct obj needed for Adobe Reader on
Android
-        cfDictionary.setItem(cryptFilterName, cryptFilterDictionary.getCOSDictionary());
+        cfDictionary.setItem(cryptFilterName, cryptFilterDictionary.getCOSObject());
     }
     
     /**
@@ -517,7 +517,7 @@ public class PDEncryption
      */
     public void setStdCryptFilterDictionary(PDCryptFilterDictionary cryptFilterDictionary)
     {
-        cryptFilterDictionary.getCOSDictionary().setDirect(true); // PDFBOX-4436
+        cryptFilterDictionary.getCOSObject().setDirect(true); // PDFBOX-4436
         setCryptFilterDictionary(COSName.STD_CF, cryptFilterDictionary);
     }
 
@@ -528,7 +528,7 @@ public class PDEncryption
      */
     public void setDefaultCryptFilterDictionary(PDCryptFilterDictionary defaultFilterDictionary)
     {
-        defaultFilterDictionary.getCOSDictionary().setDirect(true); // PDFBOX-4436
+        defaultFilterDictionary.getCOSObject().setDirect(true); // PDFBOX-4436
         setCryptFilterDictionary(COSName.DEFAULT_CRYPT_FILTER, defaultFilterDictionary);
     }
 



Mime
View raw message