rtfElement.setRtfDocument(this.rtfDoc);
return new RtfBasicElement[]{rtfElement};
}
switch(element.type()) {
case LwgElement.CHUNK:
Chunk chunk = (Chunk) element;
if(chunk.hasAttributes()) {
if(chunk.getAttributes().containsKey(Chunk.IMAGE)) {
rtfElements.add(new RtfImage(rtfDoc, chunk.getImage()));
} else if(chunk.getAttributes().containsKey(Chunk.NEWPAGE)) {
rtfElements.add(new RtfNewPage(rtfDoc));
} else if(chunk.getAttributes().containsKey(Chunk.TAB)) {
Float tabPos = (Float) ((Object[]) chunk.getAttributes().get(Chunk.TAB))[1];
RtfTab tab = new RtfTab(tabPos.floatValue(), RtfTab.TAB_LEFT_ALIGN);
tab.setRtfDocument(rtfDoc);
rtfElements.add(tab);
rtfElements.add(new RtfChunk(rtfDoc, new Chunk("\t")));
} else {
rtfElements.add(new RtfChunk(rtfDoc, (Chunk) element));
}
} else {
rtfElements.add(new RtfChunk(rtfDoc, (Chunk) element));