Added clone support for UserSView* and Feat* families of records, see bug #49649
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@980102 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f03598469a
commit
507d4dd3a5
@ -34,6 +34,7 @@
|
||||
|
||||
<changes>
|
||||
<release version="3.7-beta2" date="2010-??-??">
|
||||
<action dev="POI-DEVELOPERS" type="fix">49649 - Added clone support for UserSView* and Feat* families of records</action>
|
||||
<action dev="POI-DEVELOPERS" type="fix">49653 - Support for escaped unicode characters in Shared String Table</action>
|
||||
<action dev="POI-DEVELOPERS" type="fix">49579 - prevent ArrayIndexOutOfBoundException in UnknowEscherRecord</action>
|
||||
<action dev="POI-DEVELOPERS" type="fix">49593 - preserve leading and trailing white spaces in XWPFRun</action>
|
||||
|
@ -105,4 +105,11 @@ public final class FeatHdrRecord extends StandardRecord {
|
||||
protected int getDataSize() {
|
||||
return 12 + 2+1+4+rgbHdrData.length;
|
||||
}
|
||||
|
||||
//HACK: do a "cheat" clone, see Record.java for more information
|
||||
public Object clone() {
|
||||
return cloneViaReserialise();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -167,4 +167,12 @@ public final class FeatRecord extends StandardRecord {
|
||||
cbFeatData = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//HACK: do a "cheat" clone, see Record.java for more information
|
||||
public Object clone() {
|
||||
return cloneViaReserialise();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -94,5 +94,11 @@ public final class HeaderFooterRecord extends StandardRecord {
|
||||
sb.append("[/").append("HEADERFOOTER").append("]\n");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
//HACK: do a "cheat" clone, see Record.java for more information
|
||||
public Object clone() {
|
||||
return cloneViaReserialise();
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -83,5 +83,10 @@ public final class UserSViewBegin extends StandardRecord {
|
||||
sb.append("[/").append("USERSVIEWBEGIN").append("]\n");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
||||
//HACK: do a "cheat" clone, see Record.java for more information
|
||||
public Object clone() {
|
||||
return cloneViaReserialise();
|
||||
}
|
||||
|
||||
}
|
@ -72,4 +72,10 @@ public final class UserSViewEnd extends StandardRecord {
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
//HACK: do a "cheat" clone, see Record.java for more information
|
||||
public Object clone() {
|
||||
return cloneViaReserialise();
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -170,4 +170,13 @@ public final class TestFeatRecord extends TestCase {
|
||||
assertFalse(fferr2.getCheckUnprotectedFormulas());
|
||||
assertFalse(fferr2.getPerformDataValidation());
|
||||
}
|
||||
|
||||
/**
|
||||
* cloning sheets with feat records
|
||||
*/
|
||||
public void testCloneSheetWithFeatRecord() throws Exception {
|
||||
HSSFWorkbook wb =
|
||||
HSSFTestDataSamples.openSampleWorkbook("46136-WithWarnings.xls");
|
||||
wb.cloneSheet(0);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user