diff options
author | Adrian Cumiskey <acumiskey@apache.org> | 2009-06-19 11:04:13 +0000 |
---|---|---|
committer | Adrian Cumiskey <acumiskey@apache.org> | 2009-06-19 11:04:13 +0000 |
commit | cf422d5d9335674b629c605485ed90d1e248248c (patch) | |
tree | dd9d61159a80de0d3d45a9d927033162adac041f | |
parent | 9aa056899f912bca79e7939ad535597455bf475c (diff) | |
download | xmlgraphics-fop-cf422d5d9335674b629c605485ed90d1e248248c.tar.gz xmlgraphics-fop-cf422d5d9335674b629c605485ed90d1e248248c.zip |
No code change here, just fixing the indentation of the if (useInclude) block that somehow got messed up by a previous commit/merge (http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/AFPResourceManager.java?revision=746664&view=markup).
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@786453 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/java/org/apache/fop/afp/AFPResourceManager.java | 57 |
1 files changed, 28 insertions, 29 deletions
diff --git a/src/java/org/apache/fop/afp/AFPResourceManager.java b/src/java/org/apache/fop/afp/AFPResourceManager.java index c44698a10..09ebde296 100644 --- a/src/java/org/apache/fop/afp/AFPResourceManager.java +++ b/src/java/org/apache/fop/afp/AFPResourceManager.java @@ -165,39 +165,38 @@ public class AFPResourceManager { AFPResourceLevel resourceLevel = resourceInfo.getLevel(); ResourceGroup resourceGroup = streamer.getResourceGroup(resourceLevel); + useInclude &= resourceGroup != null; if (useInclude) { - - boolean usePageSegment = dataObjectInfo.isCreatePageSegment(); - - // if it is to reside within a resource group at print-file or external level - if (resourceLevel.isPrintFile() || resourceLevel.isExternal()) { + boolean usePageSegment = dataObjectInfo.isCreatePageSegment(); + + // if it is to reside within a resource group at print-file or external level + if (resourceLevel.isPrintFile() || resourceLevel.isExternal()) { + if (usePageSegment) { + String pageSegmentName = "S10" + namedObj.getName().substring(3); + namedObj.setName(pageSegmentName); + PageSegment seg = new PageSegment(pageSegmentName); + seg.addObject(namedObj); + namedObj = seg; + } + + // wrap newly created data object in a resource object + namedObj = dataObjectFactory.createResource(namedObj, resourceInfo, objectType); + } + + // add data object into its resource group destination + resourceGroup.addObject(namedObj); + + // create the include object + objectName = namedObj.getName(); if (usePageSegment) { - String pageSegmentName = "S10" + namedObj.getName().substring(3); - namedObj.setName(pageSegmentName); - PageSegment seg = new PageSegment(pageSegmentName); - seg.addObject(namedObj); - namedObj = seg; + includePageSegment(dataObjectInfo, objectName); + pageSegmentMap.put(resourceInfo, objectName); + } else { + includeObject(dataObjectInfo, objectName); + // record mapping of resource info to data object resource name + includeNameMap.put(resourceInfo, objectName); } - - // wrap newly created data object in a resource object - namedObj = dataObjectFactory.createResource(namedObj, resourceInfo, objectType); - } - - // add data object into its resource group destination - resourceGroup.addObject(namedObj); - - // create the include object - objectName = namedObj.getName(); - if (usePageSegment) { - includePageSegment(dataObjectInfo, objectName); - pageSegmentMap.put(resourceInfo, objectName); - } else { - includeObject(dataObjectInfo, objectName); - // record mapping of resource info to data object resource name - includeNameMap.put(resourceInfo, objectName); - } - } else { // not to be included so inline data object directly into the current page dataStream.getCurrentPage().addObject(namedObj); |