Changeset 1670
- Timestamp:
- 10/01/11 07:46:20 (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/docx4j/src/main/java/org/docx4j/openpackaging/parts/Part.java
r1649 r1670 23 23 24 24 import java.net.URI; 25 import java.util.ArrayList; 26 import java.util.List; 25 27 26 28 import org.docx4j.openpackaging.Base; … … 59 61 protected OpcPackage pack; 60 62 61 private Relationship sourceRelationship; 63 private List<Relationship> sourceRelationships = new ArrayList<Relationship>(); 64 65 /** 66 * @since 2.7.1 67 */ 68 public List<Relationship> getSourceRelationships() { 69 return sourceRelationships; 70 } 71 62 72 /** 63 73 * @return the sourceRelationship 64 74 */ 75 @Deprecated 65 76 public Relationship getSourceRelationship() { 66 return sourceRelationship ;77 return sourceRelationships.get(0); 67 78 } 68 79 /** … … 72 83 * @param sourceRelationship the sourceRelationship to set 73 84 */ 85 @Deprecated 74 86 public void setSourceRelationship(Relationship sourceRelationship) { 75 this.sourceRelationship = sourceRelationship; 87 sourceRelationships.clear(); 88 sourceRelationships.add(sourceRelationship); 76 89 } 77 90 … … 87 100 // except for a part which isn't yet connected to 88 101 // a package via a relationship. 89 return this.sourceRelationship.getType(); 102 return this.sourceRelationships.get(0).getType(); 103 // It ought to be the same in each source rel 90 104 } else { 91 105 return relationshipType; … … 217 231 result = result.substring(1); 218 232 } 219 log.debug("Result " + result); 220 sourceRelationship.setTarget(result); 233 log.debug("Result " + result); 234 for (Relationship rel : sourceRelationships) { 235 rel.setTarget(result); 236 } 221 237 222 238 // Set the new part name
Note: See TracChangeset
for help on using the changeset viewer.
