fixed bug 53432
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1373110 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
98f64db1c7
commit
c3f9a6e682
@ -257,7 +257,9 @@ public abstract class AbstractEscherHolderRecord extends Record {
|
|||||||
*/
|
*/
|
||||||
public void decode()
|
public void decode()
|
||||||
{
|
{
|
||||||
|
if (null == escherRecords || 0 == escherRecords.size()){
|
||||||
byte[] rawData = getRawData();
|
byte[] rawData = getRawData();
|
||||||
convertToEscherRecords(0, rawData.length, rawData );
|
convertToEscherRecords(0, rawData.length, rawData );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -2268,4 +2268,19 @@ if(1==2) {
|
|||||||
HSSFSheet sh2 = wb.cloneSheet(0);
|
HSSFSheet sh2 = wb.cloneSheet(0);
|
||||||
assertNotNull(sh2.getDrawingPatriarch());
|
assertNotNull(sh2.getDrawingPatriarch());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void test53432(){
|
||||||
|
Workbook wb = new HSSFWorkbook(); //or new HSSFWorkbook();
|
||||||
|
wb.addPicture(new byte[]{123,22}, Workbook.PICTURE_TYPE_JPEG);
|
||||||
|
assertEquals(wb.getAllPictures().size(), 1);
|
||||||
|
|
||||||
|
wb = new HSSFWorkbook();
|
||||||
|
wb = writeOutAndReadBack((HSSFWorkbook) wb);
|
||||||
|
assertEquals(wb.getAllPictures().size(), 0);
|
||||||
|
wb.addPicture(new byte[]{123,22}, Workbook.PICTURE_TYPE_JPEG);
|
||||||
|
assertEquals(wb.getAllPictures().size(), 1);
|
||||||
|
|
||||||
|
wb = writeOutAndReadBack((HSSFWorkbook) wb);
|
||||||
|
assertEquals(wb.getAllPictures().size(), 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user