@@ 4651-4661 (lines=11) @@ | ||
4648 | ||
4649 | // bit: 4-6; mask: 0x00000070; error type |
|
4650 | $errorStyle = (0x00000070 & $options) >> 4; |
|
4651 | switch ($errorStyle) { |
|
4652 | case 0x00: |
|
4653 | $errorStyle = \PhpOffice\PhpSpreadsheet\Cell\DataValidation::STYLE_STOP; |
|
4654 | break; |
|
4655 | case 0x01: |
|
4656 | $errorStyle = \PhpOffice\PhpSpreadsheet\Cell\DataValidation::STYLE_WARNING; |
|
4657 | break; |
|
4658 | case 0x02: |
|
4659 | $errorStyle = \PhpOffice\PhpSpreadsheet\Cell\DataValidation::STYLE_INFORMATION; |
|
4660 | break; |
|
4661 | } |
|
4662 | ||
4663 | // bit: 7; mask: 0x00000080; 1= formula is explicit (only applies to list) |
|
4664 | // I have only seen cases where this is 1 |
@@ 2802-2812 (lines=11) @@ | ||
2799 | ||
2800 | // error style |
|
2801 | $errorStyle = $dataValidation->getType(); |
|
2802 | switch ($errorStyle) { |
|
2803 | case \PhpOffice\PhpSpreadsheet\Cell\DataValidation::STYLE_STOP: |
|
2804 | $errorStyle = 0x00; |
|
2805 | break; |
|
2806 | case \PhpOffice\PhpSpreadsheet\Cell\DataValidation::STYLE_WARNING: |
|
2807 | $errorStyle = 0x01; |
|
2808 | break; |
|
2809 | case \PhpOffice\PhpSpreadsheet\Cell\DataValidation::STYLE_INFORMATION: |
|
2810 | $errorStyle = 0x02; |
|
2811 | break; |
|
2812 | } |
|
2813 | $options |= $errorStyle << 4; |
|
2814 | ||
2815 | // explicit formula? |