@@ 3260-3282 (lines=23) @@ | ||
3257 | /** |
|
3258 | * Read HEADER record. |
|
3259 | */ |
|
3260 | private function readHeader() |
|
3261 | { |
|
3262 | $length = self::getUInt2d($this->data, $this->pos + 2); |
|
3263 | $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); |
|
3264 | ||
3265 | // move stream pointer to next record |
|
3266 | $this->pos += 4 + $length; |
|
3267 | ||
3268 | if (!$this->readDataOnly) { |
|
3269 | // offset: 0; size: var |
|
3270 | // realized that $recordData can be empty even when record exists |
|
3271 | if ($recordData) { |
|
3272 | if ($this->version == self::XLS_BIFF8) { |
|
3273 | $string = self::readUnicodeStringLong($recordData); |
|
3274 | } else { |
|
3275 | $string = $this->readByteStringShort($recordData); |
|
3276 | } |
|
3277 | ||
3278 | $this->phpSheet->getHeaderFooter()->setOddHeader($string['value']); |
|
3279 | $this->phpSheet->getHeaderFooter()->setEvenHeader($string['value']); |
|
3280 | } |
|
3281 | } |
|
3282 | } |
|
3283 | ||
3284 | /** |
|
3285 | * Read FOOTER record. |
|
@@ 3287-3308 (lines=22) @@ | ||
3284 | /** |
|
3285 | * Read FOOTER record. |
|
3286 | */ |
|
3287 | private function readFooter() |
|
3288 | { |
|
3289 | $length = self::getUInt2d($this->data, $this->pos + 2); |
|
3290 | $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); |
|
3291 | ||
3292 | // move stream pointer to next record |
|
3293 | $this->pos += 4 + $length; |
|
3294 | ||
3295 | if (!$this->readDataOnly) { |
|
3296 | // offset: 0; size: var |
|
3297 | // realized that $recordData can be empty even when record exists |
|
3298 | if ($recordData) { |
|
3299 | if ($this->version == self::XLS_BIFF8) { |
|
3300 | $string = self::readUnicodeStringLong($recordData); |
|
3301 | } else { |
|
3302 | $string = $this->readByteStringShort($recordData); |
|
3303 | } |
|
3304 | $this->phpSheet->getHeaderFooter()->setOddFooter($string['value']); |
|
3305 | $this->phpSheet->getHeaderFooter()->setEvenFooter($string['value']); |
|
3306 | } |
|
3307 | } |
|
3308 | } |
|
3309 | ||
3310 | /** |
|
3311 | * Read HCENTER record. |