aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/afp/goca
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop/afp/goca')
-rw-r--r--src/java/org/apache/fop/afp/goca/AbstractGraphicsCoord.java2
-rw-r--r--src/java/org/apache/fop/afp/goca/AbstractGraphicsDrawingOrderContainer.java21
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsBox.java2
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsChainedSegment.java2
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsCharacterString.java2
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsData.java2
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsFillet.java2
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsFullArc.java2
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsLine.java2
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsSetArcParameters.java2
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsSetCharacterSet.java2
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsSetCurrentPosition.java2
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsSetLineType.java2
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsSetLineWidth.java2
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsSetPatternSymbol.java2
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsSetProcessColor.java2
16 files changed, 26 insertions, 25 deletions
diff --git a/src/java/org/apache/fop/afp/goca/AbstractGraphicsCoord.java b/src/java/org/apache/fop/afp/goca/AbstractGraphicsCoord.java
index 3d8495667..3c3442def 100644
--- a/src/java/org/apache/fop/afp/goca/AbstractGraphicsCoord.java
+++ b/src/java/org/apache/fop/afp/goca/AbstractGraphicsCoord.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-/* $Id: $ */
+/* $Id$ */
package org.apache.fop.afp.goca;
diff --git a/src/java/org/apache/fop/afp/goca/AbstractGraphicsDrawingOrderContainer.java b/src/java/org/apache/fop/afp/goca/AbstractGraphicsDrawingOrderContainer.java
index 34398b094..dbeaa26d0 100644
--- a/src/java/org/apache/fop/afp/goca/AbstractGraphicsDrawingOrderContainer.java
+++ b/src/java/org/apache/fop/afp/goca/AbstractGraphicsDrawingOrderContainer.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-/* $Id: $ */
+/* $Id$ */
package org.apache.fop.afp.goca;
@@ -46,6 +46,8 @@ implements StructuredData, Completable, Startable {
/** object has started */
private boolean started = false;
+ private int dataLength = 0;
+
/**
* Default constructor
*/
@@ -78,6 +80,7 @@ implements StructuredData, Completable, Startable {
*/
public void addObject(StructuredData object) {
objects.add(object);
+ dataLength += object.getDataLength();
}
/**
@@ -88,6 +91,7 @@ implements StructuredData, Completable, Startable {
public void addAll(AbstractGraphicsDrawingOrderContainer graphicsContainer) {
Collection/*<StructuredDataObject>*/ objects = graphicsContainer.getObjects();
objects.addAll(objects);
+ dataLength += graphicsContainer.getDataLength();
}
/**
@@ -107,9 +111,11 @@ implements StructuredData, Completable, Startable {
public StructuredData removeLast() {
int lastIndex = objects.size() - 1;
StructuredData object = null;
- if (lastIndex > -1) {
- object = (StructuredData)objects.get(lastIndex);
- objects.remove(lastIndex);
+ if (lastIndex >= 0) {
+ object = (StructuredData)objects.remove(lastIndex);
+ }
+ if (object != null) {
+ dataLength -= object.getDataLength();
}
return object;
}
@@ -121,12 +127,7 @@ implements StructuredData, Completable, Startable {
* all enclosed objects (and their containers)
*/
public int getDataLength() {
- int dataLen = 0;
- Iterator it = objects.iterator();
- while (it.hasNext()) {
- dataLen += ((StructuredData)it.next()).getDataLength();
- }
- return dataLen;
+ return this.dataLength;
}
/** {@inheritDoc} */
diff --git a/src/java/org/apache/fop/afp/goca/GraphicsBox.java b/src/java/org/apache/fop/afp/goca/GraphicsBox.java
index 945697ec2..97c08b9ee 100644
--- a/src/java/org/apache/fop/afp/goca/GraphicsBox.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsBox.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-/* $Id: $ */
+/* $Id$ */
package org.apache.fop.afp.goca;
diff --git a/src/java/org/apache/fop/afp/goca/GraphicsChainedSegment.java b/src/java/org/apache/fop/afp/goca/GraphicsChainedSegment.java
index 8a92db296..1162e83aa 100644
--- a/src/java/org/apache/fop/afp/goca/GraphicsChainedSegment.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsChainedSegment.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-/* $Id: $ */
+/* $Id$ */
package org.apache.fop.afp.goca;
diff --git a/src/java/org/apache/fop/afp/goca/GraphicsCharacterString.java b/src/java/org/apache/fop/afp/goca/GraphicsCharacterString.java
index 70039d167..4094314a2 100644
--- a/src/java/org/apache/fop/afp/goca/GraphicsCharacterString.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsCharacterString.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-/* $Id: $ */
+/* $Id$ */
package org.apache.fop.afp.goca;
diff --git a/src/java/org/apache/fop/afp/goca/GraphicsData.java b/src/java/org/apache/fop/afp/goca/GraphicsData.java
index c75057dc5..1ba757e4b 100644
--- a/src/java/org/apache/fop/afp/goca/GraphicsData.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsData.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-/* $Id: $ */
+/* $Id$ */
package org.apache.fop.afp.goca;
diff --git a/src/java/org/apache/fop/afp/goca/GraphicsFillet.java b/src/java/org/apache/fop/afp/goca/GraphicsFillet.java
index 294be6d9b..9dad2fe1c 100644
--- a/src/java/org/apache/fop/afp/goca/GraphicsFillet.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsFillet.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-/* $Id: $ */
+/* $Id$ */
package org.apache.fop.afp.goca;
diff --git a/src/java/org/apache/fop/afp/goca/GraphicsFullArc.java b/src/java/org/apache/fop/afp/goca/GraphicsFullArc.java
index a4b6916ae..47bf53079 100644
--- a/src/java/org/apache/fop/afp/goca/GraphicsFullArc.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsFullArc.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-/* $Id: $ */
+/* $Id$ */
package org.apache.fop.afp.goca;
diff --git a/src/java/org/apache/fop/afp/goca/GraphicsLine.java b/src/java/org/apache/fop/afp/goca/GraphicsLine.java
index 17bd43ce0..dea03960a 100644
--- a/src/java/org/apache/fop/afp/goca/GraphicsLine.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsLine.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-/* $Id: $ */
+/* $Id$ */
package org.apache.fop.afp.goca;
diff --git a/src/java/org/apache/fop/afp/goca/GraphicsSetArcParameters.java b/src/java/org/apache/fop/afp/goca/GraphicsSetArcParameters.java
index 693cf21a9..6b3dc98ec 100644
--- a/src/java/org/apache/fop/afp/goca/GraphicsSetArcParameters.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsSetArcParameters.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-/* $Id: $ */
+/* $Id$ */
package org.apache.fop.afp.goca;
diff --git a/src/java/org/apache/fop/afp/goca/GraphicsSetCharacterSet.java b/src/java/org/apache/fop/afp/goca/GraphicsSetCharacterSet.java
index b3d1158fe..f2a450516 100644
--- a/src/java/org/apache/fop/afp/goca/GraphicsSetCharacterSet.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsSetCharacterSet.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-/* $Id: $ */
+/* $Id$ */
package org.apache.fop.afp.goca;
diff --git a/src/java/org/apache/fop/afp/goca/GraphicsSetCurrentPosition.java b/src/java/org/apache/fop/afp/goca/GraphicsSetCurrentPosition.java
index 675c2f034..1335f2473 100644
--- a/src/java/org/apache/fop/afp/goca/GraphicsSetCurrentPosition.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsSetCurrentPosition.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-/* $Id: $ */
+/* $Id$ */
package org.apache.fop.afp.goca;
diff --git a/src/java/org/apache/fop/afp/goca/GraphicsSetLineType.java b/src/java/org/apache/fop/afp/goca/GraphicsSetLineType.java
index b6512f57c..b4224b3c9 100644
--- a/src/java/org/apache/fop/afp/goca/GraphicsSetLineType.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsSetLineType.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-/* $Id: $ */
+/* $Id$ */
package org.apache.fop.afp.goca;
diff --git a/src/java/org/apache/fop/afp/goca/GraphicsSetLineWidth.java b/src/java/org/apache/fop/afp/goca/GraphicsSetLineWidth.java
index 96eac0677..4ba208bb0 100644
--- a/src/java/org/apache/fop/afp/goca/GraphicsSetLineWidth.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsSetLineWidth.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-/* $Id: $ */
+/* $Id$ */
package org.apache.fop.afp.goca;
diff --git a/src/java/org/apache/fop/afp/goca/GraphicsSetPatternSymbol.java b/src/java/org/apache/fop/afp/goca/GraphicsSetPatternSymbol.java
index 3d6cf7cd6..e2cc081ce 100644
--- a/src/java/org/apache/fop/afp/goca/GraphicsSetPatternSymbol.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsSetPatternSymbol.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-/* $Id: $ */
+/* $Id$ */
package org.apache.fop.afp.goca;
diff --git a/src/java/org/apache/fop/afp/goca/GraphicsSetProcessColor.java b/src/java/org/apache/fop/afp/goca/GraphicsSetProcessColor.java
index 05a6ee5d1..f0c4aa321 100644
--- a/src/java/org/apache/fop/afp/goca/GraphicsSetProcessColor.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsSetProcessColor.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-/* $Id: $ */
+/* $Id$ */
package org.apache.fop.afp.goca;