]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
No code change here, just fixing the indentation of the if (useInclude) block that...
authorAdrian Cumiskey <acumiskey@apache.org>
Fri, 19 Jun 2009 11:04:13 +0000 (11:04 +0000)
committerAdrian Cumiskey <acumiskey@apache.org>
Fri, 19 Jun 2009 11:04:13 +0000 (11:04 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@786453 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/afp/AFPResourceManager.java

index c44698a1074cea21af54f99dad8d2c2aa128c8e4..09ebde296ae14f38d57cab428df2676b322b23c0 100644 (file)
@@ -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);