Lines 56-61
Link Here
|
56 |
|
56 |
|
57 |
import junit.framework.TestCase; |
57 |
import junit.framework.TestCase; |
58 |
import org.apache.poi.hssf.model.Sheet; |
58 |
import org.apache.poi.hssf.model.Sheet; |
|
|
59 |
import org.apache.poi.hssf.record.HCenterRecord; |
59 |
import org.apache.poi.hssf.record.VCenterRecord; |
60 |
import org.apache.poi.hssf.record.VCenterRecord; |
60 |
import org.apache.poi.hssf.record.WSBoolRecord; |
61 |
import org.apache.poi.hssf.record.WSBoolRecord; |
61 |
|
62 |
|
Lines 115-120
Link Here
|
115 |
// wb.write(new FileOutputStream("c:\\test.xls")); |
116 |
// wb.write(new FileOutputStream("c:\\test.xls")); |
116 |
} |
117 |
} |
117 |
|
118 |
|
|
|
119 |
/** |
120 |
* Test horizontally centered output. |
121 |
*/ |
122 |
|
123 |
public void testHorizontallyCenter() |
124 |
throws Exception |
125 |
{ |
126 |
HSSFWorkbook wb = new HSSFWorkbook(); |
127 |
HSSFSheet s = wb.createSheet(); |
128 |
Sheet sheet = s.getSheet(); |
129 |
HCenterRecord record = |
130 |
(HCenterRecord) sheet.findFirstRecordBySid(HCenterRecord.sid); |
131 |
|
132 |
assertEquals(false, record.getHCenter()); |
133 |
s.setHorizontallyCenter(true); |
134 |
assertEquals(true, record.getHCenter()); |
135 |
|
136 |
} |
137 |
|
138 |
|
118 |
/** |
139 |
/** |
119 |
* Test WSBboolRecord fields get set in the user model. |
140 |
* Test WSBboolRecord fields get set in the user model. |
120 |
*/ |
141 |
*/ |