@@ 657-672 (lines=16) @@ | ||
654 | * @param mixed $xfIndex The XF format index for the cell |
|
655 | * @param array $arrcRun Index to Font record and characters beginning |
|
656 | */ |
|
657 | private function writeRichTextString($row, $col, $str, $xfIndex, $arrcRun) |
|
658 | { |
|
659 | $record = 0x00FD; // Record identifier |
|
660 | $length = 0x000A; // Bytes to follow |
|
661 | $str = \PhpSpreadsheet\Shared\StringHelper::UTF8toBIFF8UnicodeShort($str, $arrcRun); |
|
662 | ||
663 | /* check if string is already present */ |
|
664 | if (!isset($this->stringTable[$str])) { |
|
665 | $this->stringTable[$str] = $this->stringUnique++; |
|
666 | } |
|
667 | $this->stringTotal++; |
|
668 | ||
669 | $header = pack('vv', $record, $length); |
|
670 | $data = pack('vvvV', $row, $col, $xfIndex, $this->stringTable[$str]); |
|
671 | $this->append($header.$data); |
|
672 | } |
|
673 | ||
674 | /** |
|
675 | * Write a string to the specified row and column (zero indexed). |
|
@@ 725-741 (lines=17) @@ | ||
722 | * @param mixed $xfIndex The XF format index for the cell |
|
723 | * @return integer |
|
724 | */ |
|
725 | private function writeLabelSst($row, $col, $str, $xfIndex) |
|
726 | { |
|
727 | $record = 0x00FD; // Record identifier |
|
728 | $length = 0x000A; // Bytes to follow |
|
729 | ||
730 | $str = \PhpSpreadsheet\Shared\StringHelper::UTF8toBIFF8UnicodeLong($str); |
|
731 | ||
732 | /* check if string is already present */ |
|
733 | if (!isset($this->stringTable[$str])) { |
|
734 | $this->stringTable[$str] = $this->stringUnique++; |
|
735 | } |
|
736 | $this->stringTotal++; |
|
737 | ||
738 | $header = pack('vv', $record, $length); |
|
739 | $data = pack('vvvV', $row, $col, $xfIndex, $this->stringTable[$str]); |
|
740 | $this->append($header.$data); |
|
741 | } |
|
742 | ||
743 | /** |
|
744 | * Writes a note associated with the cell given by the row and column. |