]> source.dussan.org Git - poi.git/commitdiff
Applied the pertinent patch for bug #21439 by Paul Pound to get the header/footer...
authorShawn Laubach <slaubach@apache.org>
Thu, 24 Jul 2003 18:42:46 +0000 (18:42 +0000)
committerShawn Laubach <slaubach@apache.org>
Thu, 24 Jul 2003 18:42:46 +0000 (18:42 +0000)
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

src/java/org/apache/poi/hssf/model/Sheet.java

index 6efa15a60bc52b3f7ce577cd3b39da56e33c6e68..9da978aa906e4d6223446f0a218e41b75fdb11aa 100644 (file)
@@ -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;
             }