@@ 2844-2854 (lines=11) @@ | ||
2841 | ||
2842 | // error style |
|
2843 | $errorStyle = $dataValidation->getType(); |
|
2844 | switch ($errorStyle) { |
|
2845 | case \PhpOffice\PhpSpreadsheet\Cell\DataValidation::STYLE_STOP: |
|
2846 | $errorStyle = 0x00; |
|
2847 | break; |
|
2848 | case \PhpOffice\PhpSpreadsheet\Cell\DataValidation::STYLE_WARNING: |
|
2849 | $errorStyle = 0x01; |
|
2850 | break; |
|
2851 | case \PhpOffice\PhpSpreadsheet\Cell\DataValidation::STYLE_INFORMATION: |
|
2852 | $errorStyle = 0x02; |
|
2853 | break; |
|
2854 | } |
|
2855 | $options |= $errorStyle << 4; |
|
2856 | ||
2857 | // explicit formula? |
@@ 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 |