prepare for bug 58348, make FormulaShifter.ShiftMode enum private
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1711864 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
adcc71257a
commit
44edbec0d5
@ -39,9 +39,9 @@ import org.apache.poi.ss.formula.ptg.RefPtgBase;
|
|||||||
*/
|
*/
|
||||||
public final class FormulaShifter {
|
public final class FormulaShifter {
|
||||||
|
|
||||||
static enum ShiftMode {
|
private static enum ShiftMode {
|
||||||
Row,
|
RowMove,
|
||||||
Sheet
|
SheetMove,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -81,7 +81,7 @@ public final class FormulaShifter {
|
|||||||
_firstMovedIndex = firstMovedIndex;
|
_firstMovedIndex = firstMovedIndex;
|
||||||
_lastMovedIndex = lastMovedIndex;
|
_lastMovedIndex = lastMovedIndex;
|
||||||
_amountToMove = amountToMove;
|
_amountToMove = amountToMove;
|
||||||
_mode = ShiftMode.Row;
|
_mode = ShiftMode.RowMove;
|
||||||
|
|
||||||
_srcSheetIndex = _dstSheetIndex = -1;
|
_srcSheetIndex = _dstSheetIndex = -1;
|
||||||
}
|
}
|
||||||
@ -97,7 +97,7 @@ public final class FormulaShifter {
|
|||||||
|
|
||||||
_srcSheetIndex = srcSheetIndex;
|
_srcSheetIndex = srcSheetIndex;
|
||||||
_dstSheetIndex = dstSheetIndex;
|
_dstSheetIndex = dstSheetIndex;
|
||||||
_mode = ShiftMode.Sheet;
|
_mode = ShiftMode.SheetMove;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static FormulaShifter createForRowShift(int externSheetIndex, String sheetName, int firstMovedRowIndex, int lastMovedRowIndex, int numberOfRowsToMove) {
|
public static FormulaShifter createForRowShift(int externSheetIndex, String sheetName, int firstMovedRowIndex, int lastMovedRowIndex, int numberOfRowsToMove) {
|
||||||
@ -139,9 +139,9 @@ public final class FormulaShifter {
|
|||||||
|
|
||||||
private Ptg adjustPtg(Ptg ptg, int currentExternSheetIx) {
|
private Ptg adjustPtg(Ptg ptg, int currentExternSheetIx) {
|
||||||
switch(_mode){
|
switch(_mode){
|
||||||
case Row:
|
case RowMove:
|
||||||
return adjustPtgDueToRowMove(ptg, currentExternSheetIx);
|
return adjustPtgDueToRowMove(ptg, currentExternSheetIx);
|
||||||
case Sheet:
|
case SheetMove:
|
||||||
return adjustPtgDueToSheetMove(ptg);
|
return adjustPtgDueToSheetMove(ptg);
|
||||||
default:
|
default:
|
||||||
throw new IllegalStateException("Unsupported shift mode: " + _mode);
|
throw new IllegalStateException("Unsupported shift mode: " + _mode);
|
||||||
|
Loading…
Reference in New Issue
Block a user