diff options
Diffstat (limited to '')
-rw-r--r-- | vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Style/Border.php | 42 | ||||
-rw-r--r-- | vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Style/FillPattern.php | 47 |
2 files changed, 89 insertions, 0 deletions
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Style/Border.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Style/Border.php new file mode 100644 index 0000000..ca98581 --- /dev/null +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Style/Border.php @@ -0,0 +1,42 @@ +<?php
+
+namespace PhpOffice\PhpSpreadsheet\Reader\Xls\Style;
+
+use PhpOffice\PhpSpreadsheet\Style\Border as StyleBorder;
+
+class Border
+{
+ protected static $map = [
+ 0x00 => StyleBorder::BORDER_NONE,
+ 0x01 => StyleBorder::BORDER_THIN,
+ 0x02 => StyleBorder::BORDER_MEDIUM,
+ 0x03 => StyleBorder::BORDER_DASHED,
+ 0x04 => StyleBorder::BORDER_DOTTED,
+ 0x05 => StyleBorder::BORDER_THICK,
+ 0x06 => StyleBorder::BORDER_DOUBLE,
+ 0x07 => StyleBorder::BORDER_HAIR,
+ 0x08 => StyleBorder::BORDER_MEDIUMDASHED,
+ 0x09 => StyleBorder::BORDER_DASHDOT,
+ 0x0A => StyleBorder::BORDER_MEDIUMDASHDOT,
+ 0x0B => StyleBorder::BORDER_DASHDOTDOT,
+ 0x0C => StyleBorder::BORDER_MEDIUMDASHDOTDOT,
+ 0x0D => StyleBorder::BORDER_SLANTDASHDOT,
+ ];
+
+ /**
+ * Map border style
+ * OpenOffice documentation: 2.5.11.
+ *
+ * @param int $index
+ *
+ * @return string
+ */
+ public static function lookup($index)
+ {
+ if (isset(self::$map[$index])) {
+ return self::$map[$index];
+ }
+
+ return StyleBorder::BORDER_NONE;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Style/FillPattern.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Style/FillPattern.php new file mode 100644 index 0000000..77e0520 --- /dev/null +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Style/FillPattern.php @@ -0,0 +1,47 @@ +<?php
+
+namespace PhpOffice\PhpSpreadsheet\Reader\Xls\Style;
+
+use PhpOffice\PhpSpreadsheet\Style\Fill;
+
+class FillPattern
+{
+ protected static $map = [
+ 0x00 => Fill::FILL_NONE,
+ 0x01 => Fill::FILL_SOLID,
+ 0x02 => Fill::FILL_PATTERN_MEDIUMGRAY,
+ 0x03 => Fill::FILL_PATTERN_DARKGRAY,
+ 0x04 => Fill::FILL_PATTERN_LIGHTGRAY,
+ 0x05 => Fill::FILL_PATTERN_DARKHORIZONTAL,
+ 0x06 => Fill::FILL_PATTERN_DARKVERTICAL,
+ 0x07 => Fill::FILL_PATTERN_DARKDOWN,
+ 0x08 => Fill::FILL_PATTERN_DARKUP,
+ 0x09 => Fill::FILL_PATTERN_DARKGRID,
+ 0x0A => Fill::FILL_PATTERN_DARKTRELLIS,
+ 0x0B => Fill::FILL_PATTERN_LIGHTHORIZONTAL,
+ 0x0C => Fill::FILL_PATTERN_LIGHTVERTICAL,
+ 0x0D => Fill::FILL_PATTERN_LIGHTDOWN,
+ 0x0E => Fill::FILL_PATTERN_LIGHTUP,
+ 0x0F => Fill::FILL_PATTERN_LIGHTGRID,
+ 0x10 => Fill::FILL_PATTERN_LIGHTTRELLIS,
+ 0x11 => Fill::FILL_PATTERN_GRAY125,
+ 0x12 => Fill::FILL_PATTERN_GRAY0625,
+ ];
+
+ /**
+ * Get fill pattern from index
+ * OpenOffice documentation: 2.5.12.
+ *
+ * @param int $index
+ *
+ * @return string
+ */
+ public static function lookup($index)
+ {
+ if (isset(self::$map[$index])) {
+ return self::$map[$index];
+ }
+
+ return Fill::FILL_NONE;
+ }
+}
|