Reverting revision 807010 because it creates faulty GOCA data. Have debugged but haven't immediately found the cause. Due to time restrictions I'm currently just reverting the change to fix the regression.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@819542 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jeremias Maerki 2009-09-28 14:10:27 +00:00
parent 2d26284592
commit f8f3edf87a
2 changed files with 9 additions and 14 deletions

View File

@ -46,8 +46,6 @@ implements StructuredData, Completable, Startable {
/** object has started */
private boolean started = false;
private int dataLength = 0;
/**
* Default constructor
*/
@ -80,7 +78,6 @@ implements StructuredData, Completable, Startable {
*/
public void addObject(StructuredData object) {
objects.add(object);
dataLength += object.getDataLength();
}
/**
@ -91,7 +88,6 @@ implements StructuredData, Completable, Startable {
public void addAll(AbstractGraphicsDrawingOrderContainer graphicsContainer) {
Collection/*<StructuredDataObject>*/ objects = graphicsContainer.getObjects();
objects.addAll(objects);
dataLength += graphicsContainer.getDataLength();
}
/**
@ -111,11 +107,9 @@ implements StructuredData, Completable, Startable {
public StructuredData removeLast() {
int lastIndex = objects.size() - 1;
StructuredData object = null;
if (lastIndex >= 0) {
object = (StructuredData)objects.remove(lastIndex);
}
if (object != null) {
dataLength -= object.getDataLength();
if (lastIndex > -1) {
object = (StructuredData)objects.get(lastIndex);
objects.remove(lastIndex);
}
return object;
}
@ -127,7 +121,12 @@ implements StructuredData, Completable, Startable {
* all enclosed objects (and their containers)
*/
public int getDataLength() {
return this.dataLength;
int dataLen = 0;
Iterator it = objects.iterator();
while (it.hasNext()) {
dataLen += ((StructuredData)it.next()).getDataLength();
}
return dataLen;
}
/** {@inheritDoc} */

View File

@ -69,10 +69,6 @@
<action context="Renderers" dev="AD" type="add" fixes-bug="46905">
Added basic implementation for column-keeps.
</action>
<action context="Renderers" dev="AD" type="fix" fixes-bug="46883">
Hotspot in AbstractGraphicsDrawingOrderContainer. Reduced time spent in the method
by introducing a member variable to hold the data-length.
</action>
<action context="Code" dev="AD" type="fix" fixes-bug="47710">
White-space handling in markers with inline-content throws a NullPointerException
in some cases.