/** * Write all XF records. */ protected function storeAllXfs() { // tmpFormat is added by the constructor. We use this to write the default XF's // The default font index is 0 for ($i = 0; $i <= 14; $i++) { $xfRecord = $this->tmpFormat->getXf('style'); $this->append($xfRecord); } $xfRecord = $this->tmpFormat->getXf('cell'); $this->append($xfRecord); // User defined XFs foreach ($this->formats as $format) { $xfRecord = $format->getXf('cell'); $this->append($xfRecord); } }
/** * @param XlsFormat $format * * @return array */ protected function getFlags($format) { return array('Num' => $format->getNumFormat() != NumberFormat::TYPE_GENERAL ? 1 : 0, 'Fnt' => $format->getFont()->getIndex() != 0 ? 1 : 0, 'Alc' => $format->textWrap ? 1 : 0, 'Bdr' => $format->getBorderStyle('top') || $format->getBorderStyle('right') || $format->getBorderStyle('bottom') || $format->getBorderStyle('left') ? 1 : 0, 'Pat' => $format->fgColor != 0x40 || $format->bgColor != 0x41 || $format->pattern ? 1 : 0, 'Prot' => $format->locked | $format->hidden); }