@@ 3087-3109 (lines=23) @@ | ||
3084 | /** |
|
3085 | * Read HORIZONTALPAGEBREAKS record |
|
3086 | */ |
|
3087 | private function readHorizontalPageBreaks() |
|
3088 | { |
|
3089 | $length = self::getInt2d($this->data, $this->pos + 2); |
|
3090 | $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); |
|
3091 | ||
3092 | // move stream pointer to next record |
|
3093 | $this->pos += 4 + $length; |
|
3094 | ||
3095 | if ($this->version == self::XLS_BIFF8 && !$this->readDataOnly) { |
|
3096 | // offset: 0; size: 2; number of the following row index structures |
|
3097 | $nm = self::getInt2d($recordData, 0); |
|
3098 | ||
3099 | // offset: 2; size: 6 * $nm; list of $nm row index structures |
|
3100 | for ($i = 0; $i < $nm; ++$i) { |
|
3101 | $r = self::getInt2d($recordData, 2 + 6 * $i); |
|
3102 | $cf = self::getInt2d($recordData, 2 + 6 * $i + 2); |
|
3103 | $cl = self::getInt2d($recordData, 2 + 6 * $i + 4); |
|
3104 | ||
3105 | // not sure why two column indexes are necessary? |
|
3106 | $this->phpSheet->setBreakByColumnAndRow($cf, $r, \PhpSpreadsheet\Worksheet::BREAK_ROW); |
|
3107 | } |
|
3108 | } |
|
3109 | } |
|
3110 | ||
3111 | ||
3112 | /** |
|
@@ 3115-3137 (lines=23) @@ | ||
3112 | /** |
|
3113 | * Read VERTICALPAGEBREAKS record |
|
3114 | */ |
|
3115 | private function readVerticalPageBreaks() |
|
3116 | { |
|
3117 | $length = self::getInt2d($this->data, $this->pos + 2); |
|
3118 | $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); |
|
3119 | ||
3120 | // move stream pointer to next record |
|
3121 | $this->pos += 4 + $length; |
|
3122 | ||
3123 | if ($this->version == self::XLS_BIFF8 && !$this->readDataOnly) { |
|
3124 | // offset: 0; size: 2; number of the following column index structures |
|
3125 | $nm = self::getInt2d($recordData, 0); |
|
3126 | ||
3127 | // offset: 2; size: 6 * $nm; list of $nm row index structures |
|
3128 | for ($i = 0; $i < $nm; ++$i) { |
|
3129 | $c = self::getInt2d($recordData, 2 + 6 * $i); |
|
3130 | $rf = self::getInt2d($recordData, 2 + 6 * $i + 2); |
|
3131 | $rl = self::getInt2d($recordData, 2 + 6 * $i + 4); |
|
3132 | ||
3133 | // not sure why two row indexes are necessary? |
|
3134 | $this->phpSheet->setBreakByColumnAndRow($c, $rf, \PhpSpreadsheet\Worksheet::BREAK_COLUMN); |
|
3135 | } |
|
3136 | } |
|
3137 | } |
|
3138 | ||
3139 | ||
3140 | /** |