BUG 37056 & BUG 37058 fixed
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@368554 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8e822e3baf
commit
7758ae37db
@ -228,6 +228,10 @@ public class Sheet implements Model
|
|||||||
{
|
{
|
||||||
retval.printGridlines = (PrintGridlinesRecord) rec;
|
retval.printGridlines = (PrintGridlinesRecord) rec;
|
||||||
}
|
}
|
||||||
|
else if ( rec.getSid() == GridsetRecord.sid )
|
||||||
|
{
|
||||||
|
retval.gridset = (GridsetRecord) rec;
|
||||||
|
}
|
||||||
else if ( rec.getSid() == HeaderRecord.sid && bofEofNestingLevel == 1)
|
else if ( rec.getSid() == HeaderRecord.sid && bofEofNestingLevel == 1)
|
||||||
{
|
{
|
||||||
retval.header = (HeaderRecord) rec;
|
retval.header = (HeaderRecord) rec;
|
||||||
@ -1709,6 +1713,12 @@ public class Sheet implements Model
|
|||||||
|
|
||||||
public boolean isGridsPrinted()
|
public boolean isGridsPrinted()
|
||||||
{
|
{
|
||||||
|
if (gridset == null) {
|
||||||
|
gridset = (GridsetRecord)createGridset();
|
||||||
|
//Insert the newlycreated Gridset record at the end of the record (just before the EOF)
|
||||||
|
int loc = findFirstRecordLocBySid(EOFRecord.sid);
|
||||||
|
records.add(loc, gridset);
|
||||||
|
}
|
||||||
return !gridset.getGridset();
|
return !gridset.getGridset();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2416,8 +2426,18 @@ public class Sheet implements Model
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Returns the ProtectRecord.
|
||||||
|
* If one is not contained in the sheet, then one is created.
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public ProtectRecord getProtect()
|
public ProtectRecord getProtect()
|
||||||
{
|
{
|
||||||
|
if (protect == null) {
|
||||||
|
protect = (ProtectRecord)createProtect();
|
||||||
|
//Insert the newlycreated protect record at the end of the record (just before the EOF)
|
||||||
|
int loc = findFirstRecordLocBySid(EOFRecord.sid);
|
||||||
|
records.add(loc, protect);
|
||||||
|
}
|
||||||
return protect;
|
return protect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -672,7 +672,6 @@ public class UnicodeString
|
|||||||
}
|
}
|
||||||
|
|
||||||
return pos - offset;
|
return pos - offset;
|
||||||
//jmh return getRecordSize();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user