silenced noisy tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@642891 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9f66b9c5f4
commit
ede1814a1d
@ -25,7 +25,6 @@ import org.apache.poi.ddf.EscherComplexProperty;
|
|||||||
import org.apache.poi.ddf.EscherOptRecord;
|
import org.apache.poi.ddf.EscherOptRecord;
|
||||||
import org.apache.poi.ddf.EscherProperty;
|
import org.apache.poi.ddf.EscherProperty;
|
||||||
import org.apache.poi.hssf.record.EscherAggregate;
|
import org.apache.poi.hssf.record.EscherAggregate;
|
||||||
import org.apache.poi.util.LittleEndian;
|
|
||||||
import org.apache.poi.util.StringUtil;
|
import org.apache.poi.util.StringUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -34,8 +33,7 @@ import org.apache.poi.util.StringUtil;
|
|||||||
*
|
*
|
||||||
* @author Glen Stampoultzis (glens at apache.org)
|
* @author Glen Stampoultzis (glens at apache.org)
|
||||||
*/
|
*/
|
||||||
public class HSSFPatriarch
|
public final class HSSFPatriarch implements HSSFShapeContainer
|
||||||
implements HSSFShapeContainer
|
|
||||||
{
|
{
|
||||||
List shapes = new ArrayList();
|
List shapes = new ArrayList();
|
||||||
HSSFSheet sheet;
|
HSSFSheet sheet;
|
||||||
@ -58,7 +56,7 @@ public class HSSFPatriarch
|
|||||||
*/
|
*/
|
||||||
HSSFPatriarch(HSSFSheet sheet, EscherAggregate boundAggregate)
|
HSSFPatriarch(HSSFSheet sheet, EscherAggregate boundAggregate)
|
||||||
{
|
{
|
||||||
this.boundAggregate = boundAggregate;
|
this.boundAggregate = boundAggregate;
|
||||||
this.sheet = sheet;
|
this.sheet = sheet;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -197,29 +195,29 @@ public class HSSFPatriarch
|
|||||||
* to work on some charts so far)
|
* to work on some charts so far)
|
||||||
*/
|
*/
|
||||||
public boolean containsChart() {
|
public boolean containsChart() {
|
||||||
// TODO - support charts properly in usermodel
|
// TODO - support charts properly in usermodel
|
||||||
|
|
||||||
// We're looking for a EscherOptRecord
|
// We're looking for a EscherOptRecord
|
||||||
EscherOptRecord optRecord = (EscherOptRecord)
|
EscherOptRecord optRecord = (EscherOptRecord)
|
||||||
boundAggregate.findFirstWithId(EscherOptRecord.RECORD_ID);
|
boundAggregate.findFirstWithId(EscherOptRecord.RECORD_ID);
|
||||||
if(optRecord == null) {
|
if(optRecord == null) {
|
||||||
// No opt record, can't have chart
|
// No opt record, can't have chart
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(Iterator it = optRecord.getEscherProperties().iterator(); it.hasNext();) {
|
for(Iterator it = optRecord.getEscherProperties().iterator(); it.hasNext();) {
|
||||||
EscherProperty prop = (EscherProperty)it.next();
|
EscherProperty prop = (EscherProperty)it.next();
|
||||||
if(prop.getPropertyNumber() == 896 && prop.isComplex()) {
|
if(prop.getPropertyNumber() == 896 && prop.isComplex()) {
|
||||||
EscherComplexProperty cp = (EscherComplexProperty)prop;
|
EscherComplexProperty cp = (EscherComplexProperty)prop;
|
||||||
String str = StringUtil.getFromUnicodeLE(cp.getComplexData());
|
String str = StringUtil.getFromUnicodeLE(cp.getComplexData());
|
||||||
System.err.println(str);
|
//System.err.println(str);
|
||||||
if(str.equals("Chart 1\0")) {
|
if(str.equals("Chart 1\0")) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -258,6 +256,6 @@ public class HSSFPatriarch
|
|||||||
* Returns the aggregate escher record we're bound to
|
* Returns the aggregate escher record we're bound to
|
||||||
*/
|
*/
|
||||||
protected EscherAggregate _getBoundAggregate() {
|
protected EscherAggregate _getBoundAggregate() {
|
||||||
return boundAggregate;
|
return boundAggregate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ import org.apache.poi.hssf.record.ColumnInfoRecord;
|
|||||||
/**
|
/**
|
||||||
* @author Glen Stampoultzis
|
* @author Glen Stampoultzis
|
||||||
*/
|
*/
|
||||||
public class TestColumnInfoRecordsAggregate extends TestCase
|
public final class TestColumnInfoRecordsAggregate extends TestCase
|
||||||
{
|
{
|
||||||
ColumnInfoRecordsAggregate columnInfoRecordsAggregate;
|
ColumnInfoRecordsAggregate columnInfoRecordsAggregate;
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ public class TestColumnInfoRecordsAggregate extends TestCase
|
|||||||
columnInfoRecordsAggregate.insertColumn( createColumn( (short)8, (short)8 ));
|
columnInfoRecordsAggregate.insertColumn( createColumn( (short)8, (short)8 ));
|
||||||
// columnInfoRecordsAggregate.setColumn( (short)2, new Short( (short)200 ), new Integer( 1 ), new Boolean( true ), null);
|
// columnInfoRecordsAggregate.setColumn( (short)2, new Short( (short)200 ), new Integer( 1 ), new Boolean( true ), null);
|
||||||
columnInfoRecordsAggregate.groupColumnRange( (short)2, (short)5, true );
|
columnInfoRecordsAggregate.groupColumnRange( (short)2, (short)5, true );
|
||||||
System.out.println( "columnInfoRecordsAggregate = " + columnInfoRecordsAggregate.getNumColumns() );
|
assertEquals(6, columnInfoRecordsAggregate.getNumColumns());
|
||||||
|
|
||||||
assertEquals(columnInfoRecordsAggregate.getRecordSize(), columnInfoRecordsAggregate.serialize().length);
|
assertEquals(columnInfoRecordsAggregate.getRecordSize(), columnInfoRecordsAggregate.serialize().length);
|
||||||
|
|
||||||
|
@ -357,14 +357,14 @@ extends TestCase {
|
|||||||
book.createSheet("TEST");
|
book.createSheet("TEST");
|
||||||
HSSFSheet sheet = book.cloneSheet(0);
|
HSSFSheet sheet = book.cloneSheet(0);
|
||||||
book.setSheetName(1,"CLONE");
|
book.setSheetName(1,"CLONE");
|
||||||
sheet.createRow(0).createCell((short)0).setCellValue("Test");
|
sheet.createRow(0).createCell((short)0).setCellValue(new HSSFRichTextString("Test"));
|
||||||
book.write(out);
|
book.write(out);
|
||||||
|
|
||||||
book = new HSSFWorkbook(new ByteArrayInputStream(out.toByteArray()));
|
book = new HSSFWorkbook(new ByteArrayInputStream(out.toByteArray()));
|
||||||
sheet = book.getSheet("CLONE");
|
sheet = book.getSheet("CLONE");
|
||||||
HSSFRow row = sheet.getRow(0);
|
HSSFRow row = sheet.getRow(0);
|
||||||
HSSFCell cell = row.getCell((short)0);
|
HSSFCell cell = row.getCell((short)0);
|
||||||
System.out.println(cell.getStringCellValue());
|
assertEquals("Test", cell.getRichStringCellValue().getString());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user