From 530408bbefed1d993f4bd76de7a9af79553bdeca Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Fri, 8 Apr 2011 20:29:49 +0000 Subject: [PATCH] Fix inconsistent indent git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1090434 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/POIXMLDocumentPart.java | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/src/ooxml/java/org/apache/poi/POIXMLDocumentPart.java b/src/ooxml/java/org/apache/poi/POIXMLDocumentPart.java index 993413c1b0..ec10c638ba 100644 --- a/src/ooxml/java/org/apache/poi/POIXMLDocumentPart.java +++ b/src/ooxml/java/org/apache/poi/POIXMLDocumentPart.java @@ -271,37 +271,37 @@ public class POIXMLDocumentPart { protected void read(POIXMLFactory factory, Map context) throws OpenXML4JException { PackageRelationshipCollection rels = packagePart.getRelationships(); for (PackageRelationship rel : rels) { - if(rel.getTargetMode() == TargetMode.INTERNAL){ - URI uri = rel.getTargetURI(); - - PackagePart p; - if(uri.getRawFragment() != null) { - /* - * For internal references (e.g. '#Sheet1!A1') the package part is null - */ - p = null; - } else { - PackagePartName relName = PackagingURIHelper.createPartName(uri); - p = packagePart.getPackage().getPart(relName); - if(p == null) { - logger.log(POILogger.ERROR, "Skipped invalid entry " + rel.getTargetURI()); - continue; - } - } - - if (!context.containsKey(p)) { - POIXMLDocumentPart childPart = factory.createDocumentPart(this, rel, p); - childPart.parent = this; - addRelation(childPart); - if(p != null){ - context.put(p, childPart); - if(p.hasRelationships()) childPart.read(factory, context); - } - } - else { - addRelation(context.get(p)); - } - } + if(rel.getTargetMode() == TargetMode.INTERNAL){ + URI uri = rel.getTargetURI(); + + PackagePart p; + if(uri.getRawFragment() != null) { + /* + * For internal references (e.g. '#Sheet1!A1') the package part is null + */ + p = null; + } else { + PackagePartName relName = PackagingURIHelper.createPartName(uri); + p = packagePart.getPackage().getPart(relName); + if(p == null) { + logger.log(POILogger.ERROR, "Skipped invalid entry " + rel.getTargetURI()); + continue; + } + } + + if (!context.containsKey(p)) { + POIXMLDocumentPart childPart = factory.createDocumentPart(this, rel, p); + childPart.parent = this; + addRelation(childPart); + if(p != null){ + context.put(p, childPart); + if(p.hasRelationships()) childPart.read(factory, context); + } + } + else { + addRelation(context.get(p)); + } + } } } -- 2.39.5