/** * Gets the token representation of this item in RPN * * @return the bytes applicable to this formula */ byte[] getBytes() { byte[] data = new byte[5]; data[0] = Token.REFERR.getCode(); // bytes 1-5 are unused return data; }
/** * Gets the token representation of this item in RPN * * @return the bytes applicable to this formula */ byte[] getBytes() { byte[] data = new byte[5]; data[0] = Token.NAMED_RANGE.getValueCode(); if (getParseContext() == ParseContext.DATA_VALIDATION) { data[0] = Token.NAMED_RANGE.getReferenceCode(); } IntegerHelper.getTwoBytes(index, data, 1); return data; }
/** * Gets the token representation of this item in RPN * * @return the bytes applicable to this formula */ byte[] getBytes() { byte[] data = new byte[5]; data[0] = !useAlternateCode() ? Token.REF.getCode() : Token.REF.getCode2(); IntegerHelper.getTwoBytes(row, data, 1); int grcol = column; // Set the row/column relative bits if applicable if (rowRelative) { grcol |= 0x8000; } if (columnRelative) { grcol |= 0x4000; } IntegerHelper.getTwoBytes(grcol, data, 3); return data; }
pos++; t = Token.getToken(tokenVal);
/** * Gets the token representation of this item in RPN * * @return the bytes applicable to this formula */ byte[] getBytes() { byte[] data = new byte[5]; data[0] = !useAlternateCode() ? Token.REF.getCode() : Token.REF.getCode2(); IntegerHelper.getTwoBytes(row, data, 1); int grcol = column; // Set the row/column relative bits if applicable if (rowRelative) { grcol |= 0x8000; } if (columnRelative) { grcol |= 0x4000; } IntegerHelper.getTwoBytes(grcol, data, 3); return data; }
pos++; t = Token.getToken(tokenVal);
/** * Gets the token representation of this item in RPN * * @return the bytes applicable to this formula */ byte[] getBytes() { byte[] data = new byte[1]; data[0] = Token.MISSING_ARG.getCode(); return data; }
/** * Gets the token representation of this item in RPN * * @return the bytes applicable to this formula */ byte[] getBytes() { // Get the data for the operands ParseItem[] operands = getOperands(); byte[] data = new byte[0]; for (int i = 0; i < operands.length; i++) { byte[] opdata = operands[i].getBytes(); // Grow the array byte[] newdata = new byte[data.length + opdata.length]; System.arraycopy(data, 0, newdata, 0, data.length); System.arraycopy(opdata, 0, newdata, data.length, opdata.length); data = newdata; } // Add on the operator byte byte[] newdata = new byte[data.length + 3]; System.arraycopy(data, 0, newdata, 0, data.length); newdata[data.length] = !useAlternateCode() ? Token.FUNCTION.getCode() : Token.FUNCTION.getCode2(); IntegerHelper.getTwoBytes(function.getCode(), newdata, data.length + 1); return newdata; }
/** * Gets the token representation of this item in RPN * * @return the bytes applicable to this formula */ byte[] getBytes() { byte[] data = new byte[5]; data[0] = Token.NAMED_RANGE.getValueCode(); if (getParseContext() == ParseContext.DATA_VALIDATION) { data[0] = Token.NAMED_RANGE.getReferenceCode(); } IntegerHelper.getTwoBytes(index, data, 1); return data; }
/** * Gets the token representation of this item in RPN * * @return the bytes applicable to this formula */ byte[] getBytes() { byte[] data = new byte[1]; data[0] = Token.MISSING_ARG.getCode(); return data; }
/** * Gets the token representation of this item in RPN * * @return the bytes applicable to this formula */ byte[] getBytes() { // Get the data for the operands ParseItem[] operands = getOperands(); byte[] data = new byte[0]; for (int i = 0; i < operands.length; i++) { byte[] opdata = operands[i].getBytes(); // Grow the array byte[] newdata = new byte[data.length + opdata.length]; System.arraycopy(data, 0, newdata, 0, data.length); System.arraycopy(opdata, 0, newdata, data.length, opdata.length); data = newdata; } // Add on the operator byte byte[] newdata = new byte[data.length + 3]; System.arraycopy(data, 0, newdata, 0, data.length); newdata[data.length] = !useAlternateCode() ? Token.FUNCTION.getCode() : Token.FUNCTION.getCode2(); IntegerHelper.getTwoBytes(function.getCode(), newdata, data.length + 1); return newdata; }
/** * Gets the token representation of this item in RPN * * @return the bytes applicable to this formula */ byte[] getBytes() { byte[] data = new byte[2]; data[0] = Token.BOOL.getCode(); data[1] = (byte) (value == true ? 1 : 0); return data; }
/** * Gets the token representation of this item in RPN * * @return the bytes applicable to this formula */ byte[] getBytes() { handleSpecialCases(); // Get the data for the operands - in the correct order ParseItem[] operands = getOperands(); byte[] data = new byte[0]; for (int i = 0 ; i < operands.length ; i++) { byte[] opdata = operands[i].getBytes(); // Grow the array byte[] newdata = new byte[data.length + opdata.length]; System.arraycopy(data, 0, newdata, 0, data.length); System.arraycopy(opdata, 0, newdata, data.length, opdata.length); data = newdata; } // Add on the operator byte byte[] newdata = new byte[data.length + 4]; System.arraycopy(data, 0, newdata, 0, data.length); newdata[data.length] = !useAlternateCode() ? Token.FUNCTIONVARARG.getCode() : Token.FUNCTIONVARARG.getCode2() ; newdata[data.length+1] = (byte) arguments; IntegerHelper.getTwoBytes(function.getCode(), newdata, data.length+2); return newdata; }
/** * Gets the token representation of this item in RPN * * @return the bytes applicable to this formula */ byte[] getBytes() { byte[] data = new byte[5]; data[0] = Token.REFERR.getCode(); // bytes 1-5 are unused return data; }
/** * Gets the token representation of this item in RPN * * @return the bytes applicable to this formula */ byte[] getBytes() { handleSpecialCases(); // Get the data for the operands - in the correct order ParseItem[] operands = getOperands(); byte[] data = new byte[0]; for (int i = 0 ; i < operands.length ; i++) { byte[] opdata = operands[i].getBytes(); // Grow the array byte[] newdata = new byte[data.length + opdata.length]; System.arraycopy(data, 0, newdata, 0, data.length); System.arraycopy(opdata, 0, newdata, data.length, opdata.length); data = newdata; } // Add on the operator byte byte[] newdata = new byte[data.length + 4]; System.arraycopy(data, 0, newdata, 0, data.length); newdata[data.length] = !useAlternateCode() ? Token.FUNCTIONVARARG.getCode() : Token.FUNCTIONVARARG.getCode2() ; newdata[data.length+1] = (byte) arguments; IntegerHelper.getTwoBytes(function.getCode(), newdata, data.length+2); return newdata; }
/** * Gets the token representation of this item in RPN * * @return the bytes applicable to this formula */ byte[] getBytes() { byte[] data = new byte[2]; data[0] = Token.BOOL.getCode(); data[1] = (byte) (value == true ? 1 : 0); return data; }
/** * Gets the token representation of this item in RPN * * @return the bytes applicable to this formula */ byte[] getBytes() { byte[] data = new byte[2]; data[0] = Token.ERR.getCode(); data[1] = (byte) error.getCode(); return data; }
/** * Gets the token representation of this item in RPN * * @return the bytes applicable to this formula */ byte[] getBytes() { byte[] data = new byte[9]; data[0] = Token.DOUBLE.getCode(); DoubleHelper.getIEEEBytes(value, data, 1); return data; }