예제 #1
0
 public String toFormulaString(String[] operands) {
   if (space.isSet(field_1_options)) {
     return operands[0];
   } else if (optiIf.isSet(field_1_options)) {
     return toFormulaString((Workbook) null) + "(" + operands[0] + ")";
   } else if (optGoto.isSet(field_1_options)) {
     return toFormulaString((Workbook) null)
         + operands[0]; // goto isn't a real formula element should not show up
   } else {
     return toFormulaString((Workbook) null) + "(" + operands[0] + ")";
   }
 }
예제 #2
0
  public int getRecordSize() {
    int retval;

    if (getType() == STYLE_BUILT_IN) {
      retval = 8;
    } else {
      if (fHighByte.isSet(field_3_string_options)) {
        retval = 9 + 2 * getNameLength();
      } else {
        retval = 9 + getNameLength();
      }
    }
    return retval;
  }
예제 #3
0
  protected void fillFields(RecordInputStream in) {
    fHighByte = BitFieldFactory.getInstance(0x01); // have to init here, since we are being called
    // from super, and class level init hasnt been done.
    field_1_xf_index = in.readShort();
    if (getType() == STYLE_BUILT_IN) {
      field_2_builtin_style = in.readByte();
      field_3_outline_style_level = in.readByte();
    } else if (getType() == STYLE_USER_DEFINED) {
      field_2_name_length = in.readShort();
      field_3_string_options = in.readByte();

      byte[] string = in.readRemainder();
      if (fHighByte.isSet(field_3_string_options)) {
        field_4_name = StringUtil.getFromUnicodeBE(string, 0, field_2_name_length);
      } else {
        field_4_name = StringUtil.getFromCompressedUnicode(string, 0, field_2_name_length);
      }
    }

    // todo sanity check exception to make sure we're one or the other
  }
예제 #4
0
 public String toFormulaString(Workbook book) {
   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 "";
   }
   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";
 }
예제 #5
0
 // option bitfields
 public boolean getLeftToRight() {
   return lefttoright.isSet(field_6_options);
 }
예제 #6
0
 // biff3&4 only  shouldn't happen anymore
 public boolean isSpace() {
   return space.isSet(getOptions());
 }
예제 #7
0
 public boolean getUsePage() {
   return usepage.isSet(field_6_options);
 }
예제 #8
0
 public boolean getNotes() {
   return notes.isSet(field_6_options);
 }
예제 #9
0
 public boolean getNoColor() {
   return nocolor.isSet(field_6_options);
 }
예제 #10
0
 // lets hope no one uses this anymore
 public boolean isGoto() {
   return optGoto.isSet(getOptions());
 }
예제 #11
0
 public boolean isOptimizedChoose() {
   return optiChoose.isSet(getOptions());
 }
예제 #12
0
 public boolean isOptimizedIf() {
   return optiIf.isSet(getOptions());
 }
예제 #13
0
 public boolean isSemiVolatile() {
   return semiVolatile.isSet(getOptions());
 }
예제 #14
0
 public boolean getLandscape() {
   return landscape.isSet(field_6_options);
 }
예제 #15
0
 public boolean isSum() {
   return sum.isSet(getOptions());
 }
예제 #16
0
 public boolean getValidSettings() {
   return validsettings.isSet(field_6_options);
 }
예제 #17
0
 /**
  * series is stacked
  *
  * @return the stacked field value.
  */
 public boolean isStacked() {
   return stacked.isSet(field_1_formatFlags);
 }
예제 #18
0
 public boolean getDraft() {
   return draft.isSet(field_6_options);
 }
예제 #19
0
 /**
  * results displayed as percentages
  *
  * @return the display as percentage field value.
  */
 public boolean isDisplayAsPercentage() {
   return displayAsPercentage.isSet(field_1_formatFlags);
 }
예제 #20
0
 public boolean getNoOrientation() {
   return noOrientation.isSet(field_6_options);
 }
예제 #21
0
 /**
  * display a shadow for the chart
  *
  * @return the shadow field value.
  */
 public boolean isShadow() {
   return shadow.isSet(field_1_formatFlags);
 }
예제 #22
0
 /**
  * true if this object has a custom number format
  *
  * @return the custom number format field value.
  */
 public boolean isCustomNumberFormat() {
   return customNumberFormat.isSet(field_3_options);
 }
예제 #23
0
 // lets hope no one uses this anymore
 public boolean isBaxcel() {
   return baxcel.isSet(getOptions());
 }