*/
public final class FormulaShifter {
- static enum ShiftMode {
- Row,
- Sheet
+ private static enum ShiftMode {
+ RowMove,
+ SheetMove,
}
/**
_firstMovedIndex = firstMovedIndex;
_lastMovedIndex = lastMovedIndex;
_amountToMove = amountToMove;
- _mode = ShiftMode.Row;
+ _mode = ShiftMode.RowMove;
_srcSheetIndex = _dstSheetIndex = -1;
}
_srcSheetIndex = srcSheetIndex;
_dstSheetIndex = dstSheetIndex;
- _mode = ShiftMode.Sheet;
+ _mode = ShiftMode.SheetMove;
}
public static FormulaShifter createForRowShift(int externSheetIndex, String sheetName, int firstMovedRowIndex, int lastMovedRowIndex, int numberOfRowsToMove) {
private Ptg adjustPtg(Ptg ptg, int currentExternSheetIx) {
switch(_mode){
- case Row:
+ case RowMove:
return adjustPtgDueToRowMove(ptg, currentExternSheetIx);
- case Sheet:
+ case SheetMove:
return adjustPtgDueToSheetMove(ptg);
default:
throw new IllegalStateException("Unsupported shift mode: " + _mode);