For God so loved the world, that He gave His only begotten Son, that all who believe in Him should not perish but have everlasting life
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.5 KiB

  1. <?php
  2. class PHPExcel_Reader_Excel5_Style_FillPattern
  3. {
  4. protected static $map = array(
  5. 0x00 => PHPExcel_Style_Fill::FILL_NONE,
  6. 0x01 => PHPExcel_Style_Fill::FILL_SOLID,
  7. 0x02 => PHPExcel_Style_Fill::FILL_PATTERN_MEDIUMGRAY,
  8. 0x03 => PHPExcel_Style_Fill::FILL_PATTERN_DARKGRAY,
  9. 0x04 => PHPExcel_Style_Fill::FILL_PATTERN_LIGHTGRAY,
  10. 0x05 => PHPExcel_Style_Fill::FILL_PATTERN_DARKHORIZONTAL,
  11. 0x06 => PHPExcel_Style_Fill::FILL_PATTERN_DARKVERTICAL,
  12. 0x07 => PHPExcel_Style_Fill::FILL_PATTERN_DARKDOWN,
  13. 0x08 => PHPExcel_Style_Fill::FILL_PATTERN_DARKUP,
  14. 0x09 => PHPExcel_Style_Fill::FILL_PATTERN_DARKGRID,
  15. 0x0A => PHPExcel_Style_Fill::FILL_PATTERN_DARKTRELLIS,
  16. 0x0B => PHPExcel_Style_Fill::FILL_PATTERN_LIGHTHORIZONTAL,
  17. 0x0C => PHPExcel_Style_Fill::FILL_PATTERN_LIGHTVERTICAL,
  18. 0x0D => PHPExcel_Style_Fill::FILL_PATTERN_LIGHTDOWN,
  19. 0x0E => PHPExcel_Style_Fill::FILL_PATTERN_LIGHTUP,
  20. 0x0F => PHPExcel_Style_Fill::FILL_PATTERN_LIGHTGRID,
  21. 0x10 => PHPExcel_Style_Fill::FILL_PATTERN_LIGHTTRELLIS,
  22. 0x11 => PHPExcel_Style_Fill::FILL_PATTERN_GRAY125,
  23. 0x12 => PHPExcel_Style_Fill::FILL_PATTERN_GRAY0625,
  24. );
  25. /**
  26. * Get fill pattern from index
  27. * OpenOffice documentation: 2.5.12
  28. *
  29. * @param int $index
  30. * @return string
  31. */
  32. public static function lookup($index)
  33. {
  34. if (isset(self::$map[$index])) {
  35. return self::$map[$index];
  36. }
  37. return PHPExcel_Style_Fill::FILL_NONE;
  38. }
  39. }