return false;
}
// Find the first and last positions in oldList that point to an AreaInfo
// (i.e. getLeafPos() != -1)
LeafPosition startPos = null;
LeafPosition endPos = null;
ListIterator oldListIter;
for (oldListIter = oldList.listIterator(); oldListIter.hasNext();) {
Position pos = ((KnuthElement) oldListIter.next()).getPosition();
startPos = (LeafPosition) pos.getPosition(depth);
if (startPos != null && startPos.getLeafPos() != -1) {
break;
}
}
for (oldListIter = oldList.listIterator(oldList.size()); oldListIter.hasPrevious();) {
Position pos = ((KnuthElement) oldListIter.previous()).getPosition();
endPos = (LeafPosition) pos.getPosition(depth);
if (endPos != null && endPos.getLeafPos() != -1) {
break;
}
}
// set start/end index, taking into account any offset due to
// changes applied to previous paragraphs
returnedIndices[0] = (startPos != null ? startPos.getLeafPos() : -1) + changeOffset;
returnedIndices[1] = (endPos != null ? endPos.getLeafPos() : -1) + changeOffset;
int areaInfosAdded = 0;
int areaInfosRemoved = 0;
if (!changeList.isEmpty()) {