Lines 1-4
Link Here
|
1 |
|
|
|
2 |
/* ==================================================================== |
1 |
/* ==================================================================== |
3 |
Licensed to the Apache Software Foundation (ASF) under one or more |
2 |
Licensed to the Apache Software Foundation (ASF) under one or more |
4 |
contributor license agreements. See the NOTICE file distributed with |
3 |
contributor license agreements. See the NOTICE file distributed with |
Lines 15-21
Link Here
|
15 |
See the License for the specific language governing permissions and |
14 |
See the License for the specific language governing permissions and |
16 |
limitations under the License. |
15 |
limitations under the License. |
17 |
==================================================================== */ |
16 |
==================================================================== */ |
18 |
|
|
|
19 |
|
17 |
|
20 |
package org.apache.poi.hssf.usermodel; |
18 |
package org.apache.poi.hssf.usermodel; |
21 |
|
19 |
|
Lines 24-35
Link Here
|
24 |
import java.io.FileOutputStream; |
22 |
import java.io.FileOutputStream; |
25 |
import java.util.Date; |
23 |
import java.util.Date; |
26 |
import java.util.GregorianCalendar; |
24 |
import java.util.GregorianCalendar; |
27 |
import java.util.List; |
|
|
28 |
|
25 |
|
|
|
26 |
import junit.framework.AssertionFailedError; |
29 |
import junit.framework.TestCase; |
27 |
import junit.framework.TestCase; |
30 |
|
28 |
|
31 |
import org.apache.poi.hssf.model.Sheet; |
29 |
import org.apache.poi.hssf.model.Sheet; |
32 |
import org.apache.poi.hssf.record.HyperlinkRecord; |
|
|
33 |
import org.apache.poi.hssf.util.HSSFColor; |
30 |
import org.apache.poi.hssf.util.HSSFColor; |
34 |
import org.apache.poi.poifs.filesystem.POIFSFileSystem; |
31 |
import org.apache.poi.poifs.filesystem.POIFSFileSystem; |
35 |
import org.apache.poi.util.TempFile; |
32 |
import org.apache.poi.util.TempFile; |
Lines 41-53
Link Here
|
41 |
* @author Dan Sherman (dsherman at isisph.com) |
38 |
* @author Dan Sherman (dsherman at isisph.com) |
42 |
* @author Alex Jacoby (ajacoby at gmail.com) |
39 |
* @author Alex Jacoby (ajacoby at gmail.com) |
43 |
*/ |
40 |
*/ |
|
|
41 |
public final class TestHSSFCell extends TestCase { |
44 |
|
42 |
|
45 |
public class TestHSSFCell |
|
|
46 |
extends TestCase { |
47 |
public TestHSSFCell(String s) { |
48 |
super(s); |
49 |
} |
50 |
|
51 |
/** |
43 |
/** |
52 |
* test that Boolean and Error types (BoolErrRecord) are supported properly. |
44 |
* test that Boolean and Error types (BoolErrRecord) are supported properly. |
53 |
*/ |
45 |
*/ |
Lines 388-393
Link Here
|
388 |
assertEquals("Formula", "A1+B1", c.toString()); |
380 |
assertEquals("Formula", "A1+B1", c.toString()); |
389 |
} |
381 |
} |
390 |
|
382 |
|
|
|
383 |
public void testSetStringInFormulaCell_bug44606() { |
384 |
HSSFWorkbook wb = new HSSFWorkbook(); |
385 |
HSSFCell cell = wb.createSheet("Sheet1").createRow(0).createCell((short)0); |
386 |
cell.setCellFormula("B1&C1"); |
387 |
try { |
388 |
cell.setCellValue(new HSSFRichTextString("hello")); |
389 |
} catch (ClassCastException e) { |
390 |
throw new AssertionFailedError("Identified bug 44606"); |
391 |
} |
392 |
} |
393 |
|
391 |
public static void main(String [] args) { |
394 |
public static void main(String [] args) { |
392 |
System.out |
395 |
System.out |
393 |
.println("Testing org.apache.poi.hssf.usermodel.TestHSSFCell"); |
396 |
.println("Testing org.apache.poi.hssf.usermodel.TestHSSFCell"); |