final FoLineNonText foLineNonText = (FoLineNonText) nonTextToUse;
graftingPoint = foLineNonText.getGraftingPoint();
nonTextToUse = foLineNonText.getWrapped();
}
LineContentFactory factory = lineArea;
if (this.areaStack.size() > 0) {
factory = this.areaStack.peek();
}
if (nonTextToUse instanceof InstreamForeignObject) {
final InstreamForeignObject ifo = (InstreamForeignObject)
nonTextToUse;
factory.makeForeignObjectArea(ifo, sizeInline, graftingPoint);
} else if (nonTextToUse instanceof ExternalGraphic) {
final ExternalGraphic graphic = (ExternalGraphic) nonTextToUse;
factory.makeExternalGraphicArea(graphic, sizeInline,
graftingPoint);
} else if (nonTextToUse instanceof Leader) {
final Leader leader = (Leader) nonTextToUse;
try {
factory.makeLeaderArea(leader, sizeInline, graftingPoint);
} catch (final AreaTreeException e) {
throw new TextException(e);
}
} else if (nonTextToUse instanceof PageNumberCitation) {
final PageNumberCitation citation = (PageNumberCitation)
nonTextToUse;
factory.makePageNumberCitationArea(citation, sizeInline,
graftingPoint);
} else if (nonTextToUse instanceof PageNumber) {
final PageNumber pageNumber = (PageNumber) nonTextToUse;
factory.makePageNumberArea(pageNumber, sizeInline, graftingPoint);
}
}