View | Details | Raw Unified | Return to bug 61474
Collapse All | Expand All

(-)a/src/java/org/apache/poi/hssf/record/aggregates/ValueRecordsAggregate.java (-1 / +5 lines)
Lines 291-297 public final class ValueRecordsAggregate implements Iterable<CellValueRecordInte Link Here
291
				CellValueRecordInterface cell = rowCells[j];
291
				CellValueRecordInterface cell = rowCells[j];
292
				if (cell instanceof FormulaRecordAggregate) {
292
				if (cell instanceof FormulaRecordAggregate) {
293
                    FormulaRecordAggregate fra = (FormulaRecordAggregate)cell;
293
                    FormulaRecordAggregate fra = (FormulaRecordAggregate)cell;
294
                    shifter.shiftFormulaForHSSF(fra, currentExternSheetIndex);
294
                    Ptg[] ptgs = fra.getFormulaTokens(); // needs clone() inside this getter? 
295
                    Ptg[] ptgs2 = ((FormulaRecordAggregate)cell).getFormulaRecord().getParsedExpression(); // needs clone() inside this getter? 
296
                    if (shifter.adjustFormula(ptgs, currentExternSheetIndex)) { 
297
                        fra.setParsedExpression(ptgs); 
298
                    } 
295
                }
299
                }
296
			}
300
			}
297
		}
301
		}
(-)a/src/java/org/apache/poi/ss/formula/FormulaShifter.java (-104 / +36 lines)
Lines 17-24 Link Here
17
17
18
package org.apache.poi.ss.formula;
18
package org.apache.poi.ss.formula;
19
19
20
import org.apache.poi.hssf.record.aggregates.FormulaRecordAggregate;
21
import org.apache.poi.hssf.usermodel.HSSFCell;
22
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
20
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
23
import org.apache.poi.hssf.util.CellReference;
21
import org.apache.poi.hssf.util.CellReference;
24
import org.apache.poi.ss.SpreadsheetVersion;
22
import org.apache.poi.ss.SpreadsheetVersion;
Lines 37-46 import org.apache.poi.ss.formula.ptg.Ref3DPxg; Link Here
37
import org.apache.poi.ss.formula.ptg.RefErrorPtg;
35
import org.apache.poi.ss.formula.ptg.RefErrorPtg;
38
import org.apache.poi.ss.formula.ptg.RefPtg;
36
import org.apache.poi.ss.formula.ptg.RefPtg;
39
import org.apache.poi.ss.formula.ptg.RefPtgBase;
37
import org.apache.poi.ss.formula.ptg.RefPtgBase;
40
import org.apache.poi.ss.usermodel.Cell;
41
import org.apache.poi.ss.usermodel.Sheet;
38
import org.apache.poi.ss.usermodel.Sheet;
42
import org.apache.poi.ss.usermodel.Workbook;
43
import org.apache.poi.xssf.usermodel.XSSFEvaluationWorkbook;
44
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
39
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
45
40
46
41
Lines 76-82 public final class FormulaShifter { Link Here
76
71
77
    private final ShiftMode _mode;
72
    private final ShiftMode _mode;
78
73
79
	private Sheet _shiftingSheet;
80
	private boolean _rowModeElseColumn; 
74
	private boolean _rowModeElseColumn; 
81
75
82
	
76
	
Lines 102-107 public final class FormulaShifter { Link Here
102
        _version = version;
96
        _version = version;
103
97
104
        _srcSheetIndex = _dstSheetIndex = -1;
98
        _srcSheetIndex = _dstSheetIndex = -1;
99
        _rowModeElseColumn = true; // default
105
    }
100
    }
