@@ 4654-4664 (lines=11) @@ | ||
4651 | ||
4652 | // bit: 4-6; mask: 0x00000070; error type |
|
4653 | $errorStyle = (0x00000070 & $options) >> 4; |
|
4654 | switch ($errorStyle) { |
|
4655 | case 0x00: |
|
4656 | $errorStyle = \PhpOffice\PhpSpreadsheet\Cell\DataValidation::STYLE_STOP; |
|
4657 | break; |
|
4658 | case 0x01: |
|
4659 | $errorStyle = \PhpOffice\PhpSpreadsheet\Cell\DataValidation::STYLE_WARNING; |
|
4660 | break; |
|
4661 | case 0x02: |
|
4662 | $errorStyle = \PhpOffice\PhpSpreadsheet\Cell\DataValidation::STYLE_INFORMATION; |
|
4663 | break; |
|
4664 | } |
|
4665 | ||
4666 | // bit: 7; mask: 0x00000080; 1= formula is explicit (only applies to list) |
|
4667 | // I have only seen cases where this is 1 |
@@ 2842-2852 (lines=11) @@ | ||
2839 | ||
2840 | // error style |
|
2841 | $errorStyle = $dataValidation->getType(); |
|
2842 | switch ($errorStyle) { |
|
2843 | case \PhpOffice\PhpSpreadsheet\Cell\DataValidation::STYLE_STOP: |
|
2844 | $errorStyle = 0x00; |
|
2845 | break; |
|
2846 | case \PhpOffice\PhpSpreadsheet\Cell\DataValidation::STYLE_WARNING: |
|
2847 | $errorStyle = 0x01; |
|
2848 | break; |
|
2849 | case \PhpOffice\PhpSpreadsheet\Cell\DataValidation::STYLE_INFORMATION: |
|
2850 | $errorStyle = 0x02; |
|
2851 | break; |
|
2852 | } |
|
2853 | $options |= $errorStyle << 4; |
|
2854 | ||
2855 | // explicit formula? |