Пример #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
 public void setNotes(boolean printnotes) {
   field_6_options = notes.setShortBoolean(field_6_options, printnotes);
 }
Пример #6
0
 public void setDraft(boolean d) {
   field_6_options = draft.setShortBoolean(field_6_options, d);
 }
Пример #7
0
 /** Sets the custom number format field value. true if this object has a custom number format */
 public void setCustomNumberFormat(boolean value) {
   field_3_options = customNumberFormat.setShortBoolean(field_3_options, value);
 }
Пример #8
0
 /** Sets the stacked field value. series is stacked */
 public void setStacked(boolean value) {
   field_1_formatFlags = stacked.setShortBoolean(field_1_formatFlags, value);
 }
Пример #9
0
 public boolean getNoOrientation() {
   return noOrientation.isSet(field_6_options);
 }
Пример #10
0
 public void setOptimizedIf(boolean bif) {
   field_1_options = optiIf.setByteBoolean(field_1_options, bif);
 }
Пример #11
0
 // option bitfields
 public boolean getLeftToRight() {
   return lefttoright.isSet(field_6_options);
 }
Пример #12
0
 /** Sets the shadow field value. display a shadow for the chart */
 public void setShadow(boolean value) {
   field_1_formatFlags = shadow.setShortBoolean(field_1_formatFlags, value);
 }
Пример #13
0
 /**
  * display a shadow for the chart
  *
  * @return the shadow field value.
  */
 public boolean isShadow() {
   return shadow.isSet(field_1_formatFlags);
 }
Пример #14
0
 /**
  * results displayed as percentages
  *
  * @return the display as percentage field value.
  */
 public boolean isDisplayAsPercentage() {
   return displayAsPercentage.isSet(field_1_formatFlags);
 }
Пример #15
0
 /** Sets the display as percentage field value. results displayed as percentages */
 public void setDisplayAsPercentage(boolean value) {
   field_1_formatFlags = displayAsPercentage.setShortBoolean(field_1_formatFlags, value);
 }
Пример #16
0
 /**
  * series is stacked
  *
  * @return the stacked field value.
  */
 public boolean isStacked() {
   return stacked.isSet(field_1_formatFlags);
 }
Пример #17
0
 public void setNoOrientation(boolean orientation) {
   field_6_options = noOrientation.setShortBoolean(field_6_options, orientation);
 }
Пример #18
0
 public boolean getValidSettings() {
   return validsettings.isSet(field_6_options);
 }
Пример #19
0
 public void setUsePage(boolean page) {
   field_6_options = usepage.setShortBoolean(field_6_options, page);
 }
Пример #20
0
 public boolean getDraft() {
   return draft.isSet(field_6_options);
 }
Пример #21
0
 public boolean getLandscape() {
   return landscape.isSet(field_6_options);
 }
Пример #22
0
 /**
  * Flags this ptg as a goto/jump
  *
  * @param isGoto
  */
 public void setGoto(boolean isGoto) {
   field_1_options = optGoto.setByteBoolean(field_1_options, isGoto);
 }
Пример #23
0
 public boolean getNoColor() {
   return nocolor.isSet(field_6_options);
 }
Пример #24
0
 // option bitfields
 public void setLeftToRight(boolean ltor) {
   field_6_options = lefttoright.setShortBoolean(field_6_options, ltor);
 }
Пример #25
0
 public boolean getNotes() {
   return notes.isSet(field_6_options);
 }
Пример #26
0
 public void setLandscape(boolean ls) {
   field_6_options = landscape.setShortBoolean(field_6_options, ls);
 }
Пример #27
0
 public boolean getUsePage() {
   return usepage.isSet(field_6_options);
 }
Пример #28
0
 public void setValidSettings(boolean valid) {
   field_6_options = validsettings.setShortBoolean(field_6_options, valid);
 }
Пример #29
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);
 }
Пример #30
0
 public void setNoColor(boolean mono) {
   field_6_options = nocolor.setShortBoolean(field_6_options, mono);
 }