@@ 4689-4699 (lines=11) @@ | ||
4686 | ||
4687 | // bit: 4-6; mask: 0x00000070; error type |
|
4688 | $errorStyle = (0x00000070 & $options) >> 4; |
|
4689 | switch ($errorStyle) { |
|
4690 | case 0x00: |
|
4691 | $errorStyle = \PhpSpreadsheet\Cell\DataValidation::STYLE_STOP; |
|
4692 | break; |
|
4693 | case 0x01: |
|
4694 | $errorStyle = \PhpSpreadsheet\Cell\DataValidation::STYLE_WARNING; |
|
4695 | break; |
|
4696 | case 0x02: |
|
4697 | $errorStyle = \PhpSpreadsheet\Cell\DataValidation::STYLE_INFORMATION; |
|
4698 | break; |
|
4699 | } |
|
4700 | ||
4701 | // bit: 7; mask: 0x00000080; 1= formula is explicit (only applies to list) |
|
4702 | // I have only seen cases where this is 1 |
@@ 2817-2827 (lines=11) @@ | ||
2814 | ||
2815 | // error style |
|
2816 | $errorStyle = $dataValidation->getType(); |
|
2817 | switch ($errorStyle) { |
|
2818 | case \PhpSpreadsheet\Cell\DataValidation::STYLE_STOP: |
|
2819 | $errorStyle = 0x00; |
|
2820 | break; |
|
2821 | case \PhpSpreadsheet\Cell\DataValidation::STYLE_WARNING: |
|
2822 | $errorStyle = 0x01; |
|
2823 | break; |
|
2824 | case \PhpSpreadsheet\Cell\DataValidation::STYLE_INFORMATION: |
|
2825 | $errorStyle = 0x02; |
|
2826 | break; |
|
2827 | } |
|
2828 | $options |= $errorStyle << 4; |
|
2829 | ||
2830 | // explicit formula? |