Border.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. class PHPExcel_Reader_Excel5_Style_Border
  3. {
  4. protected static $map = array(
  5. 0x00 => PHPExcel_Style_Border::BORDER_NONE,
  6. 0x01 => PHPExcel_Style_Border::BORDER_THIN,
  7. 0x02 => PHPExcel_Style_Border::BORDER_MEDIUM,
  8. 0x03 => PHPExcel_Style_Border::BORDER_DASHED,
  9. 0x04 => PHPExcel_Style_Border::BORDER_DOTTED,
  10. 0x05 => PHPExcel_Style_Border::BORDER_THICK,
  11. 0x06 => PHPExcel_Style_Border::BORDER_DOUBLE,
  12. 0x07 => PHPExcel_Style_Border::BORDER_HAIR,
  13. 0x08 => PHPExcel_Style_Border::BORDER_MEDIUMDASHED,
  14. 0x09 => PHPExcel_Style_Border::BORDER_DASHDOT,
  15. 0x0A => PHPExcel_Style_Border::BORDER_MEDIUMDASHDOT,
  16. 0x0B => PHPExcel_Style_Border::BORDER_DASHDOTDOT,
  17. 0x0C => PHPExcel_Style_Border::BORDER_MEDIUMDASHDOTDOT,
  18. 0x0D => PHPExcel_Style_Border::BORDER_SLANTDASHDOT,
  19. );
  20. /**
  21. * Map border style
  22. * OpenOffice documentation: 2.5.11
  23. *
  24. * @param int $index
  25. * @return string
  26. */
  27. public static function lookup($index)
  28. {
  29. if (isset(self::$map[$index])) {
  30. return self::$map[$index];
  31. }
  32. return PHPExcel_Style_Border::BORDER_NONE;
  33. }
  34. }