Changeset 1735
- Timestamp:
- 12/27/11 03:47:16 (5 months ago)
- Location:
- trunk/docx4j/src/main/java/org/docx4j/model/fields/merge
- Files:
-
- 2 edited
-
DataFieldName.java (modified) (2 diffs)
-
MailMerger.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/docx4j/src/main/java/org/docx4j/model/fields/merge/DataFieldName.java
r1734 r1735 4 4 * The name of the data field. 5 5 * 6 * When Word performs a mail merge, it treats this as case-insensitive. 6 * When Word performs a mail merge, it treats this as case-insensitive 7 * (and takes the first matching field). 7 8 * 8 * The purpose of this class is to do the same. 9 * The purpose of this class is to ensure the key provided is 10 * case-insensitive. 9 11 * 10 12 * @author jharrop … … 15 17 String name; 16 18 17 DataFieldName(String name) {19 public DataFieldName(String name) { 18 20 19 21 this.name = name.toUpperCase(); -
trunk/docx4j/src/main/java/org/docx4j/model/fields/merge/MailMerger.java
r1734 r1735 316 316 317 317 Map<DataFieldName, String> map = new HashMap<DataFieldName, String>(); 318 map.put( new DataFieldName("KundenNAme"), "Daffy duck"); 318 319 map.put( new DataFieldName("Kundenname"), "Plutext"); 319 320 map.put(new DataFieldName("Kundenstrasse"), "Bourke Street"); … … 326 327 327 328 data.add(map); 328 // Word matches irrespective of case, and takes the first matching field329 329 330 330
Note: See TracChangeset
for help on using the changeset viewer.
