@@ 669-684 (lines=16) @@ | ||
666 | * @param int $xfIndex The XF format index for the cell |
|
667 | * @param array $arrcRun Index to Font record and characters beginning |
|
668 | */ |
|
669 | private function writeRichTextString($row, $col, $str, $xfIndex, $arrcRun) |
|
670 | { |
|
671 | $record = 0x00FD; // Record identifier |
|
672 | $length = 0x000A; // Bytes to follow |
|
673 | $str = StringHelper::UTF8toBIFF8UnicodeShort($str, $arrcRun); |
|
674 | ||
675 | // check if string is already present |
|
676 | if (!isset($this->stringTable[$str])) { |
|
677 | $this->stringTable[$str] = $this->stringUnique++; |
|
678 | } |
|
679 | ++$this->stringTotal; |
|
680 | ||
681 | $header = pack('vv', $record, $length); |
|
682 | $data = pack('vvvV', $row, $col, $xfIndex, $this->stringTable[$str]); |
|
683 | $this->append($header . $data); |
|
684 | } |
|
685 | ||
686 | /** |
|
687 | * Write a string to the specified row and column (zero indexed). |
|
@@ 701-717 (lines=17) @@ | ||
698 | * |
|
699 | * @return int |
|
700 | */ |
|
701 | private function writeLabelSst($row, $col, $str, $xfIndex) |
|
702 | { |
|
703 | $record = 0x00FD; // Record identifier |
|
704 | $length = 0x000A; // Bytes to follow |
|
705 | ||
706 | $str = StringHelper::UTF8toBIFF8UnicodeLong($str); |
|
707 | ||
708 | // check if string is already present |
|
709 | if (!isset($this->stringTable[$str])) { |
|
710 | $this->stringTable[$str] = $this->stringUnique++; |
|
711 | } |
|
712 | ++$this->stringTotal; |
|
713 | ||
714 | $header = pack('vv', $record, $length); |
|
715 | $data = pack('vvvV', $row, $col, $xfIndex, $this->stringTable[$str]); |
|
716 | $this->append($header . $data); |
|
717 | } |
|
718 | ||
719 | /** |
|
720 | * Write a blank cell to the specified row and column (zero indexed). |