]> 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>
Wed, 9 Jul 2003 20:20:22 +0000 (20:20 +0000)
committerShawn Laubach <slaubach@apache.org>
Wed, 9 Jul 2003 20:20:22 +0000 (20:20 +0000)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353199 13f79535-47bb-0310-9956-ffa450edef68

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

index c481665424cf17b1e025cd6b6a93b47a72ff26f8..b99989cc90282a3889c55da9312f7e2911bef9c4 100644 (file)
@@ -249,15 +249,15 @@ 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;
             }
-            else if ( rec.getSid() == PrintSetupRecord.sid )
+            else if ( rec.getSid() == PrintSetupRecord.sid && bofEofNestingLevel == 1)
             {
                 retval.printSetup = (PrintSetupRecord) rec;
             }