Fix inconsistent indent

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1090434 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2011-04-08 20:29:49 +00:00
parent b629d6f949
commit 2dee92c68d

View File

@ -271,37 +271,37 @@ public class POIXMLDocumentPart {
protected void read(POIXMLFactory factory, Map<PackagePart, POIXMLDocumentPart> context) throws OpenXML4JException { protected void read(POIXMLFactory factory, Map<PackagePart, POIXMLDocumentPart> context) throws OpenXML4JException {
PackageRelationshipCollection rels = packagePart.getRelationships(); PackageRelationshipCollection rels = packagePart.getRelationships();
for (PackageRelationship rel : rels) { for (PackageRelationship rel : rels) {
if(rel.getTargetMode() == TargetMode.INTERNAL){ if(rel.getTargetMode() == TargetMode.INTERNAL){
URI uri = rel.getTargetURI(); URI uri = rel.getTargetURI();
PackagePart p; PackagePart p;
if(uri.getRawFragment() != null) { if(uri.getRawFragment() != null) {
/* /*
* For internal references (e.g. '#Sheet1!A1') the package part is null * For internal references (e.g. '#Sheet1!A1') the package part is null
*/ */
p = null; p = null;
} else { } else {
PackagePartName relName = PackagingURIHelper.createPartName(uri); PackagePartName relName = PackagingURIHelper.createPartName(uri);
p = packagePart.getPackage().getPart(relName); p = packagePart.getPackage().getPart(relName);
if(p == null) { if(p == null) {
logger.log(POILogger.ERROR, "Skipped invalid entry " + rel.getTargetURI()); logger.log(POILogger.ERROR, "Skipped invalid entry " + rel.getTargetURI());
continue; continue;
} }
} }
if (!context.containsKey(p)) { if (!context.containsKey(p)) {
POIXMLDocumentPart childPart = factory.createDocumentPart(this, rel, p); POIXMLDocumentPart childPart = factory.createDocumentPart(this, rel, p);
childPart.parent = this; childPart.parent = this;
addRelation(childPart); addRelation(childPart);
if(p != null){ if(p != null){
context.put(p, childPart); context.put(p, childPart);
if(p.hasRelationships()) childPart.read(factory, context); if(p.hasRelationships()) childPart.read(factory, context);
} }
} }
else { else {
addRelation(context.get(p)); addRelation(context.get(p));
} }
} }
} }
} }