if (block instanceof P && ((P) block).getPPr() != null
&& ((P) block).getPPr().getSectPr() != null) {
makeContinuous(((P) block).getPPr().getSectPr());
} else if (block instanceof P) {
// More likely
PPr ppr = ((P) block).getPPr();
if (ppr == null) {
ppr = Context.getWmlObjectFactory().createPPr();
((P) block).setPPr(ppr);
}
SectPr newSectPr = Context.getWmlObjectFactory()
.createSectPr();
SectPr.Type type = Context.getWmlObjectFactory()
.createSectPrType();
type.setVal("continuous");
newSectPr.setType(type);
ppr.setSectPr(newSectPr);
} else {
// Equally likely - its a table or something, so add a p
P newP = Context.getWmlObjectFactory().createP();
PPr ppr = Context.getWmlObjectFactory().createPPr();
newP.setPPr(ppr);
SectPr newSectPr = Context.getWmlObjectFactory()
.createSectPr();
SectPr.Type type = Context.getWmlObjectFactory()
.createSectPrType();
type.setVal("continuous");
newSectPr.setType(type);
ppr.setSectPr(newSectPr);
bodyChildren.add(indexIntoBody.intValue(), newP); // add
// before
// altChunk
}