@@ 4666-4676 (lines=11) @@ | ||
4663 | ||
4664 | // bit: 4-6; mask: 0x00000070; error type |
|
4665 | $errorStyle = (0x00000070 & $options) >> 4; |
|
4666 | switch ($errorStyle) { |
|
4667 | case 0x00: |
|
4668 | $errorStyle = \PhpOffice\PhpSpreadsheet\Cell\DataValidation::STYLE_STOP; |
|
4669 | break; |
|
4670 | case 0x01: |
|
4671 | $errorStyle = \PhpOffice\PhpSpreadsheet\Cell\DataValidation::STYLE_WARNING; |
|
4672 | break; |
|
4673 | case 0x02: |
|
4674 | $errorStyle = \PhpOffice\PhpSpreadsheet\Cell\DataValidation::STYLE_INFORMATION; |
|
4675 | break; |
|
4676 | } |
|
4677 | ||
4678 | // bit: 7; mask: 0x00000080; 1= formula is explicit (only applies to list) |
|
4679 | // I have only seen cases where this is 1 |
@@ 2845-2855 (lines=11) @@ | ||
2842 | ||
2843 | // error style |
|
2844 | $errorStyle = $dataValidation->getErrorStyle(); |
|
2845 | switch ($errorStyle) { |
|
2846 | case \PhpOffice\PhpSpreadsheet\Cell\DataValidation::STYLE_STOP: |
|
2847 | $errorStyle = 0x00; |
|
2848 | break; |
|
2849 | case \PhpOffice\PhpSpreadsheet\Cell\DataValidation::STYLE_WARNING: |
|
2850 | $errorStyle = 0x01; |
|
2851 | break; |
|
2852 | case \PhpOffice\PhpSpreadsheet\Cell\DataValidation::STYLE_INFORMATION: |
|
2853 | $errorStyle = 0x02; |
|
2854 | break; |
|
2855 | } |
|
2856 | ||
2857 | $options |= $errorStyle << 4; |
|
2858 |