From: Shawn Laubach Date: Thu, 24 Jul 2003 18:42:46 +0000 (+0000) Subject: Applied the pertinent patch for bug #21439 by Paul Pound to get the header/footer... X-Git-Tag: REL_2_5_1~107 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0a5eee5799a8af3363894e981d4059db483543be;p=poi.git Applied the pertinent patch for bug #21439 by Paul Pound to get the header/footer from the sheet and not a chart. PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/branches/REL_2_BRANCH@353240 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/poi/hssf/model/Sheet.java b/src/java/org/apache/poi/hssf/model/Sheet.java index 6efa15a60b..9da978aa90 100644 --- a/src/java/org/apache/poi/hssf/model/Sheet.java +++ b/src/java/org/apache/poi/hssf/model/Sheet.java @@ -249,11 +249,11 @@ public class Sheet implements Model { retval.printGridlines = (PrintGridlinesRecord) rec; } - else if ( rec.getSid() == HeaderRecord.sid ) + else if ( rec.getSid() == HeaderRecord.sid && bofEofNestingLevel == 1) { retval.header = (HeaderRecord) rec; } - else if ( rec.getSid() == FooterRecord.sid ) + else if ( rec.getSid() == FooterRecord.sid && bofEofNestingLevel == 1) { retval.footer = (FooterRecord) rec; }