@@ -169,8 +169,7 @@ discard block |
||
169 | 169 | { |
170 | 170 | $aBreaks = $pSheet->getBreaks(); |
171 | 171 | ($pNumCols > 0 || $pNumRows > 0) ? |
172 | - uksort($aBreaks, ['self', 'cellReverseSort']) : |
|
173 | - uksort($aBreaks, ['self', 'cellSort']); |
|
172 | + uksort($aBreaks, ['self', 'cellReverseSort']) : uksort($aBreaks, ['self', 'cellSort']); |
|
174 | 173 | |
175 | 174 | foreach ($aBreaks as $key => $value) { |
176 | 175 | if (self::cellAddressInDeleteRange($key, $beforeRow, $pNumRows, $beforeColumnIndex, $pNumCols)) { |
@@ -230,8 +229,7 @@ discard block |
||
230 | 229 | { |
231 | 230 | $aHyperlinkCollection = $pSheet->getHyperlinkCollection(); |
232 | 231 | ($pNumCols > 0 || $pNumRows > 0) ? |
233 | - uksort($aHyperlinkCollection, ['self', 'cellReverseSort']) : |
|
234 | - uksort($aHyperlinkCollection, ['self', 'cellSort']); |
|
232 | + uksort($aHyperlinkCollection, ['self', 'cellReverseSort']) : uksort($aHyperlinkCollection, ['self', 'cellSort']); |
|
235 | 233 | |
236 | 234 | foreach ($aHyperlinkCollection as $key => $value) { |
237 | 235 | $newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows); |
@@ -256,8 +254,7 @@ discard block |
||
256 | 254 | { |
257 | 255 | $aDataValidationCollection = $pSheet->getDataValidationCollection(); |
258 | 256 | ($pNumCols > 0 || $pNumRows > 0) ? |
259 | - uksort($aDataValidationCollection, ['self', 'cellReverseSort']) : |
|
260 | - uksort($aDataValidationCollection, ['self', 'cellSort']); |
|
257 | + uksort($aDataValidationCollection, ['self', 'cellReverseSort']) : uksort($aDataValidationCollection, ['self', 'cellSort']); |
|
261 | 258 | |
262 | 259 | foreach ($aDataValidationCollection as $key => $value) { |
263 | 260 | $newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows); |
@@ -303,8 +300,7 @@ discard block |
||
303 | 300 | { |
304 | 301 | $aProtectedCells = $pSheet->getProtectedCells(); |
305 | 302 | ($pNumCols > 0 || $pNumRows > 0) ? |
306 | - uksort($aProtectedCells, ['self', 'cellReverseSort']) : |
|
307 | - uksort($aProtectedCells, ['self', 'cellSort']); |
|
303 | + uksort($aProtectedCells, ['self', 'cellReverseSort']) : uksort($aProtectedCells, ['self', 'cellSort']); |
|
308 | 304 | foreach ($aProtectedCells as $key => $value) { |
309 | 305 | $newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows); |
310 | 306 | if ($key != $newReference) { |
@@ -34,14 +34,14 @@ |
||
34 | 34 | const HORIZONTAL_CENTER_CONTINUOUS = 'centerContinuous'; |
35 | 35 | const HORIZONTAL_JUSTIFY = 'justify'; |
36 | 36 | const HORIZONTAL_FILL = 'fill'; |
37 | - const HORIZONTAL_DISTRIBUTED = 'distributed'; // Excel2007 only |
|
37 | + const HORIZONTAL_DISTRIBUTED = 'distributed'; // Excel2007 only |
|
38 | 38 | |
39 | 39 | /* Vertical alignment styles */ |
40 | 40 | const VERTICAL_BOTTOM = 'bottom'; |
41 | 41 | const VERTICAL_TOP = 'top'; |
42 | 42 | const VERTICAL_CENTER = 'center'; |
43 | 43 | const VERTICAL_JUSTIFY = 'justify'; |
44 | - const VERTICAL_DISTRIBUTED = 'distributed'; // Excel2007 only |
|
44 | + const VERTICAL_DISTRIBUTED = 'distributed'; // Excel2007 only |
|
45 | 45 | |
46 | 46 | /* Read order */ |
47 | 47 | const READORDER_CONTEXT = 0; |
@@ -362,62 +362,62 @@ |
||
362 | 362 | // Indexed colors |
363 | 363 | if (is_null(self::$indexedColors)) { |
364 | 364 | self::$indexedColors = [ |
365 | - 1 => 'FF000000', // System Colour #1 - Black |
|
366 | - 2 => 'FFFFFFFF', // System Colour #2 - White |
|
367 | - 3 => 'FFFF0000', // System Colour #3 - Red |
|
368 | - 4 => 'FF00FF00', // System Colour #4 - Green |
|
369 | - 5 => 'FF0000FF', // System Colour #5 - Blue |
|
370 | - 6 => 'FFFFFF00', // System Colour #6 - Yellow |
|
371 | - 7 => 'FFFF00FF', // System Colour #7- Magenta |
|
372 | - 8 => 'FF00FFFF', // System Colour #8- Cyan |
|
373 | - 9 => 'FF800000', // Standard Colour #9 |
|
374 | - 10 => 'FF008000', // Standard Colour #10 |
|
375 | - 11 => 'FF000080', // Standard Colour #11 |
|
376 | - 12 => 'FF808000', // Standard Colour #12 |
|
377 | - 13 => 'FF800080', // Standard Colour #13 |
|
378 | - 14 => 'FF008080', // Standard Colour #14 |
|
379 | - 15 => 'FFC0C0C0', // Standard Colour #15 |
|
380 | - 16 => 'FF808080', // Standard Colour #16 |
|
381 | - 17 => 'FF9999FF', // Chart Fill Colour #17 |
|
382 | - 18 => 'FF993366', // Chart Fill Colour #18 |
|
383 | - 19 => 'FFFFFFCC', // Chart Fill Colour #19 |
|
384 | - 20 => 'FFCCFFFF', // Chart Fill Colour #20 |
|
385 | - 21 => 'FF660066', // Chart Fill Colour #21 |
|
386 | - 22 => 'FFFF8080', // Chart Fill Colour #22 |
|
387 | - 23 => 'FF0066CC', // Chart Fill Colour #23 |
|
388 | - 24 => 'FFCCCCFF', // Chart Fill Colour #24 |
|
389 | - 25 => 'FF000080', // Chart Line Colour #25 |
|
390 | - 26 => 'FFFF00FF', // Chart Line Colour #26 |
|
391 | - 27 => 'FFFFFF00', // Chart Line Colour #27 |
|
392 | - 28 => 'FF00FFFF', // Chart Line Colour #28 |
|
393 | - 29 => 'FF800080', // Chart Line Colour #29 |
|
394 | - 30 => 'FF800000', // Chart Line Colour #30 |
|
395 | - 31 => 'FF008080', // Chart Line Colour #31 |
|
396 | - 32 => 'FF0000FF', // Chart Line Colour #32 |
|
397 | - 33 => 'FF00CCFF', // Standard Colour #33 |
|
398 | - 34 => 'FFCCFFFF', // Standard Colour #34 |
|
399 | - 35 => 'FFCCFFCC', // Standard Colour #35 |
|
400 | - 36 => 'FFFFFF99', // Standard Colour #36 |
|
401 | - 37 => 'FF99CCFF', // Standard Colour #37 |
|
402 | - 38 => 'FFFF99CC', // Standard Colour #38 |
|
403 | - 39 => 'FFCC99FF', // Standard Colour #39 |
|
404 | - 40 => 'FFFFCC99', // Standard Colour #40 |
|
405 | - 41 => 'FF3366FF', // Standard Colour #41 |
|
406 | - 42 => 'FF33CCCC', // Standard Colour #42 |
|
407 | - 43 => 'FF99CC00', // Standard Colour #43 |
|
408 | - 44 => 'FFFFCC00', // Standard Colour #44 |
|
409 | - 45 => 'FFFF9900', // Standard Colour #45 |
|
410 | - 46 => 'FFFF6600', // Standard Colour #46 |
|
411 | - 47 => 'FF666699', // Standard Colour #47 |
|
412 | - 48 => 'FF969696', // Standard Colour #48 |
|
413 | - 49 => 'FF003366', // Standard Colour #49 |
|
414 | - 50 => 'FF339966', // Standard Colour #50 |
|
415 | - 51 => 'FF003300', // Standard Colour #51 |
|
416 | - 52 => 'FF333300', // Standard Colour #52 |
|
417 | - 53 => 'FF993300', // Standard Colour #53 |
|
418 | - 54 => 'FF993366', // Standard Colour #54 |
|
419 | - 55 => 'FF333399', // Standard Colour #55 |
|
420 | - 56 => 'FF333333', // Standard Colour #56 |
|
365 | + 1 => 'FF000000', // System Colour #1 - Black |
|
366 | + 2 => 'FFFFFFFF', // System Colour #2 - White |
|
367 | + 3 => 'FFFF0000', // System Colour #3 - Red |
|
368 | + 4 => 'FF00FF00', // System Colour #4 - Green |
|
369 | + 5 => 'FF0000FF', // System Colour #5 - Blue |
|
370 | + 6 => 'FFFFFF00', // System Colour #6 - Yellow |
|
371 | + 7 => 'FFFF00FF', // System Colour #7- Magenta |
|
372 | + 8 => 'FF00FFFF', // System Colour #8- Cyan |
|
373 | + 9 => 'FF800000', // Standard Colour #9 |
|
374 | + 10 => 'FF008000', // Standard Colour #10 |
|
375 | + 11 => 'FF000080', // Standard Colour #11 |
|
376 | + 12 => 'FF808000', // Standard Colour #12 |
|
377 | + 13 => 'FF800080', // Standard Colour #13 |
|
378 | + 14 => 'FF008080', // Standard Colour #14 |
|
379 | + 15 => 'FFC0C0C0', // Standard Colour #15 |
|
380 | + 16 => 'FF808080', // Standard Colour #16 |
|
381 | + 17 => 'FF9999FF', // Chart Fill Colour #17 |
|
382 | + 18 => 'FF993366', // Chart Fill Colour #18 |
|
383 | + 19 => 'FFFFFFCC', // Chart Fill Colour #19 |
|
384 | + 20 => 'FFCCFFFF', // Chart Fill Colour #20 |
|
385 | + 21 => 'FF660066', // Chart Fill Colour #21 |
|
386 | + 22 => 'FFFF8080', // Chart Fill Colour #22 |
|
387 | + 23 => 'FF0066CC', // Chart Fill Colour #23 |
|
388 | + 24 => 'FFCCCCFF', // Chart Fill Colour #24 |
|
389 | + 25 => 'FF000080', // Chart Line Colour #25 |
|
390 | + 26 => 'FFFF00FF', // Chart Line Colour #26 |
|
391 | + 27 => 'FFFFFF00', // Chart Line Colour #27 |
|
392 | + 28 => 'FF00FFFF', // Chart Line Colour #28 |
|
393 | + 29 => 'FF800080', // Chart Line Colour #29 |
|
394 | + 30 => 'FF800000', // Chart Line Colour #30 |
|
395 | + 31 => 'FF008080', // Chart Line Colour #31 |
|
396 | + 32 => 'FF0000FF', // Chart Line Colour #32 |
|
397 | + 33 => 'FF00CCFF', // Standard Colour #33 |
|
398 | + 34 => 'FFCCFFFF', // Standard Colour #34 |
|
399 | + 35 => 'FFCCFFCC', // Standard Colour #35 |
|
400 | + 36 => 'FFFFFF99', // Standard Colour #36 |
|
401 | + 37 => 'FF99CCFF', // Standard Colour #37 |
|
402 | + 38 => 'FFFF99CC', // Standard Colour #38 |
|
403 | + 39 => 'FFCC99FF', // Standard Colour #39 |
|
404 | + 40 => 'FFFFCC99', // Standard Colour #40 |
|
405 | + 41 => 'FF3366FF', // Standard Colour #41 |
|
406 | + 42 => 'FF33CCCC', // Standard Colour #42 |
|
407 | + 43 => 'FF99CC00', // Standard Colour #43 |
|
408 | + 44 => 'FFFFCC00', // Standard Colour #44 |
|
409 | + 45 => 'FFFF9900', // Standard Colour #45 |
|
410 | + 46 => 'FFFF6600', // Standard Colour #46 |
|
411 | + 47 => 'FF666699', // Standard Colour #47 |
|
412 | + 48 => 'FF969696', // Standard Colour #48 |
|
413 | + 49 => 'FF003366', // Standard Colour #49 |
|
414 | + 50 => 'FF339966', // Standard Colour #50 |
|
415 | + 51 => 'FF003300', // Standard Colour #51 |
|
416 | + 52 => 'FF333300', // Standard Colour #52 |
|
417 | + 53 => 'FF993300', // Standard Colour #53 |
|
418 | + 54 => 'FF993366', // Standard Colour #54 |
|
419 | + 55 => 'FF333399', // Standard Colour #55 |
|
420 | + 56 => 'FF333333', // Standard Colour #56 |
|
421 | 421 | ]; |
422 | 422 | } |
423 | 423 |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | self::$builtInFormats[11] = '0.00E+00'; |
287 | 287 | self::$builtInFormats[12] = '# ?/?'; |
288 | 288 | self::$builtInFormats[13] = '# ??/??'; |
289 | - self::$builtInFormats[14] = 'm/d/yyyy'; // Despite ECMA 'mm-dd-yy'; |
|
289 | + self::$builtInFormats[14] = 'm/d/yyyy'; // Despite ECMA 'mm-dd-yy'; |
|
290 | 290 | self::$builtInFormats[15] = 'd-mmm-yy'; |
291 | 291 | self::$builtInFormats[16] = 'd-mmm'; |
292 | 292 | self::$builtInFormats[17] = 'mmm-yy'; |
@@ -294,17 +294,17 @@ discard block |
||
294 | 294 | self::$builtInFormats[19] = 'h:mm:ss AM/PM'; |
295 | 295 | self::$builtInFormats[20] = 'h:mm'; |
296 | 296 | self::$builtInFormats[21] = 'h:mm:ss'; |
297 | - self::$builtInFormats[22] = 'm/d/yyyy h:mm'; // Despite ECMA 'm/d/yy h:mm'; |
|
297 | + self::$builtInFormats[22] = 'm/d/yyyy h:mm'; // Despite ECMA 'm/d/yy h:mm'; |
|
298 | 298 | |
299 | - self::$builtInFormats[37] = '#,##0_);(#,##0)'; // Despite ECMA '#,##0 ;(#,##0)'; |
|
300 | - self::$builtInFormats[38] = '#,##0_);[Red](#,##0)'; // Despite ECMA '#,##0 ;[Red](#,##0)'; |
|
301 | - self::$builtInFormats[39] = '#,##0.00_);(#,##0.00)'; // Despite ECMA '#,##0.00;(#,##0.00)'; |
|
302 | - self::$builtInFormats[40] = '#,##0.00_);[Red](#,##0.00)'; // Despite ECMA '#,##0.00;[Red](#,##0.00)'; |
|
299 | + self::$builtInFormats[37] = '#,##0_);(#,##0)'; // Despite ECMA '#,##0 ;(#,##0)'; |
|
300 | + self::$builtInFormats[38] = '#,##0_);[Red](#,##0)'; // Despite ECMA '#,##0 ;[Red](#,##0)'; |
|
301 | + self::$builtInFormats[39] = '#,##0.00_);(#,##0.00)'; // Despite ECMA '#,##0.00;(#,##0.00)'; |
|
302 | + self::$builtInFormats[40] = '#,##0.00_);[Red](#,##0.00)'; // Despite ECMA '#,##0.00;[Red](#,##0.00)'; |
|
303 | 303 | |
304 | 304 | self::$builtInFormats[44] = '_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)'; |
305 | 305 | self::$builtInFormats[45] = 'mm:ss'; |
306 | 306 | self::$builtInFormats[46] = '[h]:mm:ss'; |
307 | - self::$builtInFormats[47] = 'mm:ss.0'; // Despite ECMA 'mmss.0'; |
|
307 | + self::$builtInFormats[47] = 'mm:ss.0'; // Despite ECMA 'mmss.0'; |
|
308 | 308 | self::$builtInFormats[48] = '##0.0E+0'; |
309 | 309 | self::$builtInFormats[49] = '@'; |
310 | 310 |
@@ -2962,7 +2962,7 @@ discard block |
||
2962 | 2962 | if ($this->getCodeName() == $pValue) { |
2963 | 2963 | return $this; |
2964 | 2964 | } |
2965 | - $pValue = str_replace(' ', '_', $pValue);//Excel does this automatically without flinching, we are doing the same |
|
2965 | + $pValue = str_replace(' ', '_', $pValue); //Excel does this automatically without flinching, we are doing the same |
|
2966 | 2966 | // Syntax check |
2967 | 2967 | // throw an exception if not valid |
2968 | 2968 | self::checkSheetCodeName($pValue); |
@@ -2991,7 +2991,7 @@ discard block |
||
2991 | 2991 | } |
2992 | 2992 | } |
2993 | 2993 | |
2994 | - $pValue = $pValue . '_' . $i;// ok, we have a valid name |
|
2994 | + $pValue = $pValue . '_' . $i; // ok, we have a valid name |
|
2995 | 2995 | //codeName is'nt used in formula : no need to call for an update |
2996 | 2996 | //return $this->setTitle($altTitle, $updateFormulaCellReferences); |
2997 | 2997 | } |
@@ -33,10 +33,10 @@ discard block |
||
33 | 33 | private static $height = 480; |
34 | 34 | |
35 | 35 | private static $colourSet = [ |
36 | - 'mediumpurple1', 'palegreen3', 'gold1', 'cadetblue1', |
|
37 | - 'darkmagenta', 'coral', 'dodgerblue3', 'eggplant', |
|
38 | - 'mediumblue', 'magenta', 'sandybrown', 'cyan', |
|
39 | - 'firebrick1', 'forestgreen', 'deeppink4', 'darkolivegreen', |
|
36 | + 'mediumpurple1', 'palegreen3', 'gold1', 'cadetblue1', |
|
37 | + 'darkmagenta', 'coral', 'dodgerblue3', 'eggplant', |
|
38 | + 'mediumblue', 'magenta', 'sandybrown', 'cyan', |
|
39 | + 'firebrick1', 'forestgreen', 'deeppink4', 'darkolivegreen', |
|
40 | 40 | 'goldenrod2', |
41 | 41 | ]; |
42 | 42 | |
@@ -178,21 +178,21 @@ discard block |
||
178 | 178 | $legendOverlay = $legend->getOverlay(); |
179 | 179 | switch ($legendPosition) { |
180 | 180 | case 'r': |
181 | - $this->graph->legend->SetPos(0.01, 0.5, 'right', 'center'); // right |
|
181 | + $this->graph->legend->SetPos(0.01, 0.5, 'right', 'center'); // right |
|
182 | 182 | $this->graph->legend->SetColumns(1); |
183 | 183 | break; |
184 | 184 | case 'l': |
185 | - $this->graph->legend->SetPos(0.01, 0.5, 'left', 'center'); // left |
|
185 | + $this->graph->legend->SetPos(0.01, 0.5, 'left', 'center'); // left |
|
186 | 186 | $this->graph->legend->SetColumns(1); |
187 | 187 | break; |
188 | 188 | case 't': |
189 | - $this->graph->legend->SetPos(0.5, 0.01, 'center', 'top'); // top |
|
189 | + $this->graph->legend->SetPos(0.5, 0.01, 'center', 'top'); // top |
|
190 | 190 | break; |
191 | 191 | case 'b': |
192 | - $this->graph->legend->SetPos(0.5, 0.99, 'center', 'bottom'); // bottom |
|
192 | + $this->graph->legend->SetPos(0.5, 0.99, 'center', 'bottom'); // bottom |
|
193 | 193 | break; |
194 | 194 | default: |
195 | - $this->graph->legend->SetPos(0.01, 0.01, 'right', 'top'); // top-right |
|
195 | + $this->graph->legend->SetPos(0.01, 0.01, 'right', 'top'); // top-right |
|
196 | 196 | $this->graph->legend->SetColumns(1); |
197 | 197 | break; |
198 | 198 | } |
@@ -29,12 +29,12 @@ |
||
29 | 29 | class Legend |
30 | 30 | { |
31 | 31 | /** Legend positions */ |
32 | - const XL_LEGEND_POSITION_BOTTOM = -4107; // Below the chart. |
|
33 | - const XL_LEGEND_POSITION_CORNER = 2; // In the upper right-hand corner of the chart border. |
|
34 | - const XL_LEGEND_POSITION_CUSTOM = -4161; // A custom position. |
|
35 | - const XL_LEGEND_POSITION_LEFT = -4131; // Left of the chart. |
|
36 | - const XL_LEGEND_POSITION_RIGHT = -4152; // Right of the chart. |
|
37 | - const XL_LEGEND_POSITION_TOP = -4160; // Above the chart. |
|
32 | + const XL_LEGEND_POSITION_BOTTOM = -4107; // Below the chart. |
|
33 | + const XL_LEGEND_POSITION_CORNER = 2; // In the upper right-hand corner of the chart border. |
|
34 | + const XL_LEGEND_POSITION_CUSTOM = -4161; // A custom position. |
|
35 | + const XL_LEGEND_POSITION_LEFT = -4131; // Left of the chart. |
|
36 | + const XL_LEGEND_POSITION_RIGHT = -4152; // Right of the chart. |
|
37 | + const XL_LEGEND_POSITION_TOP = -4160; // Above the chart. |
|
38 | 38 | |
39 | 39 | const POSITION_RIGHT = 'r'; |
40 | 40 | const POSITION_LEFT = 'l'; |
@@ -35,14 +35,14 @@ |
||
35 | 35 | const TYPE_PIECHART = 'pieChart'; |
36 | 36 | const TYPE_PIECHART_3D = 'pie3DChart'; |
37 | 37 | const TYPE_DOUGHTNUTCHART = 'doughnutChart'; |
38 | - const TYPE_DONUTCHART = self::TYPE_DOUGHTNUTCHART; // Synonym |
|
38 | + const TYPE_DONUTCHART = self::TYPE_DOUGHTNUTCHART; // Synonym |
|
39 | 39 | const TYPE_SCATTERCHART = 'scatterChart'; |
40 | 40 | const TYPE_SURFACECHART = 'surfaceChart'; |
41 | 41 | const TYPE_SURFACECHART_3D = 'surface3DChart'; |
42 | 42 | const TYPE_RADARCHART = 'radarChart'; |
43 | 43 | const TYPE_BUBBLECHART = 'bubbleChart'; |
44 | 44 | const TYPE_STOCKCHART = 'stockChart'; |
45 | - const TYPE_CANDLECHART = self::TYPE_STOCKCHART; // Synonym |
|
45 | + const TYPE_CANDLECHART = self::TYPE_STOCKCHART; // Synonym |
|
46 | 46 | |
47 | 47 | const GROUPING_CLUSTERED = 'clustered'; |
48 | 48 | const GROUPING_STACKED = 'stacked'; |
@@ -520,8 +520,8 @@ |
||
520 | 520 | ]; |
521 | 521 | |
522 | 522 | // Define lower and upper region break-points. |
523 | - $p_low = 0.02425; //Use lower region approx. below this |
|
524 | - $p_high = 1 - $p_low; //Use upper region approx. above this |
|
523 | + $p_low = 0.02425; //Use lower region approx. below this |
|
524 | + $p_high = 1 - $p_low; //Use upper region approx. above this |
|
525 | 525 | |
526 | 526 | if (0 < $p && $p < $p_low) { |
527 | 527 | // Rational approximation for lower region. |