@@ -137,8 +137,7 @@ |
||
137 | 137 | $this->rotation = 0; |
138 | 138 | $this->shadow = new Drawing\Shadow(); |
139 | 139 | |
140 | - // Set image index |
|
141 | - ++self::$imageCounter; |
|
140 | + // Set image index++self::$imageCounter; |
|
142 | 141 | $this->imageIndex = self::$imageCounter; |
143 | 142 | } |
144 | 143 |
@@ -4,53 +4,53 @@ |
||
4 | 4 | |
5 | 5 | return [ |
6 | 6 | [ |
7 | - 19, // Result for Excel |
|
8 | - 19, // Result for OpenOffice |
|
7 | + 19, // Result for Excel |
|
8 | + 19, // Result for OpenOffice |
|
9 | 9 | 22269, |
10 | 10 | ], |
11 | 11 | [ |
12 | - 1, // Result for Excel |
|
13 | - 1, // Result for OpenOffice |
|
12 | + 1, // Result for Excel |
|
13 | + 1, // Result for OpenOffice |
|
14 | 14 | 30348, |
15 | 15 | ], |
16 | 16 | [ |
17 | - 10, // Result for Excel |
|
18 | - 10, // Result for OpenOffice |
|
17 | + 10, // Result for Excel |
|
18 | + 10, // Result for OpenOffice |
|
19 | 19 | 30843, |
20 | 20 | ], |
21 | 21 | [ |
22 | - 11, // Result for Excel |
|
23 | - 11, // Result for OpenOffice |
|
22 | + 11, // Result for Excel |
|
23 | + 11, // Result for OpenOffice |
|
24 | 24 | '11-Nov-1918', |
25 | 25 | ], |
26 | 26 | [ |
27 | - 28, // Result for Excel |
|
28 | - 28, // Result for OpenOffice |
|
27 | + 28, // Result for Excel |
|
28 | + 28, // Result for OpenOffice |
|
29 | 29 | '28-Feb-1904', |
30 | 30 | ], |
31 | 31 | [ |
32 | - '#VALUE!', // Result for Excel |
|
33 | - '#VALUE!', // Result for OpenOffice |
|
32 | + '#VALUE!', // Result for Excel |
|
33 | + '#VALUE!', // Result for OpenOffice |
|
34 | 34 | 'Invalid', |
35 | 35 | ], |
36 | 36 | [ |
37 | - '#NUM!', // Result for Excel |
|
38 | - 29, // Result for OpenOffice |
|
37 | + '#NUM!', // Result for Excel |
|
38 | + 29, // Result for OpenOffice |
|
39 | 39 | -1, |
40 | 40 | ], |
41 | 41 | [ |
42 | - 1, // Result for Excel |
|
43 | - 31, // Result for OpenOffice |
|
42 | + 1, // Result for Excel |
|
43 | + 31, // Result for OpenOffice |
|
44 | 44 | 1, |
45 | 45 | ], |
46 | 46 | [ |
47 | - 0, // Result for Excel |
|
48 | - 30, // Result for OpenOffice |
|
47 | + 0, // Result for Excel |
|
48 | + 30, // Result for OpenOffice |
|
49 | 49 | 0.5, |
50 | 50 | ], |
51 | 51 | [ |
52 | - 0, // Result for Excel |
|
53 | - 30, // Result for OpenOffice |
|
52 | + 0, // Result for Excel |
|
53 | + 30, // Result for OpenOffice |
|
54 | 54 | 0, |
55 | 55 | ], |
56 | 56 | ]; |
@@ -210,12 +210,12 @@ discard block |
||
210 | 210 | $zip = new ZipArchive(); |
211 | 211 | |
212 | 212 | if (file_exists($pFilename)) { |
213 | - // Added by [email protected] |
|
214 | - // '@' will stop displaying "Resource Unavailable" error because of file is open some where. |
|
215 | - // 'unlink($pFilename) !== true' will check if file is deleted successfully. |
|
216 | - // Throwing exception so that we can handle error easily instead of displaying to users. |
|
213 | + // Added by [email protected] |
|
214 | + // '@' will stop displaying "Resource Unavailable" error because of file is open some where. |
|
215 | + // 'unlink($pFilename) !== true' will check if file is deleted successfully. |
|
216 | + // Throwing exception so that we can handle error easily instead of displaying to users. |
|
217 | 217 | if( @unlink($pFilename) !== true ) |
218 | - throw new WriterException('Could not delete file: ' . $pFilename . ' Please close all applications that are using it.'); |
|
218 | + throw new WriterException('Could not delete file: ' . $pFilename . ' Please close all applications that are using it.'); |
|
219 | 219 | } |
220 | 220 | // Try opening the ZIP file |
221 | 221 | if ($zip->open($pFilename, ZipArchive::OVERWRITE) !== true) { |
@@ -411,8 +411,8 @@ discard block |
||
411 | 411 | } |
412 | 412 | @unlink($pFilename); |
413 | 413 | } |
414 | - return true; |
|
415 | - // Return True to make sure that file is created successfully with no ExceptionsAdded by [email protected] |
|
414 | + return true; |
|
415 | + // Return True to make sure that file is created successfully with no ExceptionsAdded by [email protected] |
|
416 | 416 | } else { |
417 | 417 | throw new WriterException('PhpSpreadsheet object unassigned.'); |
418 | 418 | } |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | // '@' will stop displaying "Resource Unavailable" error because of file is open some where. |
215 | 215 | // 'unlink($pFilename) !== true' will check if file is deleted successfully. |
216 | 216 | // Throwing exception so that we can handle error easily instead of displaying to users. |
217 | - if( @unlink($pFilename) !== true ) |
|
217 | + if (@unlink($pFilename) !== true) |
|
218 | 218 | throw new WriterException('Could not delete file: ' . $pFilename . ' Please close all applications that are using it.'); |
219 | 219 | } |
220 | 220 | // Try opening the ZIP file |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | Calculation::getInstance($this->spreadSheet)->getDebugLog()->setWriteDebugLog($saveDebugLog); |
401 | 401 | |
402 | 402 | // Close file |
403 | - if ( @$zip->close() === false ) { // updated by [email protected] |
|
403 | + if (@$zip->close() === false) { // updated by [email protected] |
|
404 | 404 | throw new WriterException("Could not close zip file $pFilename."); |
405 | 405 | } |
406 | 406 |
@@ -214,8 +214,9 @@ |
||
214 | 214 | // '@' will stop displaying "Resource Unavailable" error because of file is open some where. |
215 | 215 | // 'unlink($pFilename) !== true' will check if file is deleted successfully. |
216 | 216 | // Throwing exception so that we can handle error easily instead of displaying to users. |
217 | - if( @unlink($pFilename) !== true ) |
|
218 | - throw new WriterException('Could not delete file: ' . $pFilename . ' Please close all applications that are using it.'); |
|
217 | + if( @unlink($pFilename) !== true ) { |
|
218 | + throw new WriterException('Could not delete file: ' . $pFilename . ' Please close all applications that are using it.'); |
|
219 | + } |
|
219 | 220 | } |
220 | 221 | // Try opening the ZIP file |
221 | 222 | if ($zip->open($pFilename, ZipArchive::OVERWRITE) !== true) { |