106
101
107
    /**
102
    /**
Lines 117-151 public final class FormulaShifter { Link Here
117
        _srcSheetIndex = srcSheetIndex;
112
        _srcSheetIndex = srcSheetIndex;
118
        _dstSheetIndex = dstSheetIndex;
113
        _dstSheetIndex = dstSheetIndex;
119
        _mode = ShiftMode.SheetMove;
114
        _mode = ShiftMode.SheetMove;
115
        _rowModeElseColumn = true; // default
120
    }
116
    }
121
    
117
    
122
	public static FormulaShifter createForItemShift(Sheet shiftingSheet, boolean _rowModeElseColumn, int firstShiftItemIndex, int lastShiftItemIndex, int shiftStep){
118
	public static FormulaShifter createForItemShift(Sheet shiftingSheet, boolean _rowModeElseColumn, int firstShiftItemIndex, int lastShiftItemIndex, int shiftStep){
123
		FormulaShifter instance = new FormulaShifter(shiftingSheet.getWorkbook().getSheetIndex(shiftingSheet), shiftingSheet.getSheetName(), 
119
		FormulaShifter instance = new FormulaShifter(shiftingSheet.getWorkbook().getSheetIndex(shiftingSheet), shiftingSheet.getSheetName(), 
124
				firstShiftItemIndex, lastShiftItemIndex, shiftStep, ShiftMode.RowMove, getSpreadsheetVersion(shiftingSheet));
120
				firstShiftItemIndex, lastShiftItemIndex, shiftStep, ShiftMode.RowMove, getSpreadsheetVersion(shiftingSheet));
125
		instance._rowModeElseColumn = _rowModeElseColumn;
121
		instance._rowModeElseColumn = _rowModeElseColumn;
126
		instance._shiftingSheet = shiftingSheet;
127
		return instance; 
122
		return instance; 
128
	}
123
	}
129
	// maybe should be deprecated, and previous one should be used
124
	// maybe should be deprecated, and previous one should be used
130
	public static FormulaShifter createForRowShift(int externSheetIndex, String sheetName, int firstMovedRowIndex, int lastMovedRowIndex, int numberOfRowsToMove,
125
	public static FormulaShifter createForRowShift(int externSheetIndex, String sheetName, int firstMovedRowIndex, int lastMovedRowIndex, int numberOfRowsToMove,
131
            SpreadsheetVersion version) {
126
            SpreadsheetVersion version) {
132
		FormulaShifter instance = new FormulaShifter(externSheetIndex, sheetName, firstMovedRowIndex, lastMovedRowIndex, numberOfRowsToMove, ShiftMode.RowMove, version);
127
		FormulaShifter instance = new FormulaShifter(externSheetIndex, sheetName, firstMovedRowIndex, lastMovedRowIndex, numberOfRowsToMove, ShiftMode.RowMove, version);
133
		instance._rowModeElseColumn = true;
134
		return instance;
128
		return instance;
135
    }
129
    }
136
    
130
    
137
	public static FormulaShifter createForItemCopy(Sheet shiftingSheet, boolean rowModeElseColumn, int firstMovedItemIndex, int lastMovedItemIndex, int shiftStep){
131
	public static FormulaShifter createForItemCopy(Sheet shiftingSheet, boolean rowModeElseColumn, int firstMovedItemIndex, int lastMovedItemIndex, int shiftStep){
138
		FormulaShifter instance = new FormulaShifter(shiftingSheet.getWorkbook().getSheetIndex(shiftingSheet), shiftingSheet.getSheetName(), 
132
		FormulaShifter instance = new FormulaShifter(shiftingSheet.getWorkbook().getSheetIndex(shiftingSheet), shiftingSheet.getSheetName(), 
139
				firstMovedItemIndex, lastMovedItemIndex, shiftStep, ShiftMode.RowCopy, getSpreadsheetVersion(shiftingSheet));
133
				firstMovedItemIndex, lastMovedItemIndex, shiftStep, ShiftMode.RowCopy, getSpreadsheetVersion(shiftingSheet));
140
    	instance._shiftingSheet = shiftingSheet;
134
    	instance._rowModeElseColumn = rowModeElseColumn;
141
		instance._rowModeElseColumn = rowModeElseColumn;
142
		return instance; 
135
		return instance; 
143
	}
136
	}
144
	// maybe should be deprecated, and previous one should be used
137
	// maybe should be deprecated, and previous one should be used
145
    public static FormulaShifter createForRowCopy(int externSheetIndex, String sheetName, int firstMovedRowIndex, int lastMovedRowIndex, int numberOfRowsToMove,
138
    public static FormulaShifter createForRowCopy(int externSheetIndex, String sheetName, int firstMovedRowIndex, int lastMovedRowIndex, int numberOfRowsToMove,
146
            SpreadsheetVersion version) {
139
            SpreadsheetVersion version) {
147
    	FormulaShifter instance = new FormulaShifter(externSheetIndex, sheetName, firstMovedRowIndex, lastMovedRowIndex, numberOfRowsToMove, ShiftMode.RowCopy, version);
140
    	FormulaShifter instance = new FormulaShifter(externSheetIndex, sheetName, firstMovedRowIndex, lastMovedRowIndex, numberOfRowsToMove, ShiftMode.RowCopy, version);
148
    	instance._rowModeElseColumn = true;
149
    	return instance;
141
    	return instance;
150
    }
142
    }
151
143
Lines 165-187 public final class FormulaShifter { Link Here
165
        return sb.toString();
157
        return sb.toString();
166
    }
158
    }
167
159
168
    /**
169
     * @param ptgs - if necessary, will get modified by this method
170
     * @param currentExternSheetIx - the extern sheet index of the sheet that contains the formula being adjusted
171
     * @return <code>true</code> if a change was made to the formula tokens
172
     */
