org.apache.poi.ss.formula
Class FormulaShifter
java.lang.Object
org.apache.poi.ss.formula.FormulaShifter
public final class FormulaShifter
- extends java.lang.Object
Updates Formulas as rows or sheets are shifted
Method Summary |
boolean |
adjustFormula(Ptg[] ptgs,
int currentExternSheetIx)
|
static FormulaShifter |
createForRowCopy(int externSheetIndex,
java.lang.String sheetName,
int firstMovedRowIndex,
int lastMovedRowIndex,
int numberOfRowsToMove,
SpreadsheetVersion version)
|
static FormulaShifter |
createForRowShift(int externSheetIndex,
java.lang.String sheetName,
int firstMovedRowIndex,
int lastMovedRowIndex,
int numberOfRowsToMove)
Deprecated. As of 3.14 beta 1 (November 2015), replaced by createForRowShift(int, String, int, int, int, SpreadsheetVersion) |
static FormulaShifter |
createForRowShift(int externSheetIndex,
java.lang.String sheetName,
int firstMovedRowIndex,
int lastMovedRowIndex,
int numberOfRowsToMove,
SpreadsheetVersion version)
|
static FormulaShifter |
createForSheetShift(int srcSheetIndex,
int dstSheetIndex)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
createForRowShift
@Deprecated
public static FormulaShifter createForRowShift(int externSheetIndex,
java.lang.String sheetName,
int firstMovedRowIndex,
int lastMovedRowIndex,
int numberOfRowsToMove)
- Deprecated. As of 3.14 beta 1 (November 2015), replaced by
createForRowShift(int, String, int, int, int, SpreadsheetVersion)
- Parameters:
externSheetIndex
- sheetName
- firstMovedRowIndex
- lastMovedRowIndex
- numberOfRowsToMove
-
- Returns:
- FormulaShifter object that can be passed to a RowShifter to modify formulas.
createForRowShift
public static FormulaShifter createForRowShift(int externSheetIndex,
java.lang.String sheetName,
int firstMovedRowIndex,
int lastMovedRowIndex,
int numberOfRowsToMove,
SpreadsheetVersion version)
createForRowCopy
public static FormulaShifter createForRowCopy(int externSheetIndex,
java.lang.String sheetName,
int firstMovedRowIndex,
int lastMovedRowIndex,
int numberOfRowsToMove,
SpreadsheetVersion version)
createForSheetShift
public static FormulaShifter createForSheetShift(int srcSheetIndex,
int dstSheetIndex)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
adjustFormula
public boolean adjustFormula(Ptg[] ptgs,
int currentExternSheetIx)
- Parameters:
ptgs
- - if necessary, will get modified by this methodcurrentExternSheetIx
- - the extern sheet index of the sheet that contains the formula being adjusted
- Returns:
true
if a change was made to the formula tokens
Copyright 2016 The Apache Software Foundation or
its licensors, as applicable.