pretty printing from AttrPtg, submitted by Werner Froidevaux
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352673 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e27d8be5e1
commit
4c62750ea5
@ -191,11 +191,16 @@ public class AttrPtg
|
||||
return SIZE;
|
||||
}
|
||||
|
||||
public String toFormulaString()
|
||||
{
|
||||
return "ATTR";
|
||||
public String toFormulaString(String[] operands) {
|
||||
if(space.isSet(field_1_options)) {
|
||||
return operands[ 0 ];
|
||||
}
|
||||
else {
|
||||
return toFormulaString() + "(" + operands[ 0 ] + ")";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int getNumberOfOperands()
|
||||
{
|
||||
return 1;
|
||||
@ -206,9 +211,31 @@ public class AttrPtg
|
||||
return -1;
|
||||
}
|
||||
|
||||
public String toFormulaString(String[] operands) {
|
||||
return "SUM(" + operands[ 0 ] + ")";
|
||||
}
|
||||
public String toFormulaString() {
|
||||
if(semiVolatile.isSet(field_1_options)) {
|
||||
return "ATTR(semiVolatile)";
|
||||
}
|
||||
if(optiIf.isSet(field_1_options)) {
|
||||
return "IF";
|
||||
}
|
||||
if( optiChoose.isSet(field_1_options)) {
|
||||
return "CHOOSE";
|
||||
}
|
||||
if(optGoto.isSet(field_1_options)) {
|
||||
return "GOTO";
|
||||
}
|
||||
if(sum.isSet(field_1_options)) {
|
||||
return "SUM";
|
||||
}
|
||||
if(baxcel.isSet(field_1_options)) {
|
||||
return "ATTR(baxcel)";
|
||||
}
|
||||
if(space.isSet(field_1_options)) {
|
||||
return "";
|
||||
}
|
||||
return "UNKNOWN ATTRIBUTE";
|
||||
}
|
||||
|
||||
|
||||
|
||||
public byte getDefaultOperandClass() {return Ptg.CLASS_VALUE;}
|
||||
|
Loading…
Reference in New Issue
Block a user