@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | */ |
42 | 42 | public function __construct() |
43 | 43 | { |
44 | - $this->readFilter = new DefaultReadFilter(); |
|
44 | + $this->readFilter = new DefaultReadFilter(); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | |
126 | 126 | $xml = new XMLReader(); |
127 | 127 | $res = $xml->xml( |
128 | - $this->securityScanFile('zip://'.realpath($pFilename).'#content.xml'), |
|
128 | + $this->securityScanFile('zip://' . realpath($pFilename) . '#content.xml'), |
|
129 | 129 | null, |
130 | 130 | \PHPExcel\Settings::getLibXmlLoaderOptions() |
131 | 131 | ); |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | |
182 | 182 | $xml = new XMLReader(); |
183 | 183 | $res = $xml->xml( |
184 | - $this->securityScanFile('zip://'.realpath($pFilename).'#content.xml'), |
|
184 | + $this->securityScanFile('zip://' . realpath($pFilename) . '#content.xml'), |
|
185 | 185 | null, |
186 | 186 | \PHPExcel\Settings::getLibXmlLoaderOptions() |
187 | 187 | ); |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | foreach ($annotationText as $t) { |
519 | 519 | if (isset($t->span)) { |
520 | 520 | foreach ($t->span as $text) { |
521 | - $textArray[] = (string)$text; |
|
521 | + $textArray[] = (string) $text; |
|
522 | 522 | } |
523 | 523 | } else { |
524 | 524 | $textArray[] = (string) $t; |
@@ -526,7 +526,7 @@ discard block |
||
526 | 526 | } |
527 | 527 | $text = implode("\n", $textArray); |
528 | 528 | // echo $text, '<br />'; |
529 | - $objPHPExcel->getActiveSheet()->getComment($columnID.$rowID)->setText($this->parseRichText($text)); |
|
529 | + $objPHPExcel->getActiveSheet()->getComment($columnID . $rowID)->setText($this->parseRichText($text)); |
|
530 | 530 | // ->setAuthor( $author ) |
531 | 531 | } |
532 | 532 | |
@@ -600,14 +600,14 @@ discard block |
||
600 | 600 | list($year, $month, $day, $hour, $minute, $second) = explode(' ', $dateObj->format('Y m d H i s')); |
601 | 601 | $dataValue = \PHPExcel\Shared\Date::formattedPHPToExcel($year, $month, $day, $hour, $minute, $second); |
602 | 602 | if ($dataValue != floor($dataValue)) { |
603 | - $formatting = \PHPExcel\Style\NumberFormat::FORMAT_DATE_XLSX15.' '.\PHPExcel\Style\NumberFormat::FORMAT_DATE_TIME4; |
|
603 | + $formatting = \PHPExcel\Style\NumberFormat::FORMAT_DATE_XLSX15 . ' ' . \PHPExcel\Style\NumberFormat::FORMAT_DATE_TIME4; |
|
604 | 604 | } else { |
605 | 605 | $formatting = \PHPExcel\Style\NumberFormat::FORMAT_DATE_XLSX15; |
606 | 606 | } |
607 | 607 | break; |
608 | 608 | case 'time': |
609 | 609 | $type = \PHPExcel\Cell\DataType::TYPE_NUMERIC; |
610 | - $dataValue = \PHPExcel\Shared\Date::PHPToExcel(strtotime('01-01-1970 '.implode(':', sscanf($cellDataOfficeAttributes['time-value'], 'PT%dH%dM%dS')))); |
|
610 | + $dataValue = \PHPExcel\Shared\Date::PHPToExcel(strtotime('01-01-1970 ' . implode(':', sscanf($cellDataOfficeAttributes['time-value'], 'PT%dH%dM%dS')))); |
|
611 | 611 | $formatting = \PHPExcel\Style\NumberFormat::FORMAT_DATE_TIME4; |
612 | 612 | break; |
613 | 613 | } |
@@ -623,16 +623,16 @@ discard block |
||
623 | 623 | if ($hasCalculatedValue) { |
624 | 624 | $type = \PHPExcel\Cell\DataType::TYPE_FORMULA; |
625 | 625 | // echo 'Formula: ', $cellDataFormula, PHP_EOL; |
626 | - $cellDataFormula = substr($cellDataFormula, strpos($cellDataFormula, ':=')+1); |
|
626 | + $cellDataFormula = substr($cellDataFormula, strpos($cellDataFormula, ':=') + 1); |
|
627 | 627 | $temp = explode('"', $cellDataFormula); |
628 | 628 | $tKey = false; |
629 | 629 | foreach ($temp as &$value) { |
630 | 630 | // Only replace in alternate array entries (i.e. non-quoted blocks) |
631 | 631 | if ($tKey = !$tKey) { |
632 | - $value = preg_replace('/\[([^\.]+)\.([^\.]+):\.([^\.]+)\]/Ui', '$1!$2:$3', $value); // Cell range reference in another sheet |
|
633 | - $value = preg_replace('/\[([^\.]+)\.([^\.]+)\]/Ui', '$1!$2', $value); // Cell reference in another sheet |
|
634 | - $value = preg_replace('/\[\.([^\.]+):\.([^\.]+)\]/Ui', '$1:$2', $value); // Cell range reference |
|
635 | - $value = preg_replace('/\[\.([^\.]+)\]/Ui', '$1', $value); // Simple cell reference |
|
632 | + $value = preg_replace('/\[([^\.]+)\.([^\.]+):\.([^\.]+)\]/Ui', '$1!$2:$3', $value); // Cell range reference in another sheet |
|
633 | + $value = preg_replace('/\[([^\.]+)\.([^\.]+)\]/Ui', '$1!$2', $value); // Cell reference in another sheet |
|
634 | + $value = preg_replace('/\[\.([^\.]+):\.([^\.]+)\]/Ui', '$1:$2', $value); // Cell range reference |
|
635 | + $value = preg_replace('/\[\.([^\.]+)\]/Ui', '$1', $value); // Simple cell reference |
|
636 | 636 | $value = \PHPExcel\Calculation::translateSeparator(';', ',', $value, $inBraces); |
637 | 637 | } |
638 | 638 | } |
@@ -651,18 +651,18 @@ discard block |
||
651 | 651 | if ($type !== \PHPExcel\Cell\DataType::TYPE_NULL) { |
652 | 652 | for ($rowAdjust = 0; $rowAdjust < $rowRepeats; ++$rowAdjust) { |
653 | 653 | $rID = $rowID + $rowAdjust; |
654 | - $objPHPExcel->getActiveSheet()->getCell($columnID.$rID)->setValueExplicit((($hasCalculatedValue) ? $cellDataFormula : $dataValue), $type); |
|
654 | + $objPHPExcel->getActiveSheet()->getCell($columnID . $rID)->setValueExplicit((($hasCalculatedValue) ? $cellDataFormula : $dataValue), $type); |
|
655 | 655 | if ($hasCalculatedValue) { |
656 | 656 | // echo 'Forumla result is '.$dataValue.'<br />'; |
657 | - $objPHPExcel->getActiveSheet()->getCell($columnID.$rID)->setCalculatedValue($dataValue); |
|
657 | + $objPHPExcel->getActiveSheet()->getCell($columnID . $rID)->setCalculatedValue($dataValue); |
|
658 | 658 | } |
659 | 659 | if ($formatting !== null) { |
660 | - $objPHPExcel->getActiveSheet()->getStyle($columnID.$rID)->getNumberFormat()->setFormatCode($formatting); |
|
660 | + $objPHPExcel->getActiveSheet()->getStyle($columnID . $rID)->getNumberFormat()->setFormatCode($formatting); |
|
661 | 661 | } else { |
662 | - $objPHPExcel->getActiveSheet()->getStyle($columnID.$rID)->getNumberFormat()->setFormatCode(\PHPExcel\Style\NumberFormat::FORMAT_GENERAL); |
|
662 | + $objPHPExcel->getActiveSheet()->getStyle($columnID . $rID)->getNumberFormat()->setFormatCode(\PHPExcel\Style\NumberFormat::FORMAT_GENERAL); |
|
663 | 663 | } |
664 | 664 | if ($hyperlink !== null) { |
665 | - $objPHPExcel->getActiveSheet()->getCell($columnID.$rID)->getHyperlink()->setUrl($hyperlink); |
|
665 | + $objPHPExcel->getActiveSheet()->getCell($columnID . $rID)->getHyperlink()->setUrl($hyperlink); |
|
666 | 666 | } |
667 | 667 | } |
668 | 668 | } |
@@ -674,13 +674,13 @@ discard block |
||
674 | 674 | if (($type !== \PHPExcel\Cell\DataType::TYPE_NULL) || (!$this->readDataOnly)) { |
675 | 675 | $columnTo = $columnID; |
676 | 676 | if (isset($cellDataTableAttributes['number-columns-spanned'])) { |
677 | - $columnTo = \PHPExcel\Cell::stringFromColumnIndex(\PHPExcel\Cell::columnIndexFromString($columnID) + $cellDataTableAttributes['number-columns-spanned'] -2); |
|
677 | + $columnTo = \PHPExcel\Cell::stringFromColumnIndex(\PHPExcel\Cell::columnIndexFromString($columnID) + $cellDataTableAttributes['number-columns-spanned'] - 2); |
|
678 | 678 | } |
679 | 679 | $rowTo = $rowID; |
680 | 680 | if (isset($cellDataTableAttributes['number-rows-spanned'])) { |
681 | 681 | $rowTo = $rowTo + $cellDataTableAttributes['number-rows-spanned'] - 1; |
682 | 682 | } |
683 | - $cellRange = $columnID.$rowID.':'.$columnTo.$rowTo; |
|
683 | + $cellRange = $columnID . $rowID . ':' . $columnTo . $rowTo; |
|
684 | 684 | $objPHPExcel->getActiveSheet()->mergeCells($cellRange); |
685 | 685 | } |
686 | 686 | } |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | * @var integer |
87 | 87 | * @see addContinue() |
88 | 88 | */ |
89 | - private $limit = 8224; |
|
89 | + private $limit = 8224; |
|
90 | 90 | |
91 | 91 | /** |
92 | 92 | * Constructor |
@@ -111,9 +111,9 @@ discard block |
||
111 | 111 | $teststr = pack("d", 1.2345); |
112 | 112 | $number = pack("C8", 0x8D, 0x97, 0x6E, 0x12, 0x83, 0xC0, 0xF3, 0x3F); |
113 | 113 | if ($number == $teststr) { |
114 | - $byte_order = 0; // Little Endian |
|
114 | + $byte_order = 0; // Little Endian |
|
115 | 115 | } elseif ($number == strrev($teststr)) { |
116 | - $byte_order = 1; // Big Endian |
|
116 | + $byte_order = 1; // Big Endian |
|
117 | 117 | } else { |
118 | 118 | // Give up. I'll fix this in a later version. |
119 | 119 | throw new \PHPExcel\Writer\Exception("Required floating point format not supported on this platform."); |
@@ -165,16 +165,16 @@ discard block |
||
165 | 165 | */ |
166 | 166 | protected function storeBof($type) |
167 | 167 | { |
168 | - $record = 0x0809; // Record identifier (BIFF5-BIFF8) |
|
168 | + $record = 0x0809; // Record identifier (BIFF5-BIFF8) |
|
169 | 169 | $length = 0x0010; |
170 | 170 | |
171 | 171 | // by inspection of real files, MS Office Excel 2007 writes the following |
172 | 172 | $unknown = pack("VV", 0x000100D1, 0x00000406); |
173 | 173 | |
174 | - $build = 0x0DBB; // Excel 97 |
|
175 | - $year = 0x07CC; // Excel 97 |
|
174 | + $build = 0x0DBB; // Excel 97 |
|
175 | + $year = 0x07CC; // Excel 97 |
|
176 | 176 | |
177 | - $version = 0x0600; // BIFF8 |
|
177 | + $version = 0x0600; // BIFF8 |
|
178 | 178 | |
179 | 179 | $header = pack("vv", $record, $length); |
180 | 180 | $data = pack("vvvv", $version, $type, $build, $year); |
@@ -188,8 +188,8 @@ discard block |
||
188 | 188 | */ |
189 | 189 | protected function storeEof() |
190 | 190 | { |
191 | - $record = 0x000A; // Record identifier |
|
192 | - $length = 0x0000; // Number of bytes to follow |
|
191 | + $record = 0x000A; // Record identifier |
|
192 | + $length = 0x0000; // Number of bytes to follow |
|
193 | 193 | |
194 | 194 | $header = pack("vv", $record, $length); |
195 | 195 | $this->append($header); |
@@ -202,8 +202,8 @@ discard block |
||
202 | 202 | */ |
203 | 203 | public function writeEof() |
204 | 204 | { |
205 | - $record = 0x000A; // Record identifier |
|
206 | - $length = 0x0000; // Number of bytes to follow |
|
205 | + $record = 0x000A; // Record identifier |
|
206 | + $length = 0x0000; // Number of bytes to follow |
|
207 | 207 | $header = pack("vv", $record, $length); |
208 | 208 | return $this->writeData($header); |
209 | 209 | } |
@@ -223,13 +223,13 @@ discard block |
||
223 | 223 | private function addContinue($data) |
224 | 224 | { |
225 | 225 | $limit = $this->limit; |
226 | - $record = 0x003C; // Record identifier |
|
226 | + $record = 0x003C; // Record identifier |
|
227 | 227 | |
228 | 228 | // The first 2080/8224 bytes remain intact. However, we have to change |
229 | 229 | // the length field of the record. |
230 | 230 | $tmp = substr($data, 0, 2) . pack("v", $limit) . substr($data, 4, $limit); |
231 | 231 | |
232 | - $header = pack("vv", $record, $limit); // Headers for continue records |
|
232 | + $header = pack("vv", $record, $limit); // Headers for continue records |
|
233 | 233 | |
234 | 234 | // Retrieve chunks of 2080/8224 bytes +4 for the header. |
235 | 235 | $data_length = strlen($data); |
@@ -114,9 +114,9 @@ |
||
114 | 114 | private $topBorderColor; |
115 | 115 | |
116 | 116 | /** |
117 | - * Color of the left border of the cell. |
|
118 | - * @var integer |
|
119 | - */ |
|
117 | + * Color of the left border of the cell. |
|
118 | + * @var integer |
|
119 | + */ |
|
120 | 120 | private $leftBorderColor; |
121 | 121 | |
122 | 122 | /** |
@@ -133,23 +133,23 @@ discard block |
||
133 | 133 | */ |
134 | 134 | public function __construct(\PHPExcel\Style $style = null) |
135 | 135 | { |
136 | - $this->isStyleXf = false; |
|
136 | + $this->isStyleXf = false; |
|
137 | 137 | $this->fontIndex = 0; |
138 | 138 | |
139 | - $this->numberFormatIndex = 0; |
|
139 | + $this->numberFormatIndex = 0; |
|
140 | 140 | |
141 | - $this->textJustLast = 0; |
|
141 | + $this->textJustLast = 0; |
|
142 | 142 | |
143 | 143 | $this->foregroundColor = 0x40; |
144 | 144 | $this->backgroundColor = 0x41; |
145 | 145 | |
146 | - $this->_diag = 0; |
|
146 | + $this->_diag = 0; |
|
147 | 147 | |
148 | 148 | $this->bottomBorderColor = 0x40; |
149 | 149 | $this->topBorderColor = 0x40; |
150 | 150 | $this->leftBorderColor = 0x40; |
151 | 151 | $this->rightBorderColor = 0x40; |
152 | - $this->_diag_color = 0x40; |
|
152 | + $this->_diag_color = 0x40; |
|
153 | 153 | $this->_style = $style; |
154 | 154 | |
155 | 155 | } |
@@ -171,16 +171,16 @@ discard block |
||
171 | 171 | } |
172 | 172 | |
173 | 173 | // Flags to indicate if attributes have been set. |
174 | - $atr_num = ($this->numberFormatIndex != 0)?1:0; |
|
175 | - $atr_fnt = ($this->fontIndex != 0)?1:0; |
|
174 | + $atr_num = ($this->numberFormatIndex != 0) ? 1 : 0; |
|
175 | + $atr_fnt = ($this->fontIndex != 0) ? 1 : 0; |
|
176 | 176 | $atr_alc = ((int) $this->_style->getAlignment()->getWrapText()) ? 1 : 0; |
177 | - $atr_bdr = (self::mapBorderStyle($this->_style->getBorders()->getBottom()->getBorderStyle()) || |
|
178 | - self::mapBorderStyle($this->_style->getBorders()->getTop()->getBorderStyle()) || |
|
179 | - self::mapBorderStyle($this->_style->getBorders()->getLeft()->getBorderStyle()) || |
|
180 | - self::mapBorderStyle($this->_style->getBorders()->getRight()->getBorderStyle()))?1:0; |
|
177 | + $atr_bdr = (self::mapBorderStyle($this->_style->getBorders()->getBottom()->getBorderStyle()) || |
|
178 | + self::mapBorderStyle($this->_style->getBorders()->getTop()->getBorderStyle()) || |
|
179 | + self::mapBorderStyle($this->_style->getBorders()->getLeft()->getBorderStyle()) || |
|
180 | + self::mapBorderStyle($this->_style->getBorders()->getRight()->getBorderStyle())) ? 1 : 0; |
|
181 | 181 | $atr_pat = (($this->foregroundColor != 0x40) || |
182 | 182 | ($this->backgroundColor != 0x41) || |
183 | - self::mapFillType($this->_style->getFill()->getFillType()))?1:0; |
|
183 | + self::mapFillType($this->_style->getFill()->getFillType())) ? 1 : 0; |
|
184 | 184 | $atr_prot = self::mapLocked($this->_style->getProtection()->getLocked()) |
185 | 185 | | self::mapHidden($this->_style->getProtection()->getHidden()); |
186 | 186 | |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | if (self::mapBorderStyle($this->_style->getBorders()->getBottom()->getBorderStyle()) == 0) { |
189 | 189 | $this->bottomBorderColor = 0; |
190 | 190 | } |
191 | - if (self::mapBorderStyle($this->_style->getBorders()->getTop()->getBorderStyle()) == 0) { |
|
191 | + if (self::mapBorderStyle($this->_style->getBorders()->getTop()->getBorderStyle()) == 0) { |
|
192 | 192 | $this->topBorderColor = 0; |
193 | 193 | } |
194 | 194 | if (self::mapBorderStyle($this->_style->getBorders()->getRight()->getBorderStyle()) == 0) { |
@@ -201,47 +201,47 @@ discard block |
||
201 | 201 | $this->_diag_color = 0; |
202 | 202 | } |
203 | 203 | |
204 | - $record = 0x00E0; // Record identifier |
|
205 | - $length = 0x0014; // Number of bytes to follow |
|
204 | + $record = 0x00E0; // Record identifier |
|
205 | + $length = 0x0014; // Number of bytes to follow |
|
206 | 206 | |
207 | - $ifnt = $this->fontIndex; // Index to FONT record |
|
208 | - $ifmt = $this->numberFormatIndex; // Index to FORMAT record |
|
207 | + $ifnt = $this->fontIndex; // Index to FONT record |
|
208 | + $ifmt = $this->numberFormatIndex; // Index to FORMAT record |
|
209 | 209 | |
210 | - $align = $this->mapHAlign($this->_style->getAlignment()->getHorizontal()); // Alignment |
|
211 | - $align |= (int) $this->_style->getAlignment()->getWrapText() << 3; |
|
212 | - $align |= self::mapVAlign($this->_style->getAlignment()->getVertical()) << 4; |
|
210 | + $align = $this->mapHAlign($this->_style->getAlignment()->getHorizontal()); // Alignment |
|
211 | + $align |= (int) $this->_style->getAlignment()->getWrapText() << 3; |
|
212 | + $align |= self::mapVAlign($this->_style->getAlignment()->getVertical()) << 4; |
|
213 | 213 | $align |= $this->textJustLast << 7; |
214 | 214 | |
215 | - $used_attrib = $atr_num << 2; |
|
216 | - $used_attrib |= $atr_fnt << 3; |
|
217 | - $used_attrib |= $atr_alc << 4; |
|
218 | - $used_attrib |= $atr_bdr << 5; |
|
219 | - $used_attrib |= $atr_pat << 6; |
|
215 | + $used_attrib = $atr_num << 2; |
|
216 | + $used_attrib |= $atr_fnt << 3; |
|
217 | + $used_attrib |= $atr_alc << 4; |
|
218 | + $used_attrib |= $atr_bdr << 5; |
|
219 | + $used_attrib |= $atr_pat << 6; |
|
220 | 220 | $used_attrib |= $atr_prot << 7; |
221 | 221 | |
222 | - $icv = $this->foregroundColor; // fg and bg pattern colors |
|
223 | - $icv |= $this->backgroundColor << 7; |
|
222 | + $icv = $this->foregroundColor; // fg and bg pattern colors |
|
223 | + $icv |= $this->backgroundColor << 7; |
|
224 | 224 | |
225 | - $border1 = self::mapBorderStyle($this->_style->getBorders()->getLeft()->getBorderStyle()); // Border line style and color |
|
226 | - $border1 |= self::mapBorderStyle($this->_style->getBorders()->getRight()->getBorderStyle()) << 4; |
|
227 | - $border1 |= self::mapBorderStyle($this->_style->getBorders()->getTop()->getBorderStyle()) << 8; |
|
228 | - $border1 |= self::mapBorderStyle($this->_style->getBorders()->getBottom()->getBorderStyle()) << 12; |
|
229 | - $border1 |= $this->leftBorderColor << 16; |
|
230 | - $border1 |= $this->rightBorderColor << 23; |
|
225 | + $border1 = self::mapBorderStyle($this->_style->getBorders()->getLeft()->getBorderStyle()); // Border line style and color |
|
226 | + $border1 |= self::mapBorderStyle($this->_style->getBorders()->getRight()->getBorderStyle()) << 4; |
|
227 | + $border1 |= self::mapBorderStyle($this->_style->getBorders()->getTop()->getBorderStyle()) << 8; |
|
228 | + $border1 |= self::mapBorderStyle($this->_style->getBorders()->getBottom()->getBorderStyle()) << 12; |
|
229 | + $border1 |= $this->leftBorderColor << 16; |
|
230 | + $border1 |= $this->rightBorderColor << 23; |
|
231 | 231 | |
232 | 232 | $diagonalDirection = $this->_style->getBorders()->getDiagonalDirection(); |
233 | 233 | $diag_tl_to_rb = $diagonalDirection == \PHPExcel\Style\Borders::DIAGONAL_BOTH |
234 | 234 | || $diagonalDirection == \PHPExcel\Style\Borders::DIAGONAL_DOWN; |
235 | 235 | $diag_tr_to_lb = $diagonalDirection == \PHPExcel\Style\Borders::DIAGONAL_BOTH |
236 | 236 | || $diagonalDirection == \PHPExcel\Style\Borders::DIAGONAL_UP; |
237 | - $border1 |= $diag_tl_to_rb << 30; |
|
238 | - $border1 |= $diag_tr_to_lb << 31; |
|
237 | + $border1 |= $diag_tl_to_rb << 30; |
|
238 | + $border1 |= $diag_tr_to_lb << 31; |
|
239 | 239 | |
240 | - $border2 = $this->topBorderColor; // Border color |
|
241 | - $border2 |= $this->bottomBorderColor << 7; |
|
242 | - $border2 |= $this->_diag_color << 14; |
|
243 | - $border2 |= self::mapBorderStyle($this->_style->getBorders()->getDiagonal()->getBorderStyle()) << 21; |
|
244 | - $border2 |= self::mapFillType($this->_style->getFill()->getFillType()) << 26; |
|
240 | + $border2 = $this->topBorderColor; // Border color |
|
241 | + $border2 |= $this->bottomBorderColor << 7; |
|
242 | + $border2 |= $this->_diag_color << 14; |
|
243 | + $border2 |= self::mapBorderStyle($this->_style->getBorders()->getDiagonal()->getBorderStyle()) << 21; |
|
244 | + $border2 |= self::mapFillType($this->_style->getFill()->getFillType()) << 26; |
|
245 | 245 | |
246 | 246 | $header = pack("vv", $record, $length); |
247 | 247 | |
@@ -427,8 +427,8 @@ discard block |
||
427 | 427 | \PHPExcel\Style\Fill::FILL_PATTERN_LIGHTTRELLIS => 0x10, |
428 | 428 | \PHPExcel\Style\Fill::FILL_PATTERN_GRAY125 => 0x11, |
429 | 429 | \PHPExcel\Style\Fill::FILL_PATTERN_GRAY0625 => 0x12, |
430 | - \PHPExcel\Style\Fill::FILL_GRADIENT_LINEAR => 0x00, // does not exist in BIFF8 |
|
431 | - \PHPExcel\Style\Fill::FILL_GRADIENT_PATH => 0x00, // does not exist in BIFF8 |
|
430 | + \PHPExcel\Style\Fill::FILL_GRADIENT_LINEAR => 0x00, // does not exist in BIFF8 |
|
431 | + \PHPExcel\Style\Fill::FILL_GRADIENT_PATH => 0x00, // does not exist in BIFF8 |
|
432 | 432 | ); |
433 | 433 | |
434 | 434 | /** |
@@ -85,9 +85,9 @@ discard block |
||
85 | 85 | $bFamily = 0; // Font family |
86 | 86 | $bCharSet = \PHPExcel\Shared\Font::getCharsetFromFontName($this->font->getName()); // Character set |
87 | 87 | |
88 | - $record = 0x31; // Record identifier |
|
89 | - $reserved = 0x00; // Reserved |
|
90 | - $grbit = 0x00; // Font attributes |
|
88 | + $record = 0x31; // Record identifier |
|
89 | + $reserved = 0x00; // Reserved |
|
90 | + $grbit = 0x00; // Font attributes |
|
91 | 91 | if ($this->font->getItalic()) { |
92 | 92 | $grbit |= 0x02; |
93 | 93 | } |
@@ -134,9 +134,9 @@ discard block |
||
134 | 134 | private static function mapBold($bold) |
135 | 135 | { |
136 | 136 | if ($bold) { |
137 | - return 0x2BC; // 700 = Bold font weight |
|
137 | + return 0x2BC; // 700 = Bold font weight |
|
138 | 138 | } |
139 | - return 0x190; // 400 = Normal font weight |
|
139 | + return 0x190; // 400 = Normal font weight |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | /** |
@@ -567,49 +567,49 @@ discard block |
||
567 | 567 | |
568 | 568 | // GKPIDDSI_CODEPAGE: CodePage |
569 | 569 | $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x01), |
570 | - 'offset' => array('pack' => 'V'), |
|
571 | - 'type' => array('pack' => 'V', 'data' => 0x02), // 2 byte signed integer |
|
572 | - 'data' => array('data' => 1252)); |
|
570 | + 'offset' => array('pack' => 'V'), |
|
571 | + 'type' => array('pack' => 'V', 'data' => 0x02), // 2 byte signed integer |
|
572 | + 'data' => array('data' => 1252)); |
|
573 | 573 | $dataSection_NumProps++; |
574 | 574 | |
575 | 575 | // GKPIDDSI_CATEGORY : Category |
576 | 576 | if ($this->phpExcel->getProperties()->getCategory()) { |
577 | 577 | $dataProp = $this->phpExcel->getProperties()->getCategory(); |
578 | 578 | $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x02), |
579 | - 'offset' => array('pack' => 'V'), |
|
580 | - 'type' => array('pack' => 'V', 'data' => 0x1E), |
|
581 | - 'data' => array('data' => $dataProp, 'length' => strlen($dataProp))); |
|
579 | + 'offset' => array('pack' => 'V'), |
|
580 | + 'type' => array('pack' => 'V', 'data' => 0x1E), |
|
581 | + 'data' => array('data' => $dataProp, 'length' => strlen($dataProp))); |
|
582 | 582 | $dataSection_NumProps++; |
583 | 583 | } |
584 | 584 | // GKPIDDSI_VERSION :Version of the application that wrote the property storage |
585 | 585 | $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x17), |
586 | - 'offset' => array('pack' => 'V'), |
|
587 | - 'type' => array('pack' => 'V', 'data' => 0x03), |
|
588 | - 'data' => array('pack' => 'V', 'data' => 0x000C0000)); |
|
586 | + 'offset' => array('pack' => 'V'), |
|
587 | + 'type' => array('pack' => 'V', 'data' => 0x03), |
|
588 | + 'data' => array('pack' => 'V', 'data' => 0x000C0000)); |
|
589 | 589 | $dataSection_NumProps++; |
590 | 590 | // GKPIDDSI_SCALE : FALSE |
591 | 591 | $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x0B), |
592 | - 'offset' => array('pack' => 'V'), |
|
593 | - 'type' => array('pack' => 'V', 'data' => 0x0B), |
|
594 | - 'data' => array('data' => false)); |
|
592 | + 'offset' => array('pack' => 'V'), |
|
593 | + 'type' => array('pack' => 'V', 'data' => 0x0B), |
|
594 | + 'data' => array('data' => false)); |
|
595 | 595 | $dataSection_NumProps++; |
596 | 596 | // GKPIDDSI_LINKSDIRTY : True if any of the values for the linked properties have changed outside of the application |
597 | 597 | $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x10), |
598 | - 'offset' => array('pack' => 'V'), |
|
599 | - 'type' => array('pack' => 'V', 'data' => 0x0B), |
|
600 | - 'data' => array('data' => false)); |
|
598 | + 'offset' => array('pack' => 'V'), |
|
599 | + 'type' => array('pack' => 'V', 'data' => 0x0B), |
|
600 | + 'data' => array('data' => false)); |
|
601 | 601 | $dataSection_NumProps++; |
602 | 602 | // GKPIDDSI_SHAREDOC : FALSE |
603 | 603 | $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x13), |
604 | - 'offset' => array('pack' => 'V'), |
|
605 | - 'type' => array('pack' => 'V', 'data' => 0x0B), |
|
606 | - 'data' => array('data' => false)); |
|
604 | + 'offset' => array('pack' => 'V'), |
|
605 | + 'type' => array('pack' => 'V', 'data' => 0x0B), |
|
606 | + 'data' => array('data' => false)); |
|
607 | 607 | $dataSection_NumProps++; |
608 | 608 | // GKPIDDSI_HYPERLINKSCHANGED : True if any of the values for the _PID_LINKS (hyperlink text) have changed outside of the application |
609 | 609 | $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x16), |
610 | - 'offset' => array('pack' => 'V'), |
|
611 | - 'type' => array('pack' => 'V', 'data' => 0x0B), |
|
612 | - 'data' => array('data' => false)); |
|
610 | + 'offset' => array('pack' => 'V'), |
|
611 | + 'type' => array('pack' => 'V', 'data' => 0x0B), |
|
612 | + 'data' => array('data' => false)); |
|
613 | 613 | $dataSection_NumProps++; |
614 | 614 | |
615 | 615 | // GKPIDDSI_DOCSPARTS |
@@ -619,50 +619,50 @@ discard block |
||
619 | 619 | $dataProp = pack('v', 0x0001); |
620 | 620 | $dataProp .= pack('v', 0x0000); |
621 | 621 | // array of UnalignedLpstr |
622 | - // cch |
|
623 | - $dataProp .= pack('v', 0x000A); |
|
624 | - $dataProp .= pack('v', 0x0000); |
|
625 | - // value |
|
626 | - $dataProp .= 'Worksheet'.chr(0); |
|
622 | + // cch |
|
623 | + $dataProp .= pack('v', 0x000A); |
|
624 | + $dataProp .= pack('v', 0x0000); |
|
625 | + // value |
|
626 | + $dataProp .= 'Worksheet'.chr(0); |
|
627 | 627 | |
628 | 628 | $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x0D), |
629 | - 'offset' => array('pack' => 'V'), |
|
630 | - 'type' => array('pack' => 'V', 'data' => 0x101E), |
|
631 | - 'data' => array('data' => $dataProp, 'length' => strlen($dataProp))); |
|
629 | + 'offset' => array('pack' => 'V'), |
|
630 | + 'type' => array('pack' => 'V', 'data' => 0x101E), |
|
631 | + 'data' => array('data' => $dataProp, 'length' => strlen($dataProp))); |
|
632 | 632 | $dataSection_NumProps++; |
633 | 633 | |
634 | 634 | // GKPIDDSI_HEADINGPAIR |
635 | 635 | // VtVecHeadingPairValue |
636 | - // cElements |
|
637 | - $dataProp = pack('v', 0x0002); |
|
638 | - $dataProp .= pack('v', 0x0000); |
|
639 | - // Array of vtHeadingPair |
|
636 | + // cElements |
|
637 | + $dataProp = pack('v', 0x0002); |
|
638 | + $dataProp .= pack('v', 0x0000); |
|
639 | + // Array of vtHeadingPair |
|
640 | 640 | // vtUnalignedString - headingString |
641 | - // stringType |
|
642 | - $dataProp .= pack('v', 0x001E); |
|
643 | - // padding |
|
644 | - $dataProp .= pack('v', 0x0000); |
|
645 | - // UnalignedLpstr |
|
641 | + // stringType |
|
642 | + $dataProp .= pack('v', 0x001E); |
|
643 | + // padding |
|
644 | + $dataProp .= pack('v', 0x0000); |
|
645 | + // UnalignedLpstr |
|
646 | 646 | // cch |
647 | 647 | $dataProp .= pack('v', 0x0013); |
648 | 648 | $dataProp .= pack('v', 0x0000); |
649 | 649 | // value |
650 | 650 | $dataProp .= 'Feuilles de calcul'; |
651 | 651 | // vtUnalignedString - headingParts |
652 | - // wType : 0x0003 = 32 bit signed integer |
|
653 | - $dataProp .= pack('v', 0x0300); |
|
654 | - // padding |
|
655 | - $dataProp .= pack('v', 0x0000); |
|
656 | - // value |
|
657 | - $dataProp .= pack('v', 0x0100); |
|
658 | - $dataProp .= pack('v', 0x0000); |
|
659 | - $dataProp .= pack('v', 0x0000); |
|
660 | - $dataProp .= pack('v', 0x0000); |
|
652 | + // wType : 0x0003 = 32 bit signed integer |
|
653 | + $dataProp .= pack('v', 0x0300); |
|
654 | + // padding |
|
655 | + $dataProp .= pack('v', 0x0000); |
|
656 | + // value |
|
657 | + $dataProp .= pack('v', 0x0100); |
|
658 | + $dataProp .= pack('v', 0x0000); |
|
659 | + $dataProp .= pack('v', 0x0000); |
|
660 | + $dataProp .= pack('v', 0x0000); |
|
661 | 661 | |
662 | 662 | $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x0C), |
663 | - 'offset' => array('pack' => 'V'), |
|
664 | - 'type' => array('pack' => 'V', 'data' => 0x100C), |
|
665 | - 'data' => array('data' => $dataProp, 'length' => strlen($dataProp))); |
|
663 | + 'offset' => array('pack' => 'V'), |
|
664 | + 'type' => array('pack' => 'V', 'data' => 0x100C), |
|
665 | + 'data' => array('data' => $dataProp, 'length' => strlen($dataProp))); |
|
666 | 666 | $dataSection_NumProps++; |
667 | 667 | |
668 | 668 | // 4 Section Length |
@@ -763,88 +763,88 @@ discard block |
||
763 | 763 | |
764 | 764 | // CodePage : CP-1252 |
765 | 765 | $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x01), |
766 | - 'offset' => array('pack' => 'V'), |
|
767 | - 'type' => array('pack' => 'V', 'data' => 0x02), // 2 byte signed integer |
|
768 | - 'data' => array('data' => 1252)); |
|
766 | + 'offset' => array('pack' => 'V'), |
|
767 | + 'type' => array('pack' => 'V', 'data' => 0x02), // 2 byte signed integer |
|
768 | + 'data' => array('data' => 1252)); |
|
769 | 769 | $dataSection_NumProps++; |
770 | 770 | |
771 | 771 | // Title |
772 | 772 | if ($this->phpExcel->getProperties()->getTitle()) { |
773 | 773 | $dataProp = $this->phpExcel->getProperties()->getTitle(); |
774 | 774 | $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x02), |
775 | - 'offset' => array('pack' => 'V'), |
|
776 | - 'type' => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length |
|
777 | - 'data' => array('data' => $dataProp, 'length' => strlen($dataProp))); |
|
775 | + 'offset' => array('pack' => 'V'), |
|
776 | + 'type' => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length |
|
777 | + 'data' => array('data' => $dataProp, 'length' => strlen($dataProp))); |
|
778 | 778 | $dataSection_NumProps++; |
779 | 779 | } |
780 | 780 | // Subject |
781 | 781 | if ($this->phpExcel->getProperties()->getSubject()) { |
782 | 782 | $dataProp = $this->phpExcel->getProperties()->getSubject(); |
783 | 783 | $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x03), |
784 | - 'offset' => array('pack' => 'V'), |
|
785 | - 'type' => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length |
|
786 | - 'data' => array('data' => $dataProp, 'length' => strlen($dataProp))); |
|
784 | + 'offset' => array('pack' => 'V'), |
|
785 | + 'type' => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length |
|
786 | + 'data' => array('data' => $dataProp, 'length' => strlen($dataProp))); |
|
787 | 787 | $dataSection_NumProps++; |
788 | 788 | } |
789 | 789 | // Author (Creator) |
790 | 790 | if ($this->phpExcel->getProperties()->getCreator()) { |
791 | 791 | $dataProp = $this->phpExcel->getProperties()->getCreator(); |
792 | 792 | $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x04), |
793 | - 'offset' => array('pack' => 'V'), |
|
794 | - 'type' => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length |
|
795 | - 'data' => array('data' => $dataProp, 'length' => strlen($dataProp))); |
|
793 | + 'offset' => array('pack' => 'V'), |
|
794 | + 'type' => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length |
|
795 | + 'data' => array('data' => $dataProp, 'length' => strlen($dataProp))); |
|
796 | 796 | $dataSection_NumProps++; |
797 | 797 | } |
798 | 798 | // Keywords |
799 | 799 | if ($this->phpExcel->getProperties()->getKeywords()) { |
800 | 800 | $dataProp = $this->phpExcel->getProperties()->getKeywords(); |
801 | 801 | $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x05), |
802 | - 'offset' => array('pack' => 'V'), |
|
803 | - 'type' => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length |
|
804 | - 'data' => array('data' => $dataProp, 'length' => strlen($dataProp))); |
|
802 | + 'offset' => array('pack' => 'V'), |
|
803 | + 'type' => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length |
|
804 | + 'data' => array('data' => $dataProp, 'length' => strlen($dataProp))); |
|
805 | 805 | $dataSection_NumProps++; |
806 | 806 | } |
807 | 807 | // Comments (Description) |
808 | 808 | if ($this->phpExcel->getProperties()->getDescription()) { |
809 | 809 | $dataProp = $this->phpExcel->getProperties()->getDescription(); |
810 | 810 | $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x06), |
811 | - 'offset' => array('pack' => 'V'), |
|
812 | - 'type' => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length |
|
813 | - 'data' => array('data' => $dataProp, 'length' => strlen($dataProp))); |
|
811 | + 'offset' => array('pack' => 'V'), |
|
812 | + 'type' => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length |
|
813 | + 'data' => array('data' => $dataProp, 'length' => strlen($dataProp))); |
|
814 | 814 | $dataSection_NumProps++; |
815 | 815 | } |
816 | 816 | // Last Saved By (LastModifiedBy) |
817 | 817 | if ($this->phpExcel->getProperties()->getLastModifiedBy()) { |
818 | 818 | $dataProp = $this->phpExcel->getProperties()->getLastModifiedBy(); |
819 | 819 | $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x08), |
820 | - 'offset' => array('pack' => 'V'), |
|
821 | - 'type' => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length |
|
822 | - 'data' => array('data' => $dataProp, 'length' => strlen($dataProp))); |
|
820 | + 'offset' => array('pack' => 'V'), |
|
821 | + 'type' => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length |
|
822 | + 'data' => array('data' => $dataProp, 'length' => strlen($dataProp))); |
|
823 | 823 | $dataSection_NumProps++; |
824 | 824 | } |
825 | 825 | // Created Date/Time |
826 | 826 | if ($this->phpExcel->getProperties()->getCreated()) { |
827 | 827 | $dataProp = $this->phpExcel->getProperties()->getCreated(); |
828 | 828 | $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x0C), |
829 | - 'offset' => array('pack' => 'V'), |
|
830 | - 'type' => array('pack' => 'V', 'data' => 0x40), // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601) |
|
831 | - 'data' => array('data' => \PHPExcel\Shared\OLE::localDateToOLE($dataProp))); |
|
829 | + 'offset' => array('pack' => 'V'), |
|
830 | + 'type' => array('pack' => 'V', 'data' => 0x40), // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601) |
|
831 | + 'data' => array('data' => \PHPExcel\Shared\OLE::localDateToOLE($dataProp))); |
|
832 | 832 | $dataSection_NumProps++; |
833 | 833 | } |
834 | 834 | // Modified Date/Time |
835 | 835 | if ($this->phpExcel->getProperties()->getModified()) { |
836 | 836 | $dataProp = $this->phpExcel->getProperties()->getModified(); |
837 | 837 | $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x0D), |
838 | - 'offset' => array('pack' => 'V'), |
|
839 | - 'type' => array('pack' => 'V', 'data' => 0x40), // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601) |
|
840 | - 'data' => array('data' => \PHPExcel\Shared\OLE::localDateToOLE($dataProp))); |
|
838 | + 'offset' => array('pack' => 'V'), |
|
839 | + 'type' => array('pack' => 'V', 'data' => 0x40), // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601) |
|
840 | + 'data' => array('data' => \PHPExcel\Shared\OLE::localDateToOLE($dataProp))); |
|
841 | 841 | $dataSection_NumProps++; |
842 | 842 | } |
843 | 843 | // Security |
844 | 844 | $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x13), |
845 | - 'offset' => array('pack' => 'V'), |
|
846 | - 'type' => array('pack' => 'V', 'data' => 0x03), // 4 byte signed integer |
|
847 | - 'data' => array('data' => 0x00)); |
|
845 | + 'offset' => array('pack' => 'V'), |
|
846 | + 'type' => array('pack' => 'V', 'data' => 0x03), // 4 byte signed integer |
|
847 | + 'data' => array('data' => 0x00)); |
|
848 | 848 | $dataSection_NumProps++; |
849 | 849 | |
850 | 850 |
@@ -339,9 +339,9 @@ discard block |
||
339 | 339 | ++$countShapes[$sheetIndex]; |
340 | 340 | |
341 | 341 | // create an Drawing Object for the dropdown |
342 | - $oDrawing = new \PHPExcel\Worksheet\BaseDrawing(); |
|
342 | + $oDrawing = new \PHPExcel\Worksheet\BaseDrawing(); |
|
343 | 343 | // get the coordinates of drawing |
344 | - $cDrawing = \PHPExcel\Cell::stringFromColumnIndex($iInc - 1) . $rangeBounds[0][1]; |
|
344 | + $cDrawing = \PHPExcel\Cell::stringFromColumnIndex($iInc - 1) . $rangeBounds[0][1]; |
|
345 | 345 | $oDrawing->setCoordinates($cDrawing); |
346 | 346 | $oDrawing->setWorksheet($sheet); |
347 | 347 | |
@@ -623,7 +623,7 @@ discard block |
||
623 | 623 | $dataProp .= pack('v', 0x000A); |
624 | 624 | $dataProp .= pack('v', 0x0000); |
625 | 625 | // value |
626 | - $dataProp .= 'Worksheet'.chr(0); |
|
626 | + $dataProp .= 'Worksheet' . chr(0); |
|
627 | 627 | |
628 | 628 | $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x0D), |
629 | 629 | 'offset' => array('pack' => 'V'), |
@@ -697,7 +697,7 @@ discard block |
||
697 | 697 | $dataProp['data']['data'] .= chr(0); |
698 | 698 | $dataProp['data']['length'] += 1; |
699 | 699 | // Complete the string with null string for being a %4 |
700 | - $dataProp['data']['length'] = $dataProp['data']['length'] + ((4 - $dataProp['data']['length'] % 4)==4 ? 0 : (4 - $dataProp['data']['length'] % 4)); |
|
700 | + $dataProp['data']['length'] = $dataProp['data']['length'] + ((4 - $dataProp['data']['length'] % 4) == 4 ? 0 : (4 - $dataProp['data']['length'] % 4)); |
|
701 | 701 | $dataProp['data']['data'] = str_pad($dataProp['data']['data'], $dataProp['data']['length'], chr(0), STR_PAD_RIGHT); |
702 | 702 | |
703 | 703 | $dataSection_Content .= pack('V', $dataProp['data']['length']); |
@@ -873,7 +873,7 @@ discard block |
||
873 | 873 | $dataProp['data']['data'] .= chr(0); |
874 | 874 | $dataProp['data']['length'] += 1; |
875 | 875 | // Complete the string with null string for being a %4 |
876 | - $dataProp['data']['length'] = $dataProp['data']['length'] + ((4 - $dataProp['data']['length'] % 4)==4 ? 0 : (4 - $dataProp['data']['length'] % 4)); |
|
876 | + $dataProp['data']['length'] = $dataProp['data']['length'] + ((4 - $dataProp['data']['length'] % 4) == 4 ? 0 : (4 - $dataProp['data']['length'] % 4)); |
|
877 | 877 | $dataProp['data']['data'] = str_pad($dataProp['data']['data'], $dataProp['data']['length'], chr(0), STR_PAD_RIGHT); |
878 | 878 | |
879 | 879 | $dataSection_Content .= pack('V', $dataProp['data']['length']); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | // Create string lookup table |
44 | 44 | $aStringTable = array(); |
45 | 45 | $cellCollection = null; |
46 | - $aFlippedStringTable = null; // For faster lookup |
|
46 | + $aFlippedStringTable = null; // For faster lookup |
|
47 | 47 | |
48 | 48 | // Is an existing table given? |
49 | 49 | if (($pExistingTable !== null) && is_array($pExistingTable)) { |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | foreach ($pStringTable as $textElement) { |
109 | 109 | $objWriter->startElement('si'); |
110 | 110 | |
111 | - if (! $textElement instanceof \PHPExcel\RichText) { |
|
111 | + if (!$textElement instanceof \PHPExcel\RichText) { |
|
112 | 112 | $textToWrite = \PHPExcel\Shared\StringHelper::controlCharacterPHP2OOXML($textElement); |
113 | 113 | $objWriter->startElement('t'); |
114 | 114 | if ($textToWrite !== trim($textToWrite)) { |
@@ -149,31 +149,31 @@ discard block |
||
149 | 149 | $elements = $pRichText->getRichTextElements(); |
150 | 150 | foreach ($elements as $element) { |
151 | 151 | // r |
152 | - $objWriter->startElement($prefix.'r'); |
|
152 | + $objWriter->startElement($prefix . 'r'); |
|
153 | 153 | |
154 | 154 | // rPr |
155 | 155 | if ($element instanceof \PHPExcel\RichText\Run) { |
156 | 156 | // rPr |
157 | - $objWriter->startElement($prefix.'rPr'); |
|
157 | + $objWriter->startElement($prefix . 'rPr'); |
|
158 | 158 | |
159 | 159 | // rFont |
160 | - $objWriter->startElement($prefix.'rFont'); |
|
160 | + $objWriter->startElement($prefix . 'rFont'); |
|
161 | 161 | $objWriter->writeAttribute('val', $element->getFont()->getName()); |
162 | 162 | $objWriter->endElement(); |
163 | 163 | |
164 | 164 | // Bold |
165 | - $objWriter->startElement($prefix.'b'); |
|
165 | + $objWriter->startElement($prefix . 'b'); |
|
166 | 166 | $objWriter->writeAttribute('val', ($element->getFont()->getBold() ? 'true' : 'false')); |
167 | 167 | $objWriter->endElement(); |
168 | 168 | |
169 | 169 | // Italic |
170 | - $objWriter->startElement($prefix.'i'); |
|
170 | + $objWriter->startElement($prefix . 'i'); |
|
171 | 171 | $objWriter->writeAttribute('val', ($element->getFont()->getItalic() ? 'true' : 'false')); |
172 | 172 | $objWriter->endElement(); |
173 | 173 | |
174 | 174 | // Superscript / subscript |
175 | 175 | if ($element->getFont()->getSuperScript() || $element->getFont()->getSubScript()) { |
176 | - $objWriter->startElement($prefix.'vertAlign'); |
|
176 | + $objWriter->startElement($prefix . 'vertAlign'); |
|
177 | 177 | if ($element->getFont()->getSuperScript()) { |
178 | 178 | $objWriter->writeAttribute('val', 'superscript'); |
179 | 179 | } elseif ($element->getFont()->getSubScript()) { |
@@ -183,22 +183,22 @@ discard block |
||
183 | 183 | } |
184 | 184 | |
185 | 185 | // Strikethrough |
186 | - $objWriter->startElement($prefix.'strike'); |
|
186 | + $objWriter->startElement($prefix . 'strike'); |
|
187 | 187 | $objWriter->writeAttribute('val', ($element->getFont()->getStrikethrough() ? 'true' : 'false')); |
188 | 188 | $objWriter->endElement(); |
189 | 189 | |
190 | 190 | // Color |
191 | - $objWriter->startElement($prefix.'color'); |
|
191 | + $objWriter->startElement($prefix . 'color'); |
|
192 | 192 | $objWriter->writeAttribute('rgb', $element->getFont()->getColor()->getARGB()); |
193 | 193 | $objWriter->endElement(); |
194 | 194 | |
195 | 195 | // Size |
196 | - $objWriter->startElement($prefix.'sz'); |
|
196 | + $objWriter->startElement($prefix . 'sz'); |
|
197 | 197 | $objWriter->writeAttribute('val', $element->getFont()->getSize()); |
198 | 198 | $objWriter->endElement(); |
199 | 199 | |
200 | 200 | // Underline |
201 | - $objWriter->startElement($prefix.'u'); |
|
201 | + $objWriter->startElement($prefix . 'u'); |
|
202 | 202 | $objWriter->writeAttribute('val', $element->getFont()->getUnderline()); |
203 | 203 | $objWriter->endElement(); |
204 | 204 | |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | } |
207 | 207 | |
208 | 208 | // t |
209 | - $objWriter->startElement($prefix.'t'); |
|
209 | + $objWriter->startElement($prefix . 't'); |
|
210 | 210 | $objWriter->writeAttribute('xml:space', 'preserve'); |
211 | 211 | $objWriter->writeRawData(\PHPExcel\Shared\StringHelper::controlCharacterPHP2OOXML($element->getText())); |
212 | 212 | $objWriter->endElement(); |
@@ -239,10 +239,10 @@ discard block |
||
239 | 239 | $elements = $pRichText->getRichTextElements(); |
240 | 240 | foreach ($elements as $element) { |
241 | 241 | // r |
242 | - $objWriter->startElement($prefix.'r'); |
|
242 | + $objWriter->startElement($prefix . 'r'); |
|
243 | 243 | |
244 | 244 | // rPr |
245 | - $objWriter->startElement($prefix.'rPr'); |
|
245 | + $objWriter->startElement($prefix . 'rPr'); |
|
246 | 246 | |
247 | 247 | // Bold |
248 | 248 | $objWriter->writeAttribute('b', ($element->getFont()->getBold() ? 1 : 0)); |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | $objWriter->writeAttribute('strike', ($element->getFont()->getStrikethrough() ? 'sngStrike' : 'noStrike')); |
264 | 264 | |
265 | 265 | // rFont |
266 | - $objWriter->startElement($prefix.'latin'); |
|
266 | + $objWriter->startElement($prefix . 'latin'); |
|
267 | 267 | $objWriter->writeAttribute('typeface', $element->getFont()->getName()); |
268 | 268 | $objWriter->endElement(); |
269 | 269 | |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | $objWriter->endElement(); |
282 | 282 | |
283 | 283 | // t |
284 | - $objWriter->startElement($prefix.'t'); |
|
284 | + $objWriter->startElement($prefix . 't'); |
|
285 | 285 | // $objWriter->writeAttribute('xml:space', 'preserve'); // Excel2010 accepts, Excel2007 complains |
286 | 286 | $objWriter->writeRawData(\PHPExcel\Shared\StringHelper::controlCharacterPHP2OOXML($element->getText())); |
287 | 287 | $objWriter->endElement(); |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | |
304 | 304 | // Loop through stringtable and add flipped items to $returnValue |
305 | 305 | foreach ($stringTable as $key => $value) { |
306 | - if (! $value instanceof \PHPExcel\RichText) { |
|
306 | + if (!$value instanceof \PHPExcel\RichText) { |
|
307 | 307 | $returnValue[$value] = $key; |
308 | 308 | } elseif ($value instanceof \PHPExcel\RichText) { |
309 | 309 | $returnValue[$value->getHashCode()] = $key; |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | $objWriter->startElement('c:smooth'); |
274 | 274 | $objWriter->writeAttribute('val', (integer) $plotGroup->getSmoothLine()); |
275 | 275 | $objWriter->endElement(); |
276 | - } elseif (($chartType === DataSeries::TYPE_BARCHART) ||($chartType === DataSeries::TYPE_BARCHART_3D)) { |
|
276 | + } elseif (($chartType === DataSeries::TYPE_BARCHART) || ($chartType === DataSeries::TYPE_BARCHART_3D)) { |
|
277 | 277 | $objWriter->startElement('c:gapWidth'); |
278 | 278 | $objWriter->writeAttribute('val', 150); |
279 | 279 | $objWriter->endElement(); |
@@ -913,10 +913,10 @@ discard block |
||
913 | 913 | if (!is_null($xAxis->getGlowProperty('size'))) { |
914 | 914 | $objWriter->startElement('a:glow'); |
915 | 915 | $objWriter->writeAttribute('rad', $xAxis->getGlowProperty('size')); |
916 | - $objWriter->startElement("a:{$xAxis->getGlowProperty(array('color','type'))}"); |
|
917 | - $objWriter->writeAttribute('val', $xAxis->getGlowProperty(array('color','value'))); |
|
916 | + $objWriter->startElement("a:{$xAxis->getGlowProperty(array('color', 'type'))}"); |
|
917 | + $objWriter->writeAttribute('val', $xAxis->getGlowProperty(array('color', 'value'))); |
|
918 | 918 | $objWriter->startElement('a:alpha'); |
919 | - $objWriter->writeAttribute('val', $xAxis->getGlowProperty(array('color','alpha'))); |
|
919 | + $objWriter->writeAttribute('val', $xAxis->getGlowProperty(array('color', 'alpha'))); |
|
920 | 920 | $objWriter->endElement(); |
921 | 921 | $objWriter->endElement(); |
922 | 922 | $objWriter->endElement(); |
@@ -937,23 +937,23 @@ discard block |
||
937 | 937 | if (!is_null($xAxis->getShadowProperty('algn'))) { |
938 | 938 | $objWriter->writeAttribute('algn', $xAxis->getShadowProperty('algn')); |
939 | 939 | } |
940 | - if (!is_null($xAxis->getShadowProperty(array('size','sx')))) { |
|
941 | - $objWriter->writeAttribute('sx', $xAxis->getShadowProperty(array('size','sx'))); |
|
940 | + if (!is_null($xAxis->getShadowProperty(array('size', 'sx')))) { |
|
941 | + $objWriter->writeAttribute('sx', $xAxis->getShadowProperty(array('size', 'sx'))); |
|
942 | 942 | } |
943 | - if (!is_null($xAxis->getShadowProperty(array('size','sy')))) { |
|
944 | - $objWriter->writeAttribute('sy', $xAxis->getShadowProperty(array('size','sy'))); |
|
943 | + if (!is_null($xAxis->getShadowProperty(array('size', 'sy')))) { |
|
944 | + $objWriter->writeAttribute('sy', $xAxis->getShadowProperty(array('size', 'sy'))); |
|
945 | 945 | } |
946 | - if (!is_null($xAxis->getShadowProperty(array('size','kx')))) { |
|
947 | - $objWriter->writeAttribute('kx', $xAxis->getShadowProperty(array('size','kx'))); |
|
946 | + if (!is_null($xAxis->getShadowProperty(array('size', 'kx')))) { |
|
947 | + $objWriter->writeAttribute('kx', $xAxis->getShadowProperty(array('size', 'kx'))); |
|
948 | 948 | } |
949 | 949 | if (!is_null($xAxis->getShadowProperty('rotWithShape'))) { |
950 | 950 | $objWriter->writeAttribute('rotWithShape', $xAxis->getShadowProperty('rotWithShape')); |
951 | 951 | } |
952 | 952 | |
953 | - $objWriter->startElement("a:{$xAxis->getShadowProperty(array('color','type'))}"); |
|
954 | - $objWriter->writeAttribute('val', $xAxis->getShadowProperty(array('color','value'))); |
|
953 | + $objWriter->startElement("a:{$xAxis->getShadowProperty(array('color', 'type'))}"); |
|
954 | + $objWriter->writeAttribute('val', $xAxis->getShadowProperty(array('color', 'value'))); |
|
955 | 955 | $objWriter->startElement('a:alpha'); |
956 | - $objWriter->writeAttribute('val', $xAxis->getShadowProperty(array('color','alpha'))); |
|
956 | + $objWriter->writeAttribute('val', $xAxis->getShadowProperty(array('color', 'alpha'))); |
|
957 | 957 | $objWriter->endElement(); |
958 | 958 | $objWriter->endElement(); |
959 | 959 |
@@ -409,11 +409,13 @@ discard block |
||
409 | 409 | * |
410 | 410 | * @param \PHPExcel\Shared\XMLWriter $objWriter XML Writer |
411 | 411 | * @param PlotArea $plotArea |
412 | - * @param PHPExcel_Chart_Title $xAxisLabel |
|
412 | + * @param null|Title $xAxisLabel |
|
413 | 413 | * @param string $groupType Chart type |
414 | 414 | * @param string $id1 |
415 | 415 | * @param string $id2 |
416 | 416 | * @param boolean $isMultiLevelSeries |
417 | + * @param null|Axis $xAxis |
|
418 | + * @param null|Axis $yAxis |
|
417 | 419 | * |
418 | 420 | * @throws \PHPExcel\Writer\Exception |
419 | 421 | */ |
@@ -530,12 +532,16 @@ discard block |
||
530 | 532 | * Write Value Axis |
531 | 533 | * |
532 | 534 | * @param \PHPExcel\Shared\XMLWriter $objWriter XML Writer |
533 | - * @param PHPExcel_Chart_PlotArea $plotArea |
|
534 | - * @param PHPExcel_Chart_Title $yAxisLabel |
|
535 | + * @param PlotArea $plotArea |
|
536 | + * @param null|Title $yAxisLabel |
|
535 | 537 | * @param string $groupType Chart type |
536 | 538 | * @param string $id1 |
537 | 539 | * @param string $id2 |
538 | 540 | * @param boolean $isMultiLevelSeries |
541 | + * @param null|Axis $xAxis |
|
542 | + * @param null|Axis $yAxis |
|
543 | + * @param null|GridLines $majorGridlines |
|
544 | + * @param null|GridLines $minorGridlines |
|
539 | 545 | * |
540 | 546 | * @throws \PHPExcel\Writer\Exception |
541 | 547 | */ |
@@ -1016,7 +1022,7 @@ discard block |
||
1016 | 1022 | /** |
1017 | 1023 | * Get the data series type(s) for a chart plot series |
1018 | 1024 | * |
1019 | - * @param PHPExcel_Chart_PlotArea $plotArea |
|
1025 | + * @param PlotArea $plotArea |
|
1020 | 1026 | * |
1021 | 1027 | * @return string|array |
1022 | 1028 | * @throws \PHPExcel\Writer\Exception |
@@ -1262,7 +1268,6 @@ discard block |
||
1262 | 1268 | * @param \PHPExcel\Shared\XMLWriter $objWriter XML Writer |
1263 | 1269 | * @param string $groupType Type of plot for dataseries |
1264 | 1270 | * @param string $dataType Datatype of series values |
1265 | - * @param \PHPExcel\Worksheet $pSheet |
|
1266 | 1271 | * |
1267 | 1272 | * @throws \PHPExcel\Writer\Exception |
1268 | 1273 | */ |
@@ -168,7 +168,7 @@ |
||
168 | 168 | 'http://schemas.microsoft.com/office/2006/relationships/vbaProject', |
169 | 169 | 'vbaProject.bin' |
170 | 170 | ); |
171 | - ++$i;//increment i if needed for an another relation |
|
171 | + ++$i; //increment i if needed for an another relation |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | $objWriter->endElement(); |
@@ -48,12 +48,12 @@ discard block |
||
48 | 48 | // XML header |
49 | 49 | $objWriter->startDocument('1.0', 'UTF-8', 'yes'); |
50 | 50 | |
51 | - // Comments cache |
|
52 | - $comments = $pWorksheet->getComments(); |
|
51 | + // Comments cache |
|
52 | + $comments = $pWorksheet->getComments(); |
|
53 | 53 | |
54 | - // Authors cache |
|
55 | - $authors = array(); |
|
56 | - $authorId = 0; |
|
54 | + // Authors cache |
|
55 | + $authors = array(); |
|
56 | + $authorId = 0; |
|
57 | 57 | foreach ($comments as $comment) { |
58 | 58 | if (!isset($authors[$comment->getAuthor()])) { |
59 | 59 | $authors[$comment->getAuthor()] = $authorId++; |
@@ -128,8 +128,8 @@ discard block |
||
128 | 128 | // XML header |
129 | 129 | $objWriter->startDocument('1.0', 'UTF-8', 'yes'); |
130 | 130 | |
131 | - // Comments cache |
|
132 | - $comments = $pWorksheet->getComments(); |
|
131 | + // Comments cache |
|
132 | + $comments = $pWorksheet->getComments(); |
|
133 | 133 | |
134 | 134 | // xml |
135 | 135 | $objWriter->startElement('xml'); |
@@ -190,11 +190,11 @@ discard block |
||
190 | 190 | */ |
191 | 191 | private function writeVMLComment(\PHPExcel\Shared\XMLWriter $objWriter = null, $pCellReference = 'A1', \PHPExcel\Comment $pComment = null) |
192 | 192 | { |
193 | - // Metadata |
|
194 | - list($column, $row) = \PHPExcel\Cell::coordinateFromString($pCellReference); |
|
195 | - $column = \PHPExcel\Cell::columnIndexFromString($column); |
|
196 | - $id = 1024 + $column + $row; |
|
197 | - $id = substr($id, 0, 4); |
|
193 | + // Metadata |
|
194 | + list($column, $row) = \PHPExcel\Cell::coordinateFromString($pCellReference); |
|
195 | + $column = \PHPExcel\Cell::columnIndexFromString($column); |
|
196 | + $id = 1024 + $column + $row; |
|
197 | + $id = substr($id, 0, 4); |
|
198 | 198 | |
199 | 199 | // v:shape |
200 | 200 | $objWriter->startElement('v:shape'); |
@@ -49,11 +49,11 @@ discard block |
||
49 | 49 | $objWriter->startDocument('1.0', 'UTF-8', 'yes'); |
50 | 50 | |
51 | 51 | // Comments cache |
52 | - $comments = $pWorksheet->getComments(); |
|
52 | + $comments = $pWorksheet->getComments(); |
|
53 | 53 | |
54 | 54 | // Authors cache |
55 | - $authors = array(); |
|
56 | - $authorId = 0; |
|
55 | + $authors = array(); |
|
56 | + $authorId = 0; |
|
57 | 57 | foreach ($comments as $comment) { |
58 | 58 | if (!isset($authors[$comment->getAuthor()])) { |
59 | 59 | $authors[$comment->getAuthor()] = $authorId++; |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | $objWriter->startDocument('1.0', 'UTF-8', 'yes'); |
130 | 130 | |
131 | 131 | // Comments cache |
132 | - $comments = $pWorksheet->getComments(); |
|
132 | + $comments = $pWorksheet->getComments(); |
|
133 | 133 | |
134 | 134 | // xml |
135 | 135 | $objWriter->startElement('xml'); |