aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com
diff options
context:
space:
mode:
authortknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2007-02-07 10:08:21 +0000
committertknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2007-02-07 10:08:21 +0000
commita0de2a3b2a5f4a99f280f5caebbca0d183ae109a (patch)
tree7479e30c10c3994cba18c6bf8784f61748bb6cd3 /src/main/java/com
parent8f7cebd9c2c5c0f6e33863ba57ad1c215f35605c (diff)
downloadpdf-as-3-a0de2a3b2a5f4a99f280f5caebbca0d183ae109a.tar.gz
pdf-as-3-a0de2a3b2a5f4a99f280f5caebbca0d183ae109a.tar.bz2
pdf-as-3-a0de2a3b2a5f4a99f280f5caebbca0d183ae109a.zip
Bugfix: Querformat, BKU 2.7.x, ...
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@35 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/lowagie/text/pdf/PdfDictionary.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/main/java/com/lowagie/text/pdf/PdfDictionary.java b/src/main/java/com/lowagie/text/pdf/PdfDictionary.java
index f7310e4..acf84d5 100644
--- a/src/main/java/com/lowagie/text/pdf/PdfDictionary.java
+++ b/src/main/java/com/lowagie/text/pdf/PdfDictionary.java
@@ -105,11 +105,20 @@ public class PdfDictionary extends PdfObject {
/** This is the hashmap that contains all the values and keys of the dictionary */
protected HashMap hashMap;
+
+ // EGIZ various modifications
/**
* This list preserves the order of the elements.
+ *
+ * <p>
+ * If an element to be added to the list already exists in the list,
+ * it sould not be added as the contents of this new element
+ * overwrites the contents of the old element in the hash map.
+ * </p>
*/
protected List list;
+
// constructors
/**
@@ -175,8 +184,13 @@ public class PdfDictionary extends PdfObject {
*/
public void put(PdfName key, PdfObject value) {
+ if (!hashMap.containsKey(key))
+ {
+ // If the key is new, add it to the ordered list.
+ // If not, it already has a position in the list.
+ list.add(key);
+ }
hashMap.put(key, value);
- list.add(key);
}
/**