Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 65... Línea 65...
65
 
65
 
66
    /** @var array<int, bool> Cache containing a mapping NUM_FMT_ID => IS_DATE_FORMAT. Used to avoid lots of recalculations */
66
    /** @var array<int, bool> Cache containing a mapping NUM_FMT_ID => IS_DATE_FORMAT. Used to avoid lots of recalculations */
Línea 67... Línea 67...
67
    private array $numFmtIdToIsDateFormatCache = [];
67
    private array $numFmtIdToIsDateFormatCache = [];
68
 
68
 
69
    /**
-
 
70
     * @param string  $filePath          Path of the XLSX file being read
69
    /**
71
     * @param ?string $stylesXMLFilePath
70
     * @param string $filePath Path of the XLSX file being read
72
     */
71
     */
73
    public function __construct(string $filePath, ?string $stylesXMLFilePath)
72
    public function __construct(string $filePath, ?string $stylesXMLFilePath)
74
    {
73
    {
Línea 96... Línea 95...
96
        return $this->doesStyleIndicateDate($styleAttributes);
95
        return $this->doesStyleIndicateDate($styleAttributes);
97
    }
96
    }
Línea 98... Línea 97...
98
 
97
 
99
    public function getNumberFormatCode(int $styleId): string
98
    public function getNumberFormatCode(int $styleId): string
-
 
99
    {
-
 
100
        if (null === $this->stylesXMLFilePath) {
-
 
101
            return '';
-
 
102
        }
100
    {
103
 
-
 
104
        $stylesAttributes = $this->getStylesAttributes();
-
 
105
 
-
 
106
        if (!isset($stylesAttributes[$styleId])) {
-
 
107
            return '';
-
 
108
        }
101
        $stylesAttributes = $this->getStylesAttributes();
109
 
102
        $styleAttributes = $stylesAttributes[$styleId];
110
        $styleAttributes = $stylesAttributes[$styleId];
103
        $numFmtId = $styleAttributes[self::XML_ATTRIBUTE_NUM_FMT_ID];
111
        $numFmtId = $styleAttributes[self::XML_ATTRIBUTE_NUM_FMT_ID];
Línea 104... Línea 112...
104
        \assert(\is_int($numFmtId));
112
        \assert(\is_int($numFmtId));