final private SpreadsheetLine line;
final private int column;
int style;
- Object content;
+ private Object content;
final private Map<String, SheetNode> properties;
public SpreadsheetCell(SpreadsheetLine line, int column) {
return (T)f.result;
} else if (content instanceof SpreadsheetSCLConstant) {
SpreadsheetSCLConstant sclConstant = (SpreadsheetSCLConstant) content;
- if(sclConstant.content instanceof Variant) {
- Variant v = (Variant)sclConstant.content;
- return (T) sclConstant.content;
- } else if (sclConstant.content instanceof ExternalRef) {
- return (T)env.getBook().getExternalRefValue(makeReferenceKey(), (ExternalRef)sclConstant.content);
+ Object c = sclConstant.getContent();
+ if(c instanceof Variant) {
+ Variant v = (Variant)c;
+ return (T) c;
+ } else if (c instanceof ExternalRef) {
+ ExternalRefData erd = env.getBook().getExternalRefValue(makeReferenceKey(), (ExternalRef)c);
+ return (T)erd;
} else {
- throw new IllegalStateException();
+ throw new IllegalStateException("Unsupported content " + c);
}
} else {
this.inProgress = false;