System.out.println(field);
field = uc.getHeaderField(i);
}
- BufferedInputStream is = new BufferedInputStream(uc.getInputStream());
- return is;
+ return new BufferedInputStream(uc.getInputStream());
}
@SuppressWarnings("unused")
public Word2Forrest(HWPFDocument doc, OutputStream stream) throws IOException
{
- OutputStreamWriter out = new OutputStreamWriter (stream, Charset.forName("UTF-8"));
- _out = out;
+ _out = new OutputStreamWriter (stream, Charset.forName("UTF-8"));
_doc = doc;
init ();
public double calculateMortgagePayment( double p, double r, double y ) {
double i = r / 12 ;
double n = y * 12 ;
-
- double principalAndInterest =
- p * (( i * Math.pow((1 + i),n ) ) / ( Math.pow((1 + i),n) - 1)) ;
-
- return principalAndInterest ;
+
+ return p * (( i * Math.pow((1 + i),n ) ) / ( Math.pow((1 + i),n) - 1));
}
/**
* Excel does not support infinities and NaNs, rather, it gives a #NUM! error in these cases
}
UDFFinder udff1 = new DefaultUDFFinder(names, functions);
- UDFFinder udff = new AggregatingUDFFinder(udff1);
- return udff;
+ return new AggregatingUDFFinder(udff1);
}
public double calculateMortgagePayment( double p, double r, double y ) {
double i = r / 12 ;
double n = y * 12 ;
-
- double principalAndInterest =
- p * (( i * Math.pow((1 + i),n ) ) / ( Math.pow((1 + i),n) - 1)) ;
-
- return principalAndInterest ;
+
+ return p * (( i * Math.pow((1 + i),n ) ) / ( Math.pow((1 + i),n) - 1));
}
/**
* Excel does not support infinities and NaNs, rather, it gives a #NUM! error in these cases
}
public int[] getRGB() {
- int rgb[] = {
+ return new int[]{
FLAG_RED.getValue(colorRef),
FLAG_GREEN.getValue(colorRef),
FLAG_BLUE.getValue(colorRef)
};
- return rgb;
}
/**
*/
try {
final byte[] buffer = IOUtils.peekFirstNBytes(stream, BUFFER_SIZE);
- final boolean isPropertySetStream = isPropertySetStream(buffer, 0, buffer.length);
- return isPropertySetStream;
+ return isPropertySetStream(buffer, 0, buffer.length);
} catch (EmptyFileException e) {
return false;
}
for (int i = 0; i < pa.length; i++) {
hashCode += pa[i].hashCode();
}
- final int returnHashCode = (int) (hashCode & 0x0ffffffffL);
- return returnHashCode;
+ return (int) (hashCode & 0x0ffffffffL);
}
*/
public long getClipboardFormatTag()
{
- long clipboardFormatTag = LittleEndian.getInt(getThumbnail(),
+ return (long) LittleEndian.getInt(getThumbnail(),
OFFSET_CFTAG);
- return clipboardFormatTag;
}
public static void main(String[] args) throws IOException {
for (String file : args) {
- HPSFPropertiesExtractor ext = new HPSFPropertiesExtractor(
- new NPOIFSFileSystem(new File(file)));
- try {
+ try (HPSFPropertiesExtractor ext = new HPSFPropertiesExtractor(
+ new NPOIFSFileSystem(new File(file)))) {
System.out.println(ext.getText());
- } finally {
- ext.close();
}
}
}
} else {
boolean dumpInterpretedRecords = cmdArgs.shouldDumpRecordInterpretations();
boolean dumpHex = cmdArgs.shouldDumpBiffHex();
- boolean zeroAlignHexDump = dumpInterpretedRecords; // TODO - fix non-zeroAlign
- runBiffViewer(pw, is, dumpInterpretedRecords, dumpHex, zeroAlignHexDump,
+ runBiffViewer(pw, is, dumpInterpretedRecords, dumpHex, dumpInterpretedRecords,
cmdArgs.suppressHeader());
}
} finally {
"There are only " + numfonts
+ " font records, you asked for " + idx);
}
- FontRecord retval =
- ( FontRecord ) records.get((records.getFontpos() - (numfonts - 1)) + index);
- return retval;
+ return ( FontRecord ) records.get((records.getFontpos() - (numfonts - 1)) + index);
}
/**
int xfptr = records.getXfpos() - (numxfs - 1);
xfptr += index;
- ExtendedFormatRecord retval =
- ( ExtendedFormatRecord ) records.get(xfptr);
- return retval;
+ return ( ExtendedFormatRecord ) records.get(xfptr);
}
/**
protected CFHeaderBase() {
}
protected CFHeaderBase(CellRangeAddress[] regions, int nRules) {
- CellRangeAddress[] unmergedRanges = regions;
- CellRangeAddress[] mergeCellRanges = CellRangeUtil.mergeCellRanges(unmergedRanges);
+ CellRangeAddress[] mergeCellRanges = CellRangeUtil.mergeCellRanges(regions);
setCellRanges(mergeCellRanges);
field_1_numcf = nRules;
}
@Override
public EndSubRecord clone() {
- EndSubRecord rec = new EndSubRecord();
-
- return rec;
+
+ return new EndSubRecord();
}
}
}
for (NoteRecord noteRecord : tailRec.values()) {
- Record rec = noteRecord;
- pos += rec.serialize(pos, data);
+ pos += noteRecord.serialize(pos, data);
}
int bytesWritten = pos - offset;
if (bytesWritten != getRecordSize())
throw new IllegalArgumentException("Bad requested string length (" + requestedLength + ")");
}
char[] buf = null;
- boolean isCompressedEncoding = pIsCompressedEncoding;
- int availableChars = isCompressedEncoding ? ris.remaining() : ris.remaining() / LittleEndianConsts.SHORT_SIZE;
+ int availableChars = pIsCompressedEncoding ? ris.remaining() : ris.remaining() / LittleEndianConsts.SHORT_SIZE;
//everything worked out. Great!
int remaining = ris.remaining();
if (requestedLength == availableChars) {
}
for (int i = 0; i < buf.length; i++) {
char ch;
- if (isCompressedEncoding) {
+ if (pIsCompressedEncoding) {
ch = (char) ris.readUByte();
} else {
ch = (char) ris.readShort();
@Override
public void serialize(LittleEndianOutput out) {
- int nItems = _numberOfRegions;
- out.writeShort(nItems);
+ out.writeShort(_numberOfRegions);
for (int i = 0; i < _numberOfRegions; i++) {
_regions[_startIndex + i].serialize(out);
}
* @param ris the RecordInputstream to read the record from
*/
public NameCommentRecord(final RecordInputStream ris) {
- final LittleEndianInput in = ris;
- field_1_record_type = in.readShort();
- field_2_frt_cell_ref_flag = in.readShort();
- field_3_reserved = in.readLong();
- final int field_4_name_length = in.readShort();
- final int field_5_comment_length = in.readShort();
-
- if (in.readByte() == 0) {
- field_6_name_text = StringUtil.readCompressedUnicode(in, field_4_name_length);
+ field_1_record_type = ris.readShort();
+ field_2_frt_cell_ref_flag = ris.readShort();
+ field_3_reserved = ris.readLong();
+ final int field_4_name_length = ris.readShort();
+ final int field_5_comment_length = ris.readShort();
+
+ if (ris.readByte() == 0) {
+ field_6_name_text = StringUtil.readCompressedUnicode(ris, field_4_name_length);
} else {
- field_6_name_text = StringUtil.readUnicodeLE(in, field_4_name_length);
+ field_6_name_text = StringUtil.readUnicodeLE(ris, field_4_name_length);
}
- if (in.readByte() == 0) {
- field_7_comment_text = StringUtil.readCompressedUnicode(in, field_5_comment_length);
+ if (ris.readByte() == 0) {
+ field_7_comment_text = StringUtil.readCompressedUnicode(ris, field_5_comment_length);
} else {
- field_7_comment_text = StringUtil.readUnicodeLE(in, field_5_comment_length);
+ field_7_comment_text = StringUtil.readUnicodeLE(ris, field_5_comment_length);
}
}
}
public RecordInputStream createDecryptingStream(InputStream original) {
- FilePassRecord fpr = _filePassRec;
- String userPassword = Biff8EncryptionKey.getCurrentUserPassword();
+ String userPassword = Biff8EncryptionKey.getCurrentUserPassword();
if (userPassword == null) {
userPassword = Decryptor.DEFAULT_PASSWORD;
}
- EncryptionInfo info = fpr.getEncryptionInfo();
+ EncryptionInfo info = _filePassRec.getEncryptionInfo();
try {
if (!info.getDecryptor().verifyPassword(userPassword)) {
throw new EncryptedDocumentException(
attemptMergeColInfoRecords(k);
} else {
//split to 3 records
- ColumnInfoRecord ciStart = ci;
- ColumnInfoRecord ciMid = copyColInfo(ci);
+ ColumnInfoRecord ciMid = copyColInfo(ci);
ColumnInfoRecord ciEnd = copyColInfo(ci);
int lastcolumn = ci.getLastColumn();
- ciStart.setLastColumn(targetColumnIx - 1);
+ ci.setLastColumn(targetColumnIx - 1);
ciMid.setFirstColumn(targetColumnIx);
ciMid.setLastColumn(targetColumnIx);
* @param rs
*/
public void read(RecordStream rs) {
- List<CellRangeAddress> temp = _mergedRegions;
- while (rs.peekNextClass() == MergeCellsRecord.class) {
+ while (rs.peekNextClass() == MergeCellsRecord.class) {
MergeCellsRecord mcr = (MergeCellsRecord) rs.getNext();
int nRegions = mcr.getNumAreas();
for (int i = 0; i < nRegions; i++) {
CellRangeAddress cra = mcr.getAreaAt(i);
- temp.add(cra);
+ _mergedRegions.add(cra);
}
}
}
int nMergedCellsRecords = nRegions / MAX_MERGED_REGIONS;
int nLeftoverMergedRegions = nRegions % MAX_MERGED_REGIONS;
- int result = nMergedCellsRecords
- * (4 + CellRangeAddressList.getEncodedSize(MAX_MERGED_REGIONS)) + 4
- + CellRangeAddressList.getEncodedSize(nLeftoverMergedRegions);
- return result;
+ return nMergedCellsRecords
+ * (4 + CellRangeAddressList.getEncodedSize(MAX_MERGED_REGIONS)) + 4
+ + CellRangeAddressList.getEncodedSize(nLeftoverMergedRegions);
}
public void visitContainedRecords(RecordVisitor rv) {
_groupsCache.put(getKeyForCache(group._firstCell),group);
}
}
- SharedFormulaGroup sfg = _groupsCache.get(getKeyForCache(cellRef));
- return sfg;
+ return _groupsCache.get(getKeyForCache(cellRef));
}
private Integer getKeyForCache(final CellReference cellRef) {
@Override
public BeginRecord clone() {
- BeginRecord br = new BeginRecord();
- // No data so nothing to copy
- return br;
+ // No data so nothing to copy
+ return new BeginRecord();
}
}
@Override
public EndRecord clone() {
- EndRecord er = new EndRecord();
- // No data so nothing to copy
- return er;
+ // No data so nothing to copy
+ return new EndRecord();
}
}
}
public Object clone() {
- PlotAreaRecord rec = new PlotAreaRecord();
-
- return rec;
+ return new PlotAreaRecord();
}
}
@Override
public Graphics create()
{
- EscherGraphics g = new EscherGraphics(escherGroup, workbook,
+ return new EscherGraphics(escherGroup, workbook,
foreground, font, verticalPointsPerPixel );
- return g;
}
@Override
public Graphics create()
{
- EscherGraphics2d g2d = new EscherGraphics2d(_escherGraphics);
- return g2d;
+ return new EscherGraphics2d(_escherGraphics);
}
public void dispose()
private UnicodeString cloneStringIfRequired() {
if (_book == null)
return _string;
- UnicodeString s = (UnicodeString)_string.clone();
- return s;
+ return (UnicodeString)_string.clone();
}
private void addToSSTIfRequired() {
/*
* SET Intermediate3 TO Intermediate1 BITWISE OR Intermediate2
*/
- short intermediate3 = (short)(intermediate1 | intermediate2);
- return intermediate3;
+ return (short)(intermediate1 | intermediate2);
}
}
hash = new byte[5];
System.arraycopy(hashAlg.digest(), 0, hash, 0, 5);
- SecretKey skey = new SecretKeySpec(hash, ver.getCipherAlgorithm().jceId);
- return skey;
+ return new SecretKeySpec(hash, ver.getCipherAlgorithm().jceId);
}
@Override
@Override
public OutputStream getDataStream(DirectoryNode dir)
throws IOException, GeneralSecurityException {
- OutputStream countStream = new BinaryRC4CipherOutputStream(dir);
- return countStream;
+ return new BinaryRC4CipherOutputStream(dir);
}
@Override
MessageDigest hashAlg = CryptoFunctions.getMessageDigest(hashAlgo);
hashAlg.update(ver.getSalt());
byte hash[] = hashAlg.digest(StringUtil.getToUnicodeLE(password));
- SecretKey skey = new SecretKeySpec(hash, ver.getCipherAlgorithm().jceId);
- return skey;
+ return new SecretKeySpec(hash, ver.getCipherAlgorithm().jceId);
}
@Override
byte[] key = Arrays.copyOf(x3, keySize);
- SecretKey skey = new SecretKeySpec(key, ver.getCipherAlgorithm().jceId);
- return skey;
+ return new SecretKeySpec(key, ver.getCipherAlgorithm().jceId);
}
protected static byte[] fillAndXor(byte hash[], byte fillByte) {
}
String[] parentComponents = new String[ length ];
System.arraycopy(components, 0, parentComponents, 0, length);
- POIFSDocumentPath parent = new POIFSDocumentPath(parentComponents);
-
- return parent;
+
+ return new POIFSDocumentPath(parentComponents);
}
/**
blockList.fetchBlocks(root.getStartBlock(), -1);
// Turn that into a list
- BlockList list =new SmallDocumentBlockList(
- SmallDocumentBlock.extract(bigBlockSize, smallBlockBlocks));
- return list;
+ return new SmallDocumentBlockList(
+ SmallDocumentBlock.extract(bigBlockSize, smallBlockBlocks));
}
private static BlockAllocationTableReader prepareReader(
final POIFSBigBlockSize bigBlockSize,
LOG.log(POILogger.ERROR, "Can't load image data");
return null;
}
- Paint paint = new java.awt.TexturePaint(image, textAnchor);
- return paint;
+ return new java.awt.TexturePaint(image, textAnchor);
}
/**
public String format(int value) {
String index = formatIndex(value);
String cased = formatCase(index);
- String seperated = formatSeperator(cased);
- return seperated;
+ return formatSeperator(cased);
}
private String formatSeperator(String cased) {
} else {
StringBuffer fmtBuf = new StringBuffer();
boolean first = true;
- List<Special> specialList = integerSpecials;
if (integerSpecials.size() == 1) {
// If we don't do this, we get ".6e5" instead of "6e4"
fmtBuf.append("0");
first = false;
} else
- for (Special s : specialList) {
+ for (Special s : integerSpecials) {
if (isDigitFmt(s)) {
fmtBuf.append(first ? '#' : '0');
first = false;
if (cell == null) {
return null;
}
- Cell result = cell;
if (cell.getCellTypeEnum() == CellType.FORMULA) {
CellValue cv = evaluateFormulaCellValue(cell);
setCellValue(cell, cv);
setCellType(cell, cv); // cell will no longer be a formula cell
}
- return result;
+ return cell;
}
protected abstract CellValue evaluateFormulaCellValue(Cell cell);
return getMeaningfulValues(region, false, new ValueFunction() {
@Override
public Set<ValueAndFormat> evaluate(List<ValueAndFormat> allValues) {
- List<ValueAndFormat> values = allValues;
final ConditionFilterData conf = rule.getFilterConfiguration();
if (! conf.getBottom()) {
- Collections.sort(values, Collections.reverseOrder());
+ Collections.sort(allValues, Collections.reverseOrder());
} else {
- Collections.sort(values);
+ Collections.sort(allValues);
}
int limit = (int) conf.getRank();
return getMeaningfulValues(region, true, new ValueFunction() {
@Override
public Set<ValueAndFormat> evaluate(List<ValueAndFormat> allValues) {
- List<ValueAndFormat> values = allValues;
- Collections.sort(values);
+ Collections.sort(allValues);
final Set<ValueAndFormat> unique = new HashSet<>();
- for (int i=0; i < values.size(); i++) {
- final ValueAndFormat v = values.get(i);
+ for (int i = 0; i < allValues.size(); i++) {
+ final ValueAndFormat v = allValues.get(i);
// skip this if the current value matches the next one, or is the last one and matches the previous one
- if ( (i < values.size()-1 && v.equals(values.get(i+1)) ) || ( i > 0 && i == values.size()-1 && v.equals(values.get(i-1)) ) ) {
+ if ( (i < allValues.size()-1 && v.equals(allValues.get(i+1)) ) || ( i > 0 && i == allValues.size()-1 && v.equals(allValues.get(i-1)) ) ) {
// current value matches next value, skip both
i++;
continue;
return getMeaningfulValues(region, true, new ValueFunction() {
@Override
public Set<ValueAndFormat> evaluate(List<ValueAndFormat> allValues) {
- List<ValueAndFormat> values = allValues;
- Collections.sort(values);
+ Collections.sort(allValues);
final Set<ValueAndFormat> dup = new HashSet<>();
- for (int i=0; i < values.size(); i++) {
- final ValueAndFormat v = values.get(i);
+ for (int i = 0; i < allValues.size(); i++) {
+ final ValueAndFormat v = allValues.get(i);
// skip this if the current value matches the next one, or is the last one and matches the previous one
- if ( (i < values.size()-1 && v.equals(values.get(i+1)) ) || ( i > 0 && i == values.size()-1 && v.equals(values.get(i-1)) ) ) {
+ if ( (i < allValues.size()-1 && v.equals(allValues.get(i+1)) ) || ( i > 0 && i == allValues.size()-1 && v.equals(allValues.get(i-1)) ) ) {
// current value matches next value, add one
dup.add(v);
i++;
List<ValueAndFormat> values = new ArrayList<>(getMeaningfulValues(region, false, new ValueFunction() {
@Override
public Set<ValueAndFormat> evaluate(List<ValueAndFormat> allValues) {
- List<ValueAndFormat> values = allValues;
double total = 0;
- ValueEval[] pop = new ValueEval[values.size()];
- for (int i = 0; i < values.size(); i++) {
- ValueAndFormat v = values.get(i);
+ ValueEval[] pop = new ValueEval[allValues.size()];
+ for (int i = 0; i < allValues.size(); i++) {
+ ValueAndFormat v = allValues.get(i);
total += v.value.doubleValue();
pop[i] = new NumberEval(v.value.doubleValue());
}
final Set<ValueAndFormat> avgSet = new LinkedHashSet<>(1);
- avgSet.add(new ValueAndFormat(new Double(values.size() == 0 ? 0 : total / values.size()), null));
+ avgSet.add(new ValueAndFormat(new Double(allValues.size() == 0 ? 0 : total / allValues.size()), null));
- final double stdDev = values.size() <= 1 ? 0 : ((NumberEval) AggregateFunction.STDEV.evaluate(pop, 0, 0)).getNumberValue();
+ final double stdDev = allValues.size() <= 1 ? 0 : ((NumberEval) AggregateFunction.STDEV.evaluate(pop, 0, 0)).getNumberValue();
avgSet.add(new ValueAndFormat(new Double(stdDev), null));
return avgSet;
}
}
/* package */ EvaluationName getName(String name, int sheetIndex) {
- EvaluationName evalName = _workbook.getName(name, sheetIndex);
- return evalName;
+ return _workbook.getName(name, sheetIndex);
}
private static boolean isDebugLogEnabled() {
// Construct double from condition.
double conditionValue = 0.0;
try {
- int intValue = Integer.parseInt(condition);
- conditionValue = intValue;
+ conditionValue = Integer.parseInt(condition);
} catch (NumberFormatException e) { // It's not an int.
try {
conditionValue = Double.parseDouble(condition);
*/
// http://arachnoid.com/lutusp/finance.html
static public double pmt(double r, int nper, double pv, double fv, int type) {
- double pmt = -r * (pv * Math.pow(1 + r, nper) + fv) / ((1 + r*type) * (Math.pow(1 + r, nper) - 1));
- return pmt;
+ return -r * (pv * Math.pow(1 + r, nper) + fv) / ((1 + r*type) * (Math.pow(1 + r, nper) - 1));
}
*/
//http://en.wikipedia.org/wiki/Future_value
static public double fv(double r, int nper, double pmt, double pv, int type) {
- double fv = -(pv * Math.pow(1 + r, nper) + pmt * (1+r*type) * (Math.pow(1 + r, nper) - 1) / r);
- return fv;
+ return -(pv * Math.pow(1 + r, nper) + pmt * (1+r*type) * (Math.pow(1 + r, nper) - 1) / r);
}
/**
}
private static TwoDEval convertFirstArg(ValueEval arg0) {
- ValueEval firstArg = arg0;
- if (firstArg instanceof RefEval) {
+ if (arg0 instanceof RefEval) {
// convert to area ref for simpler code in getValueFromArea()
- return ((RefEval)firstArg).offset(0, 0, 0, 0);
+ return ((RefEval) arg0).offset(0, 0, 0, 0);
}
- if((firstArg instanceof TwoDEval)) {
- return (TwoDEval) firstArg;
+ if((arg0 instanceof TwoDEval)) {
+ return (TwoDEval) arg0;
}
// else the other variation of this function takes an array as the first argument
// it seems like interface 'ArrayEval' does not even exist yet
throw new RuntimeException("Incomplete code - cannot handle first arg of type ("
- + firstArg.getClass().getName() + ")");
+ + arg0.getClass().getName() + ")");
}
double d0 = NumericFunction.singleOperandEvaluate(arg0, srcRowIndex, srcColumnIndex);
double d1 = NumericFunction.singleOperandEvaluate(arg1, srcRowIndex, srcColumnIndex);
double logE = Math.log(d0);
- double base = d1;
- if (Double.compare(base, Math.E) == 0) {
+ if (Double.compare(d1, Math.E) == 0) {
result = logE;
} else {
- result = logE / Math.log(base);
+ result = logE / Math.log(d1);
}
NumericFunction.checkValue(result);
} catch (EvaluationException e) {
_options = in.readByte();
_data = in.readShort();
if (isOptimizedChoose()) {
- int nCases = _data;
- int[] jumpTable = new int[nCases];
+ int[] jumpTable = new int[(int) _data];
for (int i = 0; i < jumpTable.length; i++) {
jumpTable[i] = in.readUShort();
}
}
public String toString(){
- String retValue = "NameXPtg:[sheetRefIndex:" + _sheetRefIndex +
- " , nameNumber:" + _nameNumber + "]" ;
- return retValue;
+ return "NameXPtg:[sheetRefIndex:" + _sheetRefIndex +
+ " , nameNumber:" + _nameNumber + "]";
}
public byte getDefaultOperandClass() {
}
public Builder createBuilder() {
- final Builder builder = new Builder()
+ return new Builder()
.cellValue(copyCellValue)
.cellStyle(copyCellStyle)
.cellFormula(copyCellFormula)
.rowHeight(copyRowHeight)
.condenseRows(condenseRows)
.mergedRegions(copyMergedRegions);
- return builder;
}
/*
@Override
public int hashCode() {
- int code = (getMinColumn() +
- (getMaxColumn() << 8) +
- (getMinRow() << 16) +
- (getMaxRow() << 24));
- return code;
+ return (getMinColumn() +
+ (getMaxColumn() << 8) +
+ (getMinRow() << 16) +
+ (getMaxRow() << 24));
}
}
String col = matcher.group(1);
String row = matcher.group(2);
- CellRefParts cellRefParts = new CellRefParts(sheetName, row, col);
- return cellRefParts;
+ return new CellRefParts(sheetName, row, col);
}
private static String parseSheetName(String reference, int indexOfSheetNameDelimiter) {
_significand = frac.shiftLeft(expAdj);
_binaryExponent = (biasedExp & 0x07FF) - 1023 - expAdj;
} else {
- BigInteger frac = getFrac(rawBits);
- _significand = frac;
+ _significand = getFrac(rawBits);
_binaryExponent = (biasedExp & 0x07FF) - 1023;
}
}
anchor.setRow2(row2);
anchor.setDy2(dy2);
- Dimension dim = new Dimension(
+ return new Dimension(
(int)Math.round(scaledWidth*EMU_PER_PIXEL),
(int)Math.round(scaledHeight*EMU_PER_PIXEL)
);
-
- return dim;
}
/**
public static URI getPath(URI uri) {
if (uri != null) {
String path = uri.getPath();
- int len = path.length();
- int num2 = len;
+ int num2 = path.length();
while (--num2 >= 0) {
char ch1 = path.charAt(num2);
if (ch1 == PackagingURIHelper.FORWARD_SLASH_CHAR) {
public static File getDirectory(File f) {
if (f != null) {
String path = f.getPath();
- int len = path.length();
- int num2 = len;
+ int num2 = path.length();
while (--num2 >= 0) {
char ch1 = path.charAt(num2);
if (ch1 == File.separatorChar) {
public OutputStream getDataStream(DirectoryNode dir)
throws IOException, GeneralSecurityException {
// TODO: initialize headers
- AgileCipherOutputStream countStream = new AgileCipherOutputStream(dir);
- return countStream;
+ return new AgileCipherOutputStream(dir);
}
/**
digestInfoValueBuf.write(signatureConfig.getHashMagic());
digestInfoValueBuf.write(digest);
byte[] digestInfoValue = digestInfoValueBuf.toByteArray();
- byte[] signatureValue = cipher.doFinal(digestInfoValue);
- return signatureValue;
+ return cipher.doFinal(digestInfoValue);
} catch (Exception e) {
throw new EncryptedDocumentException(e);
}
try {
try {
NotesMasterDocument doc = NotesMasterDocument.Factory.parse(is, DEFAULT_XML_OPTIONS);
- CTNotesMaster slide = doc.getNotesMaster();
- return slide;
+ return doc.getNotesMaster();
} finally {
is.close();
}
public Color getFillColor() {
SolidPaint ps = getFillStyle();
if (ps == null) return null;
- Color col = DrawPaint.applyColorTransform(ps.getSolidColor());
- return col;
+ return DrawPaint.applyColorTransform(ps.getSolidColor());
}
@Override
@Override
public Insets2D getInsets() {
- Insets2D insets = new Insets2D(getTopInset(), getLeftInset(), getBottomInset(), getRightInset());
- return insets;
+ return new Insets2D(getTopInset(), getLeftInset(), getBottomInset(), getRightInset());
}
@Override
for (String s : position.split(",")) {
pos[i++] = Integer.parseInt(s.trim());
}
- XSSFClientAnchor ca = new XSSFClientAnchor(pos[1]*EMU_PER_PIXEL, pos[3]*EMU_PER_PIXEL, pos[5]*EMU_PER_PIXEL, pos[7]*EMU_PER_PIXEL, pos[0], pos[2], pos[4], pos[6]);
- return ca;
+ return new XSSFClientAnchor(pos[1]*EMU_PER_PIXEL, pos[3]*EMU_PER_PIXEL, pos[5]*EMU_PER_PIXEL, pos[7]*EMU_PER_PIXEL, pos[0], pos[2], pos[4], pos[6]);
}
/**
*/
public int getCharSet() {
CTIntProperty charset = _ctFont.sizeOfCharsetArray() == 0 ? null : _ctFont.getCharsetArray(0);
- int val = charset == null ? FontCharset.ANSI.getValue() : FontCharset.valueOf(charset.getVal()).getValue();
- return val;
+ return charset == null ? FontCharset.ANSI.getValue() : FontCharset.valueOf(charset.getVal()).getValue();
}
private double getFontHeightRaw() {
CTFontSize size = _ctFont.sizeOfSzArray() == 0 ? null : _ctFont.getSzArray(0);
if (size != null) {
- double fontHeight = size.getVal();
- return fontHeight;
+ return size.getVal();
}
return DEFAULT_FONT_SIZE;
}
protected AreaReference getPivotArea() {
final Workbook wb = getDataSheet().getWorkbook();
- AreaReference pivotArea = getPivotCacheDefinition().getPivotArea(wb);
- return pivotArea;
+ return getPivotCacheDefinition().getPivotArea(wb);
}
/**
};
fetchParagraphProperty(fetcher);
- double spcBef = fetcher.getValue() == null ? 0 : fetcher.getValue();
- return spcBef;
+ return fetcher.getValue() == null ? 0 : fetcher.getValue();
}
/**
public String getXpath(){
CTXmlCellPr xmlCellPr = singleXmlCell.getXmlCellPr();
CTXmlPr xmlPr = xmlCellPr.getXmlPr();
- String xpath = xmlPr.getXpath();
- return xpath;
+ return xmlPr.getXpath();
}
public long getMapId(){
public XWPFPictureData getPictureDataByID(String blipID) {
POIXMLDocumentPart relatedPart = getRelationById(blipID);
if (relatedPart instanceof XWPFPictureData) {
- XWPFPictureData xwpfPicData = (XWPFPictureData) relatedPart;
- return xwpfPicData;
+ return (XWPFPictureData) relatedPart;
}
return null;
}
* a new instance.
*/
private CTPPr getCTPPr() {
- CTPPr pr = paragraph.getPPr() == null ? paragraph.addNewPPr()
+ return paragraph.getPPr() == null ? paragraph.addNewPPr()
: paragraph.getPPr();
- return pr;
}
SecureRandom random = new SecureRandom();
keyPairGenerator.initialize(new RSAKeyGenParameterSpec(1024,
RSAKeyGenParameterSpec.F4), random);
- KeyPair keyPair = keyPairGenerator.generateKeyPair();
- return keyPair;
+ return keyPairGenerator.generateKeyPair();
}
static X509Certificate generateCertificate(PublicKey subjectPublicKey,
documentBuilderFactory.setNamespaceAware(true);
DocumentBuilder documentBuilder = documentBuilderFactory
.newDocumentBuilder();
- Document document = documentBuilder.parse(inputSource);
- return document;
+ return documentBuilder.parse(inputSource);
}
static String toString(Node dom) throws TransformerException {
OCSPRespBuilder ocspRespBuilder = new OCSPRespBuilder();
- OCSPResp ocspResp = ocspRespBuilder.build(OCSPRespBuilder.SUCCESSFUL, basicOCSPResp);
- return ocspResp;
+ return ocspRespBuilder.build(OCSPRespBuilder.SUCCESSFUL, basicOCSPResp);
}
}
DataValidationHelper dataValidationHelper = sheet.getDataValidationHelper();
DataValidationConstraint constraint = dataValidationHelper.createCustomConstraint("true");
- final XSSFDataValidation validation = (XSSFDataValidation) dataValidationHelper.createValidation(constraint, new CellRangeAddressList(0, 0, 0, 0));
- return validation;
+ return (XSSFDataValidation) dataValidationHelper.createValidation(constraint, new CellRangeAddressList(0, 0, 0, 0));
}
@Test
// Now check the low level stuff, and check that's all
// been set correctly
- XSSFSheet xs = sheet;
- CTWorksheet cts = xs.getCTWorksheet();
+ CTWorksheet cts = sheet.getCTWorksheet();
assertEquals(1, cts.sizeOfColsArray());
CTCols cols = cts.getColsArray(0);
long type = LittleEndian.getUShort(fileContents, pos+2);
long rlen = LittleEndian.getUInt(fileContents, pos+4);
- Record r = Record.createRecordForType(type,fileContents,pos,(int)rlen+8);
-
- return r;
+ return Record.createRecordForType(type,fileContents,pos,(int)rlen+8);
}
}
long type = LittleEndian.getUShort(fileContents, pos+2);
long rlen = LittleEndian.getUInt(fileContents, pos+4);
- Record r = Record.createRecordForType(type,fileContents,pos,(int)rlen+8);
-
- return r;
+ return Record.createRecordForType(type,fileContents,pos,(int)rlen+8);
}
}
// Start walking the file, looking for the records
while(walkPos != -1) {
- int newPos = findTextRecords(walkPos,textV);
- walkPos = newPos;
+ walkPos = findTextRecords(walkPos,textV);
}
// Return what we find
byte[] with_zero = new byte[4];
System.arraycopy(rgb,0,with_zero,0,3);
with_zero[3] = 0;
- int ret = LittleEndian.getInt(with_zero,0);
- return ret;
+ return LittleEndian.getInt(with_zero,0);
}
}
// Turn the vector into an array, and return
- Record[] cRecords = children.toArray( new Record[children.size()] );
- return cRecords;
+ return children.toArray( new Record[children.size()] );
}
/**
0x00, 0x00, (byte)0xA6, 0x0F, 0x0A, 0x00, 0x00, 0x00,
0x10, 0x03, 0x00, 0x00, (byte)0xF9, 0x00, 0x41, 0x01, 0x41, 0x01
};
- TextRulerAtom ruler = new TextRulerAtom(data, 0, data.length);
- return ruler;
+ return new TextRulerAtom(data, 0, data.length);
}
public void setParagraphIndent(short tetxOffset, short bulletOffset){
x2 = clientAnchor.getDx1();
y2 = clientAnchor.getRow1();
}
- Rectangle2D anchor= new Rectangle2D.Double(
+
+ return new Rectangle2D.Double(
(x1 == -1 ? -1 : Units.masterToPoints(x1)),
(y1 == -1 ? -1 : Units.masterToPoints(y1)),
(x2 == -1 ? -1 : Units.masterToPoints(x2-x1)),
(y2 == -1 ? -1 : Units.masterToPoints(y2-y1))
);
-
- return anchor;
}
/**
}
// TODO: find out where this -1 value comes from at #57820 (link to ms docs?)
- Rectangle2D anchor = new Rectangle2D.Double(
+
+ return new Rectangle2D.Double(
(x1 == -1 ? -1 : Units.masterToPoints(x1)),
(y1 == -1 ? -1 : Units.masterToPoints(y1)),
(x2 == -1 ? -1 : Units.masterToPoints(x2-x1)),
(y2 == -1 ? -1 : Units.masterToPoints(y2-y1))
);
-
- return anchor;
}
/**
public double getLineWidth(){
AbstractEscherOptRecord opt = getEscherOptRecord();
EscherSimpleProperty prop = getEscherProperty(opt, EscherProperties.LINESTYLE__LINEWIDTH);
- double width = (prop == null) ? DEFAULT_LINE_WIDTH : Units.toPoints(prop.getPropertyValue());
- return width;
+ return (prop == null) ? DEFAULT_LINE_WIDTH : Units.toPoints(prop.getPropertyValue());
}
/**
}
// TODO: check for merged cols
- double width = cells[0][col].getAnchor().getWidth();
- return width;
+ return cells[0][col].getAnchor().getWidth();
}
@Override
* representation
*/
protected static String toInternalString(String s) {
- String ns = s.replaceAll("\\r?\\n", "\r");
- return ns;
+ return s.replaceAll("\\r?\\n", "\r");
}
/**
return null;
}
Color color = HSLFTextParagraph.getColorFromColorIndexStruct(tp.getValue(), parentParagraph.getSheet());
- SolidPaint ps = DrawPaint.createSolidPaint(color);
- return ps;
+ return DrawPaint.createSolidPaint(color);
}
/**
@Override
public Insets2D getInsets() {
- Insets2D insets = new Insets2D(getTopInset(), getLeftInset(), getBottomInset(), getRightInset());
- return insets;
+ return new Insets2D(getTopInset(), getLeftInset(), getBottomInset(), getRightInset());
}
@Override
{
CellRangeAddress[] mergedRangeRowInfo = rowNumber < mergedRanges.length ? mergedRanges[rowNumber]
: null;
- CellRangeAddress cellRangeAddress = mergedRangeRowInfo != null
+
+ return mergedRangeRowInfo != null
&& columnNumber < mergedRangeRowInfo.length ? mergedRangeRowInfo[columnNumber]
: null;
-
- return cellRangeAddress;
}
static boolean isEmpty( String str )
XMLHelper.getDocumentBuilderFactory().newDocumentBuilder()
.newDocument() );
excelToHtmlConverter.processWorkbook( workbook );
- Document doc = excelToHtmlConverter.getDocument();
- return doc;
+ return excelToHtmlConverter.getDocument();
}
private String cssClassContainerCell;
private PlotAreaRecord createPlotAreaRecord()
{
- PlotAreaRecord r = new PlotAreaRecord( );
- return r;
+ return new PlotAreaRecord( );
}
private AxisLineFormatRecord createAxisLineFormatRecord( short format )
// get fcMin and fcMac because we will be writing the actual text with the
// complex table.
- int fcMin = mainOffset;
/*
* clx (encoding of the sprm lists for a complex file and piece table
// write out the CHPBinTable.
_fib.setFcPlcfbteChpx(tableOffset);
- _cbt.writeTo(wordDocumentStream, tableStream, fcMin, _cft.getTextPieceTable());
+ _cbt.writeTo(wordDocumentStream, tableStream, mainOffset, _cft.getTextPieceTable());
_fib.setLcbPlcfbteChpx(tableStream.size() - tableOffset);
tableOffset = tableStream.size();
tableOffset = tableStream.size();
// set some variables in the FileInformationBlock.
- _fib.getFibBase().setFcMin(fcMin);
+ _fib.getFibBase().setFcMin(mainOffset);
_fib.getFibBase().setFcMac(fcMac);
_fib.setCbMac(wordDocumentStream.size());
original.bold = characterRun.isBold();
original.italic = characterRun.isItalic();
original.fontName = characterRun.getFontName();
- Triplet updated = getFontReplacer().update( original );
- return updated;
+ return getFontReplacer().update( original );
}
public abstract Document getDocument();
stringBuilder.append( "}\n" );
}
}
- final String stylesheetText = stringBuilder.toString();
- return stylesheetText;
+ return stringBuilder.toString();
}
public Element createBlock()
public Element createSelect()
{
- Element result = document.createElement( "select" );
- return result;
+ return document.createElement( "select" );
}
public Element createTable()
for ( int x = 0; x < parentSize; x++ )
{
- int temp = mask;
- numBits += ( temp >> x ) & 0x1;
+ numBits += ( mask >> x ) & 0x1;
}
if ( numBits == 1 )
final int boundary = objBoundary.intValue();
final int startInclusive = lastTextRunStart;
- final int endExclusive = boundary;
- lastTextRunStart = endExclusive;
+ lastTextRunStart = boundary;
int startPosition = binarySearch( oldChpxSortedByStartPos, boundary );
startPosition = Math.abs( startPosition );
break;
int left = Math.max( startInclusive, chpx.getStart() );
- int right = Math.min( endExclusive, chpx.getEnd() );
+ int right = Math.min(boundary, chpx.getEnd() );
if ( left < right )
{
{
logger.log( POILogger.WARN, "Text piece [",
Integer.valueOf( startInclusive ), "; ",
- Integer.valueOf( endExclusive ),
+ Integer.valueOf(boundary),
") has no CHPX. Creating new one." );
// create it manually
- CHPX chpx = new CHPX( startInclusive, endExclusive,
+ CHPX chpx = new CHPX( startInclusive, boundary,
new SprmBuffer( 0 ) );
newChpxs.add( chpx );
continue;
// can we reuse existing?
CHPX existing = chpxs.get( 0 );
if ( existing.getStart() == startInclusive
- && existing.getEnd() == endExclusive )
+ && existing.getEnd() == boundary)
{
newChpxs.add( existing );
continue;
{
sprmBuffer.append( chpx.getGrpprl(), 0 );
}
- CHPX newChpx = new CHPX( startInclusive, endExclusive, sprmBuffer );
+ CHPX newChpx = new CHPX( startInclusive, boundary, sprmBuffer );
newChpxs.add( newChpx );
continue;
}
CharacterProperties baseStyle = ss.getCharacterStyle( istd );
- CharacterProperties props = CharacterSprmUncompressor.uncompressCHP(
+ return CharacterSprmUncompressor.uncompressCHP(
ss, baseStyle, getGrpprl(), 0 );
- return props;
}
public String toString() {
return null;
}
if(level < lst.numLevels()) {
- ListLevel lvl = lst.getLevels()[level];
- return lvl;
+ return lst.getLevels()[level];
}
if (log.check(POILogger.WARN)) {
log.log(POILogger.WARN, "Requested level " + level + " which was greater than the maximum defined (" + lst.numLevels() + ")");
{
int pheOffset = _offset + 1 + (((_crun + 1) * 4) + (index * 13));
- ParagraphHeight phe = new ParagraphHeight(_fkp, pheOffset);
-
- return phe;
+ return new ParagraphHeight(_fkp, pheOffset);
}
}
short istd = getIstd();
ParagraphProperties baseStyle = ss.getParagraphStyle(istd);
- ParagraphProperties props = ParagraphSprmUncompressor.uncompressPAP(baseStyle, getGrpprl(), 2);
- return props;
+ return ParagraphSprmUncompressor.uncompressPAP(baseStyle, getGrpprl(), 2);
}
@Override
}
public String toString() {
- String str = String.format(Locale.ROOT, "[%d, %d) - FLD - 0x%x; 0x%x"
+ return String.format(Locale.ROOT, "[%d, %d) - FLD - 0x%x; 0x%x"
, getFcStart(), getFcEnd(), fld.getBoundaryType(), fld.getFlt());
- return str;
}
}
// Some files seem to lie about their unicode status, which
// is very very pesky. Try to work around these, but this
// is getting on for black magic...
- int mainEndsAt = mainLength;
boolean matchAt = false;
boolean matchHalf = false;
for (int i=0; i<_sections.size(); i++) {
SEPX s = _sections.get(i);
- if (s.getEnd() == mainEndsAt) {
+ if (s.getEnd() == mainLength) {
matchAt = true;
- } else if(s.getEnd() == mainEndsAt || s.getEnd() == mainEndsAt-1) {
+ } else if(s.getEnd() == mainLength || s.getEnd() == mainLength -1) {
matchHalf = true;
}
}
_name = StringUtil.getFromUnicodeLE(std, nameStart, (nameLength*multiplier)/2);
//length then null terminator.
- int grupxStart = ((nameLength + 1) * multiplier) + nameStart;
// the spec only refers to two possible upxs but it mentions
// that more may be added in the future
- int varOffset = grupxStart;
+ int varOffset = ((nameLength + 1) * multiplier) + nameStart;
int countOfUPX = _stdfBase.getCupx();
_upxs = new UPX[countOfUPX];
for(int x = 0; x < countOfUPX; x++)
* Create the StringBuilder from the text and unicode flag
*/
private static StringBuilder buildInitSB(byte[] text, PieceDescriptor pd) {
- byte[] textBuffer = text;
if (StringUtil.BIG5.equals(pd.getCharset())) {
return new StringBuilder(CodePageUtil.cp950ToString(text, 0, text.length));
}
- String str = new String(textBuffer, 0, textBuffer.length, (pd.isUnicode()) ? StringUtil.UTF16LE : pd.getCharset());
+ String str = new String(text, 0, text.length, (pd.isUnicode()) ? StringUtil.UTF16LE : pd.getCharset());
return new StringBuilder(str);
}
getPicOffset() );
FFData ffData = new FFData( data.getBinData(), 0 );
- String[] values = ffData.getDropList();
- return values;
+ return ffData.getDropList();
}
}
return null;
public Calendar getDate() {
// TODO Discover if the timezone is stored somewhere else or not
- Calendar cal = LocaleUtil.getLocaleCalendar(
- _years.getValue(_info2)+1900,
- _months.getValue(_info2)-1,
- _dom.getValue(_info),
- _hours.getValue(_info),
- _minutes.getValue(_info),
- 0
- );
- return cal;
+ return LocaleUtil.getLocaleCalendar(
+ _years.getValue(_info2)+1900,
+ _months.getValue(_info2)-1,
+ _dom.getValue(_info),
+ _hours.getValue(_info),
+ _minutes.getValue(_info),
+ 0
+ );
}
public void serialize(byte[] buf, int offset)
{
case FieldDescriptor.FIELD_SEPARATOR_MARK:
{
- PlexOfField separatorPlexOfField = nextPlexOfField;
int endNodePositionInList = binarySearch( plexOfFields,
nextNodePositionInList, endOffsetExclusive,
- separatorPlexOfField.getFcEnd() );
+ nextPlexOfField.getFcEnd() );
if ( endNodePositionInList < 0 )
{
/*
}
FieldImpl field = new FieldImpl( startPlexOfField,
- separatorPlexOfField, endPlexOfField );
+ nextPlexOfField, endPlexOfField );
result.add( field );
// adding included fields
- if ( startPlexOfField.getFcStart() + 1 < separatorPlexOfField
+ if ( startPlexOfField.getFcStart() + 1 < nextPlexOfField
.getFcStart() - 1 )
{
parseFieldStructureImpl( plexOfFields, next + 1,
nextNodePositionInList, result );
}
- if ( separatorPlexOfField.getFcStart() + 1 < endPlexOfField
+ if ( nextPlexOfField.getFcStart() + 1 < endPlexOfField
.getFcStart() - 1 )
{
parseFieldStructureImpl( plexOfFields,
+ " is more than number of level for list ("
+ _listData.numLevels() + ")" );
}
- ListLevel lvl = _listData.getLevels()[level];
- return lvl;
+ return _listData.getLevels()[level];
}
/**
.lookup( propertyId );
if ( escherProperty == null )
return defaultValue;
- int value = escherProperty.getPropertyValue();
- return value;
+ return escherProperty.getPropertyValue();
}
public VerticalPositioning getVerticalPositioning()
{
throw new IllegalStateException( "Paragraph not in list" );
}
- HWPFList hwpfList = new HWPFList( getDocument().getStyleSheet(),
+ return new HWPFList( getDocument().getStyleSheet(),
getDocument().getListTables(), getIlfo() );
- return hwpfList;
}
public boolean isInList()
new DOMSource( wordToFoConverter.getDocument() ),
new StreamResult( stringWriter ) );
- String result = stringWriter.toString();
- return result;
+ return stringWriter.toString();
}
@Test
MyIndexRecordListener myIndexListener = new MyIndexRecordListener();
sheet.visitContainedRecords(myIndexListener, 0);
IndexRecord indexRecord = myIndexListener.getIndexRecord();
- int dbCellRecordPos = indexRecord.getDbcellAt(0);
- return dbCellRecordPos;
+ return indexRecord.getDbcellAt(0);
}
private static final class MyIndexRecordListener implements RecordVisitor {
public static ColumnInfoRecord[] getRecords(ColumnInfoRecordsAggregate agg) {
CIRCollector circ = new CIRCollector();
agg.visitContainedRecords(circ);
- ColumnInfoRecord[] result =
- circ._list.toArray(new ColumnInfoRecord[circ._list.size()]);
- return result;
+ return circ._list.toArray(new ColumnInfoRecord[circ._list.size()]);
}
}
ByteArrayOutputStream bos = new ByteArrayOutputStream();
wb.write(bos);
wb.close();
- POIFSFileSystem poifs = new POIFSFileSystem(new ByteArrayInputStream(bos.toByteArray()));
-
- return poifs;
+
+ return new POIFSFileSystem(new ByteArrayInputStream(bos.toByteArray()));
}
static byte[] getSampleTXT() {
} catch (final IOException e) {
throw new RuntimeException(e);
}
- final byte[] bytes = baos.toByteArray();
- return bytes;
+ return baos.toByteArray();
}
/**
private static double getDoubleCell(HSSFRow row, int colIx) {
HSSFCell cell = row.getCell(colIx);
assertNotNull("No cell found at column " + colIx, cell);
- double dVal = cell.getNumericCellValue();
- return dVal;
+ return cell.getNumericCellValue();
}
}
cell.setCellFormula(formula);
FormulaEvaluator evaluator = wb.getCreationHelper().createFormulaEvaluator();
- CellValue value = evaluator.evaluate(cell);
-
- return value;
+
+ return evaluator.evaluate(cell);
}
private void checkFormulaValue(Workbook wb, Cell cell, String formula, double expectedValue) {
for (int i = 0; i < evalArgs.length; i++) {
evalArgs[i] = new NumberEval(dArgs[i]);
}
- ValueEval r = instance.evaluate(evalArgs, -1, (short)-1);
- return r;
+ return instance.evaluate(evalArgs, -1, (short)-1);
}
/**
}
private String getCellFormula(int rowIx) {
- String result = _sheet.getRow(rowIx).getCell(0).getCellFormula();
-// if (false) {
+ // if (false) {
// System.err.println(result);
// }
- return result;
+ return _sheet.getRow(rowIx).getCell(0).getCellFormula();
}
}
return true;
}
}, null);
- OperationEvaluationContext ctx = new OperationEvaluationContext(workbookEvaluator,
+ return new OperationEvaluationContext(workbookEvaluator,
workbook, 0, 0, 0, null);
- return ctx;
}
public void testRefs() {
return true;
}
}, null);
- OperationEvaluationContext ctx = new OperationEvaluationContext(workbookEvaluator,
+ return new OperationEvaluationContext(workbookEvaluator,
workbook, 0, 0, 0, null);
- return ctx;
}
public void testRefs() {
return true;
}
}, null);
- OperationEvaluationContext ctx = new OperationEvaluationContext(workbookEvaluator,
+ return new OperationEvaluationContext(workbookEvaluator,
workbook, 0, 0, 0, null);
- return ctx;
}
public void testRefs() {
return true;
}
}, null);
- OperationEvaluationContext ctx = new OperationEvaluationContext(workbookEvaluator,
+ return new OperationEvaluationContext(workbookEvaluator,
workbook, 0, 0, 0, null);
- return ctx;
}
public void testRefs() {
aptg.setLastColumn((short)(aptg.getLastColumn()+letUsShiftColumn1By1Column));
}
}
- String newFormula = HSSFFormulaParser.toFormulaString(wb, ptgs);
- return newFormula;
+ return HSSFFormulaParser.toFormulaString(wb, ptgs);
}
}