return null;
}
private IArea wrapWithType(List<IArea> areas) {
IArea hostArea = areas.get(0);
if (hostArea.getContent() instanceof ITextContent) {
for (int i = 0; i < areas.size(); i++) {
IArea ar = unWrap(areas.get(i));
if (ar instanceof ITextArea) {
String contentType = Data.STRING;
ITextArea tar = (ITextArea) ar;
if (ar.getContent().getContentType() == IContent.DATA_CONTENT) {
IDataContent dataContent = (IDataContent) ar.getContent();
contentType = ExcelUtil.getType(dataContent.getValue());
}
TextAreaWrapper textWrapper = new TextAreaWrapper((ITextArea) tar, contentType);
textWrapper.text = ((ITextContent) hostArea.getContent()).getText();
/**
* @Todo da migliorare
*/
Object content = tar.getContent();
if (content instanceof DataContent) {
DataContent dataContent = (DataContent) tar.getContent();
Object generateBy = dataContent.getGenerateBy();
if (generateBy instanceof DataItemDesign) {
DataItemDesign did = (DataItemDesign) generateBy;
did.getName();
if (did.getName() != null && did.getName().equals("levelValue")) {
AggregateFinder.get().resolve(textWrapper.getText());
}
}
}
return textWrapper;
}
}
} else if (hostArea.getContent() instanceof IImageContent) {
for (int i = 0; i < areas.size(); i++) {
IArea ar = unWrap(areas.get(i));
if (ar instanceof IImageArea) {
// return first image
return ar;
}