@@ 4496-4505 (lines=10) @@ | ||
4493 | ||
4494 | // bit: 0-3; mask: 0x0000000F; type |
|
4495 | $type = (0x0000000F & $options) >> 0; |
|
4496 | switch ($type) { |
|
4497 | case 0x00: $type = PHPExcel_Cell_DataValidation::TYPE_NONE; break; |
|
4498 | case 0x01: $type = PHPExcel_Cell_DataValidation::TYPE_WHOLE; break; |
|
4499 | case 0x02: $type = PHPExcel_Cell_DataValidation::TYPE_DECIMAL; break; |
|
4500 | case 0x03: $type = PHPExcel_Cell_DataValidation::TYPE_LIST; break; |
|
4501 | case 0x04: $type = PHPExcel_Cell_DataValidation::TYPE_DATE; break; |
|
4502 | case 0x05: $type = PHPExcel_Cell_DataValidation::TYPE_TIME; break; |
|
4503 | case 0x06: $type = PHPExcel_Cell_DataValidation::TYPE_TEXTLENGTH; break; |
|
4504 | case 0x07: $type = PHPExcel_Cell_DataValidation::TYPE_CUSTOM; break; |
|
4505 | } |
|
4506 | ||
4507 | // bit: 4-6; mask: 0x00000070; error type |
|
4508 | $errorStyle = (0x00000070 & $options) >> 4; |
|
@@ 4533-4542 (lines=10) @@ | ||
4530 | ||
4531 | // bit: 20-23; mask: 0x00F00000; condition operator |
|
4532 | $operator = (0x00F00000 & $options) >> 20; |
|
4533 | switch ($operator) { |
|
4534 | case 0x00: $operator = PHPExcel_Cell_DataValidation::OPERATOR_BETWEEN ; break; |
|
4535 | case 0x01: $operator = PHPExcel_Cell_DataValidation::OPERATOR_NOTBETWEEN ; break; |
|
4536 | case 0x02: $operator = PHPExcel_Cell_DataValidation::OPERATOR_EQUAL ; break; |
|
4537 | case 0x03: $operator = PHPExcel_Cell_DataValidation::OPERATOR_NOTEQUAL ; break; |
|
4538 | case 0x04: $operator = PHPExcel_Cell_DataValidation::OPERATOR_GREATERTHAN ; break; |
|
4539 | case 0x05: $operator = PHPExcel_Cell_DataValidation::OPERATOR_LESSTHAN ; break; |
|
4540 | case 0x06: $operator = PHPExcel_Cell_DataValidation::OPERATOR_GREATERTHANOREQUAL; break; |
|
4541 | case 0x07: $operator = PHPExcel_Cell_DataValidation::OPERATOR_LESSTHANOREQUAL ; break; |
|
4542 | } |
|
4543 | ||
4544 | // offset: 4; size: var; title of the prompt box |
|
4545 | $offset = 4; |
@@ 2770-2779 (lines=10) @@ | ||
2767 | ||
2768 | // data type |
|
2769 | $type = $dataValidation->getType(); |
|
2770 | switch ($type) { |
|
2771 | case PHPExcel_Cell_DataValidation::TYPE_NONE: $type = 0x00; break; |
|
2772 | case PHPExcel_Cell_DataValidation::TYPE_WHOLE: $type = 0x01; break; |
|
2773 | case PHPExcel_Cell_DataValidation::TYPE_DECIMAL: $type = 0x02; break; |
|
2774 | case PHPExcel_Cell_DataValidation::TYPE_LIST: $type = 0x03; break; |
|
2775 | case PHPExcel_Cell_DataValidation::TYPE_DATE: $type = 0x04; break; |
|
2776 | case PHPExcel_Cell_DataValidation::TYPE_TIME: $type = 0x05; break; |
|
2777 | case PHPExcel_Cell_DataValidation::TYPE_TEXTLENGTH: $type = 0x06; break; |
|
2778 | case PHPExcel_Cell_DataValidation::TYPE_CUSTOM: $type = 0x07; break; |
|
2779 | } |
|
2780 | $options |= $type << 0; |
|
2781 | ||
2782 | // error style |
|
@@ 2810-2819 (lines=10) @@ | ||
2807 | ||
2808 | // condition operator |
|
2809 | $operator = $dataValidation->getOperator(); |
|
2810 | switch ($operator) { |
|
2811 | case PHPExcel_Cell_DataValidation::OPERATOR_BETWEEN: $operator = 0x00 ; break; |
|
2812 | case PHPExcel_Cell_DataValidation::OPERATOR_NOTBETWEEN: $operator = 0x01 ; break; |
|
2813 | case PHPExcel_Cell_DataValidation::OPERATOR_EQUAL: $operator = 0x02 ; break; |
|
2814 | case PHPExcel_Cell_DataValidation::OPERATOR_NOTEQUAL: $operator = 0x03 ; break; |
|
2815 | case PHPExcel_Cell_DataValidation::OPERATOR_GREATERTHAN: $operator = 0x04 ; break; |
|
2816 | case PHPExcel_Cell_DataValidation::OPERATOR_LESSTHAN: $operator = 0x05 ; break; |
|
2817 | case PHPExcel_Cell_DataValidation::OPERATOR_GREATERTHANOREQUAL: $operator = 0x06; break; |
|
2818 | case PHPExcel_Cell_DataValidation::OPERATOR_LESSTHANOREQUAL: $operator = 0x07 ; break; |
|
2819 | } |
|
2820 | $options |= $operator << 20; |
|
2821 | ||
2822 | $data = pack('V', $options); |