You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2021/10/24 08:10:59 UTC
svn commit: r1894521 -
/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/multipdf/LayerUtility.java
Author: tilman
Date: Sun Oct 24 08:10:59 2021
New Revision: 1894521
URL: http://svn.apache.org/viewvc?rev=1894521&view=rev
Log:
PDFBOX-4892: remove boolean parameter that hasn't been used for 10 years
Modified:
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/multipdf/LayerUtility.java
Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/multipdf/LayerUtility.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/multipdf/LayerUtility.java?rev=1894521&r1=1894520&r2=1894521&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/multipdf/LayerUtility.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/multipdf/LayerUtility.java Sun Oct 24 08:10:59 2021
@@ -172,7 +172,7 @@ public class LayerUtility
form.setResources(formRes);
//Transfer some values from page to form
- transferDict(page.getCOSObject(), form.getCOSObject(), PAGE_TO_FORM_FILTER, true);
+ transferDict(page.getCOSObject(), form.getCOSObject(), PAGE_TO_FORM_FILTER);
Matrix matrix = form.getMatrix();
AffineTransform at = matrix.createAffineTransform();
@@ -281,22 +281,17 @@ public class LayerUtility
return layer;
}
- private void transferDict(COSDictionary orgDict, COSDictionary targetDict,
- Set<String> filter, boolean inclusive) throws IOException
+ private void transferDict(COSDictionary orgDict, COSDictionary targetDict, Set<String> filter)
+ throws IOException
{
for (Map.Entry<COSName, COSBase> entry : orgDict.entrySet())
{
COSName key = entry.getKey();
- if (inclusive && !filter.contains(key.getName()))
+ if (!filter.contains(key.getName()))
{
continue;
}
- else if (!inclusive && filter.contains(key.getName()))
- {
- continue;
- }
- targetDict.setItem(key,
- cloner.cloneForNewDocument(entry.getValue()));
+ targetDict.setItem(key, cloner.cloneForNewDocument(entry.getValue()));
}
}