@@ 686-701 (lines=16) @@ | ||
683 | * @param int $xfIndex The XF format index for the cell |
|
684 | * @param array $arrcRun Index to Font record and characters beginning |
|
685 | */ |
|
686 | private function writeRichTextString($row, $col, $str, $xfIndex, $arrcRun) |
|
687 | { |
|
688 | $record = 0x00FD; // Record identifier |
|
689 | $length = 0x000A; // Bytes to follow |
|
690 | $str = StringHelper::UTF8toBIFF8UnicodeShort($str, $arrcRun); |
|
691 | ||
692 | /* check if string is already present */ |
|
693 | if (!isset($this->stringTable[$str])) { |
|
694 | $this->stringTable[$str] = $this->stringUnique++; |
|
695 | } |
|
696 | ++$this->stringTotal; |
|
697 | ||
698 | $header = pack('vv', $record, $length); |
|
699 | $data = pack('vvvV', $row, $col, $xfIndex, $this->stringTable[$str]); |
|
700 | $this->append($header . $data); |
|
701 | } |
|
702 | ||
703 | /** |
|
704 | * Write a string to the specified row and column (zero indexed). |
|
@@ 755-771 (lines=17) @@ | ||
752 | * |
|
753 | * @return int |
|
754 | */ |
|
755 | private function writeLabelSst($row, $col, $str, $xfIndex) |
|
756 | { |
|
757 | $record = 0x00FD; // Record identifier |
|
758 | $length = 0x000A; // Bytes to follow |
|
759 | ||
760 | $str = StringHelper::UTF8toBIFF8UnicodeLong($str); |
|
761 | ||
762 | /* check if string is already present */ |
|
763 | if (!isset($this->stringTable[$str])) { |
|
764 | $this->stringTable[$str] = $this->stringUnique++; |
|
765 | } |
|
766 | ++$this->stringTotal; |
|
767 | ||
768 | $header = pack('vv', $record, $length); |
|
769 | $data = pack('vvvV', $row, $col, $xfIndex, $this->stringTable[$str]); |
|
770 | $this->append($header . $data); |
|
771 | } |
|
772 | ||
773 | /** |
|
774 | * Writes a note associated with the cell given by the row and column. |