173
    public boolean adjustFormula(Ptg[] ptgs, int currentExternSheetIx) {
174
        boolean refsWereChanged = false;
175
        for(int i=0; i<ptgs.length; i++) {
176
            Ptg newPtg = adjustPtg(ptgs[i], currentExternSheetIx);
177
            if (newPtg != null) {
178
                refsWereChanged = true;
179
                ptgs[i] = newPtg;
180
            }
181
        }
182
        return refsWereChanged;
183
    }
184
185
    private Ptg adjustPtg(Ptg ptg, int currentExternSheetIx) {
160
    private Ptg adjustPtg(Ptg ptg, int currentExternSheetIx) {
186
        switch(_mode){
161
        switch(_mode){
187
            case RowMove:
162
            case RowMove:
Lines 579-665 public final class FormulaShifter { Link Here
579
    // ******** logic which processes columns in same way as row ********
554
    // ******** logic which processes columns in same way as row ********
580
    
555
    
581
556
582
	public void shiftFormula(Cell cell) {
557
    /**
583
		switch (_version) {
558
     * @param ptgs - if necessary, will get modified by this method
584
			case EXCEL2007:
559
     * @param currentExternSheetIx - the extern sheet index of the sheet that contains the formula being adjusted
585
				int currentSheetIndex = getSheetIndex(cell.getSheet());
560
     * @return <code>true</code> if a change was made to the formula tokens
586
				String shiftedFormula = getShiftedFormulaForXSSF(cell.toString(), currentSheetIndex); 
561
     */
587
				cell.setCellFormula(shiftedFormula);
562
    public boolean adjustFormula(Ptg[] ptgs, int currentExternSheetIx) {
588
			break;
563
        boolean refsWereChanged = false;
589
			case EXCEL97:
564
        for(int i=0; i<ptgs.length; i++) {
590
		        FormulaRecordAggregate fra = (FormulaRecordAggregate)((HSSFCell)cell).getCellValueRecord();
565
        	Ptg newPtg;
591
		        int sheetIndex = getSheetIndex(cell.getSheet());
566
            if(_rowModeElseColumn){
592
				shiftFormulaForHSSF(fra, sheetIndex);
567
            	newPtg = adjustPtg(ptgs[i], currentExternSheetIx);
593
			break;
568
	            if (newPtg != null) {
594
		}
569
	                refsWereChanged = true;
595
	}
570
	           		ptgs[i] = newPtg;
596
	
571
	            }
597
	// original code in org.apache.poi.xssf.usermodel.helpers.XSSFRowShifter.shiftFormula()
598
	/** Recalculates formula, for EXCEL2007 spreadsheets 
599
	 * @param formula string representing formula
600
	 * */
601
    public String getShiftedFormulaForXSSF(String formula, int currentSheetIndex) {
602
    	boolean adjustSucceeded;
603
    	Workbook wb = _shiftingSheet.getWorkbook();
604
    	XSSFEvaluationWorkbook fpb = XSSFEvaluationWorkbook.create((XSSFWorkbook) wb);
605
        try {
606
            Ptg[] ptgs = FormulaParser.parse(formula, fpb, FormulaType.CELL, currentSheetIndex);
607
            String shiftedFmla = null;
608
            if(_rowModeElseColumn)
609
            	adjustSucceeded = adjustFormula(ptgs, currentSheetIndex);
610
            else {
611
	        	Ptg[] transponedPtgs = transpose(ptgs);
612
	        	adjustSucceeded = adjustFormula(transponedPtgs, currentSheetIndex); 
613
	        	if (adjustSucceeded) 
614
	        		ptgs = transpose(transponedPtgs);
615
            }
572
            }
616
            if(adjustSucceeded){
573
            else {
617
	            shiftedFmla = FormulaRenderer.toFormulaString(fpb, ptgs);
574
            	Ptg transposedPtg = transpose(ptgs[i]);
618
	                // dont use logger here, because of transfer to POI project
575
            	newPtg = adjustPtg(transposedPtg, currentExternSheetIx);
619
	                //System.out.println(String.format("original : %s; shifted : %s", formula, shiftedFmla));
576
                if (newPtg != null) {
620
	            return shiftedFmla;
577
                    refsWereChanged = true;
578
               		ptgs[i] = transpose(transposedPtg);
579
                }
621
            }
580
            }
622
            else return formula; // better return some error msg ?
623
        } catch (FormulaParseException fpe) {
624
            // Log, but don't change, rather than breaking; uncomment this in  POI context
625
            //logger.log(POILogger.WARN, "Error shifting formula on row ", row.getRowNum(), fpe);
626
            return formula;
627
        }
581
        }
582
        return refsWereChanged;
628
    }
583
    }
629
    
584
630
    // original code in org.apache.poi.hssf.record.aggregates.ValueRecordsAggregate.updateFormulasAfterRowShift()
585
631
	/** Recalculates formula, for EXCEL97 spreadsheets 
586
    private Ptg transpose(Ptg ptg){
632
	 * @param formula string representing formula
633
	 * */
634
    public void shiftFormulaForHSSF(FormulaRecordAggregate fra, int sheetIndex) {
635
    	boolean adjustSucceeded;
636
        Ptg[] ptgs = fra.getFormulaTokens(); 
637
        if(_rowModeElseColumn)
638
        	adjustSucceeded = adjustFormula(ptgs, sheetIndex);
639
        else {
640
        	Ptg[] transposedPtgs = transpose(ptgs);
641
        	adjustSucceeded = adjustFormula(transposedPtgs, sheetIndex);
642
        	if (adjustSucceeded)
643
        		ptgs = transpose(transposedPtgs);
644
        }
645
        fra.setParsedExpression(ptgs);
646
    }
647
    
648
    private Ptg[] transpose(Ptg[] original){
649
        Ptg[] transposed = new Ptg[original.length];
650
        int index = 0;
651
        for (Ptg ptg : original) {
652
            String ptgType = ptg.getClass().getSimpleName();  
587
            String ptgType = ptg.getClass().getSimpleName();  
653
        	if(ptgType.equals("Ref3DPtg")){  //3D means (sheetNo, col, row) reference, for example Sheet1!B3; xls version  
588
        	if(ptgType.equals("Ref3DPtg")){  //3D means (sheetNo, col, row) reference, for example Sheet1!B3; xls version  
654
            	int oldColumnIndex = ((Ref3DPtg) ptg).getColumn();
589
            	int oldColumnIndex = ((Ref3DPtg) ptg).getColumn();
655
            	((Ref3DPtg) ptg).setColumn(((Ref3DPtg) ptg).getRow());
590
            	((Ref3DPtg) ptg).setColumn(((Ref3DPtg) ptg).getRow());
656
            	((Ref3DPtg) ptg).setRow(oldColumnIndex);
591
            	((Ref3DPtg) ptg).setRow(oldColumnIndex);
657
            	transposed[index] = ptg;
592
            	return ptg;
658
        	} else if(ptgType.equals("Ref3DPxg")){  //3D means (sheetNo, col, row) reference, for example Sheet1!B3; xlsx version  
593
        	} else if(ptgType.equals("Ref3DPxg")){  //3D means (sheetNo, col, row) reference, for example Sheet1!B3; xlsx version  
659
    	        int oldColumnIndex = ((Ref3DPxg) ptg).getColumn();
594
    	        int oldColumnIndex = ((Ref3DPxg) ptg).getColumn();
660
            	((Ref3DPxg) ptg).setColumn(((Ref3DPxg) ptg).getRow());
595
            	((Ref3DPxg) ptg).setColumn(((Ref3DPxg) ptg).getRow());
661
            	((Ref3DPxg) ptg).setRow(oldColumnIndex);
596
            	((Ref3DPxg) ptg).setRow(oldColumnIndex);
662
            	transposed[index] = ptg;
597
            	return ptg;
663
        	} else if(ptgType.equals("AreaPtg")){  // region for aggregate function, for example A1:B3 or Sheet1!B3:Sheet1!C3
598
        	} else if(ptgType.equals("AreaPtg")){  // region for aggregate function, for example A1:B3 or Sheet1!B3:Sheet1!C3
664
		        	int oldFirstColumnIndex = ((AreaPtg) ptg).getFirstColumn();
599
		        	int oldFirstColumnIndex = ((AreaPtg) ptg).getFirstColumn();
665
		        	((AreaPtg) ptg).setFirstColumn(((AreaPtg) ptg).getFirstRow());
600
		        	((AreaPtg) ptg).setFirstColumn(((AreaPtg) ptg).getFirstRow());
Lines 667-673 public final class FormulaShifter { Link Here
667
		        	int oldLastColumnIndex = ((AreaPtg) ptg).getLastColumn();
602
		        	int oldLastColumnIndex = ((AreaPtg) ptg).getLastColumn();
668
		        	((AreaPtg) ptg).setLastColumn(((AreaPtg) ptg).getLastRow());
603
		        	((AreaPtg) ptg).setLastColumn(((AreaPtg) ptg).getLastRow());
669
		        	((AreaPtg) ptg).setLastRow(oldLastColumnIndex);
604
		        	((AreaPtg) ptg).setLastRow(oldLastColumnIndex);
670
		        	transposed[index] = ptg;
605
		        	return ptg;
671
        	}
606
        	}
672
        	 else if(ptgType.equals("Area3DPtg")){ //for example SUM(Sheet1!B3:C3); xls version 
607
        	 else if(ptgType.equals("Area3DPtg")){ //for example SUM(Sheet1!B3:C3); xls version 
673
		        	int oldFirstColumnIndex = ((Area3DPtg) ptg).getFirstColumn();
608
		        	int oldFirstColumnIndex = ((Area3DPtg) ptg).getFirstColumn();
Lines 676-682 public final class FormulaShifter { Link Here
676
		        	int oldLastColumnIndex = ((Area3DPtg) ptg).getLastColumn();
611
		        	int oldLastColumnIndex = ((Area3DPtg) ptg).getLastColumn();
677
		        	((Area3DPtg) ptg).setLastColumn(((Area3DPtg) ptg).getLastRow());
612
		        	((Area3DPtg) ptg).setLastColumn(((Area3DPtg) ptg).getLastRow());
678
		        	((Area3DPtg) ptg).setLastRow(oldLastColumnIndex);
613
		        	((Area3DPtg) ptg).setLastRow(oldLastColumnIndex);
679
		        	transposed[index] = ptg;
614
		        	return ptg;
680
        	 }
615
        	 }
681
        	 else if(ptgType.equals("Area3DPxg")){ //for example SUM(Sheet1!B3:C3); xlsx version 
616
        	 else if(ptgType.equals("Area3DPxg")){ //for example SUM(Sheet1!B3:C3); xlsx version 
682
        	         int oldFirstColumnIndex = ((Area3DPxg) ptg).getFirstColumn();
617
        	         int oldFirstColumnIndex = ((Area3DPxg) ptg).getFirstColumn();
Lines 685-700 public final class FormulaShifter { Link Here
685
		        	int oldLastColumnIndex = ((Area3DPxg) ptg).getLastColumn();
620
		        	int oldLastColumnIndex = ((Area3DPxg) ptg).getLastColumn();
686
		        	((Area3DPxg) ptg).setLastColumn(((Area3DPxg) ptg).getLastRow());
621
		        	((Area3DPxg) ptg).setLastColumn(((Area3DPxg) ptg).getLastRow());
687
		        	((Area3DPxg) ptg).setLastRow(oldLastColumnIndex);
622
		        	((Area3DPxg) ptg).setLastRow(oldLastColumnIndex);
688
		        	transposed[index] = ptg;
623
		        	return ptg;
689
        	 }	else if(ptgType.equals("RefPtg")){  // common simple reference, like A2 
624
        	 }	else if(ptgType.equals("RefPtg")){  // common simple reference, like A2 
690
	                RefPtg transponedCellRefToken = new RefPtg(transpose(ptg.toFormulaString()));
625
	                RefPtg transponedCellRefToken = new RefPtg(transpose(ptg.toFormulaString()));
691
	                transposed[index] = transponedCellRefToken;
626
	                return transponedCellRefToken;
692
        	 }
627
        	 }
693
        	 else // operators like + or SUM, for example
628
        	 else // operators like + or SUM, for example
694
	            	transposed[index] = ptg;
629
        		 return ptg;
695
            index++;
696
        }
697
        return transposed;
698
    }
630
    }
699
631
700
    public static String transpose(String cellreference){
632
    public static String transpose(String cellreference){
(-)a/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFRowShifter.java (-2 / +15 lines)
Lines 175-183 public final class XSSFRowShifter extends RowShifter { Link Here
175
    private static String shiftFormula(Row row, String formula, FormulaShifter shifter) {
175
    private static String shiftFormula(Row row, String formula, FormulaShifter shifter) {
176
        Sheet sheet = row.getSheet();
176
        Sheet sheet = row.getSheet();
177
        Workbook wb = sheet.getWorkbook();
177
        Workbook wb = sheet.getWorkbook();
178
        int currentSheetIndex = wb.getSheetIndex(sheet);
178
        int sheetIndex = wb.getSheetIndex(sheet);
179
        final int rowIndex = row.getRowNum();
180
        XSSFEvaluationWorkbook fpb = XSSFEvaluationWorkbook.create((XSSFWorkbook) wb);
179
        
181
        
180
        return shifter.getShiftedFormulaForXSSF(formula, currentSheetIndex);
182
        try {
183
            Ptg[] ptgs = FormulaParser.parse(formula, fpb, FormulaType.CELL, sheetIndex, rowIndex);
184
            String shiftedFmla = null;
185
            if (shifter.adjustFormula(ptgs, sheetIndex)) {
186
                shiftedFmla = FormulaRenderer.toFormulaString(fpb, ptgs);
187
            }
188
            return shiftedFmla;
189
        } catch (FormulaParseException fpe) {
190
            // Log, but don't change, rather than breaking
191
            logger.log(POILogger.WARN, "Error shifting formula on row ", row.getRowNum(), fpe);
192
            return formula;
193
        }
181
    }
194
    }
182
195
183
    public void updateConditionalFormatting(FormulaShifter shifter) {
196
    public void updateConditionalFormatting(FormulaShifter shifter) {
(-)a/src/testcases/org/apache/poi/ss/formula/TestCompleteFormulaShifter.java (-3 / +2 lines)
Lines 48-60 public class TestCompleteFormulaShifter { Link Here
48
	public void testFormula(Sheet sheet){
48
	public void testFormula(Sheet sheet){
49
	    String originalFormula = "A1+B1";
49
	    String originalFormula = "A1+B1";
50
50
51
	    FormulaShifter verticalFormulaShifter = FormulaShifter.createForItemShift(sheet, true, 0, 2, 1); 
51
	    /*FormulaShifter verticalFormulaShifter = FormulaShifter.createForItemShift(sheet, true, 0, 2, 1); 
52
	    String adjustedFormula = verticalFormulaShifter.getShiftedFormulaForXSSF(originalFormula, 0);
52
	    String adjustedFormula = verticalFormulaShifter.getShiftedFormulaForXSSF(originalFormula, 0);
53
	    assertEquals("A2+B2", adjustedFormula);
53
	    assertEquals("A2+B2", adjustedFormula);
54
54
55
	    FormulaShifter horizontalFormulaShifter = FormulaShifter.createForItemShift(sheet, false, 0, 2, 1); 
55
	    FormulaShifter horizontalFormulaShifter = FormulaShifter.createForItemShift(sheet, false, 0, 2, 1); 
56
	    adjustedFormula = horizontalFormulaShifter.getShiftedFormulaForXSSF(originalFormula, 0);
56
	    adjustedFormula = horizontalFormulaShifter.getShiftedFormulaForXSSF(originalFormula, 0);
57
	    assertEquals("B1+C1", adjustedFormula);
57
	    assertEquals("B1+C1", adjustedFormula);*/
58
	}
58
	}
59
	@Test
59
	@Test
60
	public void testFormulaCell(){
60
	public void testFormulaCell(){
61
- 

Return to bug 61474