@@ 867-876 (lines=10) @@ | ||
864 | * |
|
865 | * @param string $stringValue |
|
866 | */ |
|
867 | private function writeStringRecord($stringValue) |
|
868 | { |
|
869 | $record = 0x0207; // Record identifier |
|
870 | $data = StringHelper::UTF8toBIFF8UnicodeLong($stringValue); |
|
871 | ||
872 | $length = strlen($data); |
|
873 | $header = pack('vv', $record, $length); |
|
874 | ||
875 | $this->append($header . $data); |
|
876 | } |
|
877 | ||
878 | /** |
|
879 | * Write a hyperlink. |
|
@@ 1734-1753 (lines=20) @@ | ||
1731 | /** |
|
1732 | * Store the header caption BIFF record. |
|
1733 | */ |
|
1734 | private function writeHeader() |
|
1735 | { |
|
1736 | $record = 0x0014; // Record identifier |
|
1737 | ||
1738 | /* removing for now |
|
1739 | // need to fix character count (multibyte!) |
|
1740 | if (strlen($this->phpSheet->getHeaderFooter()->getOddHeader()) <= 255) { |
|
1741 | $str = $this->phpSheet->getHeaderFooter()->getOddHeader(); // header string |
|
1742 | } else { |
|
1743 | $str = ''; |
|
1744 | } |
|
1745 | */ |
|
1746 | ||
1747 | $recordData = StringHelper::UTF8toBIFF8UnicodeLong($this->phpSheet->getHeaderFooter()->getOddHeader()); |
|
1748 | $length = strlen($recordData); |
|
1749 | ||
1750 | $header = pack('vv', $record, $length); |
|
1751 | ||
1752 | $this->append($header . $recordData); |
|
1753 | } |
|
1754 | ||
1755 | /** |
|
1756 | * Store the footer caption BIFF record. |
|
@@ 1758-1777 (lines=20) @@ | ||
1755 | /** |
|
1756 | * Store the footer caption BIFF record. |
|
1757 | */ |
|
1758 | private function writeFooter() |
|
1759 | { |
|
1760 | $record = 0x0015; // Record identifier |
|
1761 | ||
1762 | /* removing for now |
|
1763 | // need to fix character count (multibyte!) |
|
1764 | if (strlen($this->phpSheet->getHeaderFooter()->getOddFooter()) <= 255) { |
|
1765 | $str = $this->phpSheet->getHeaderFooter()->getOddFooter(); |
|
1766 | } else { |
|
1767 | $str = ''; |
|
1768 | } |
|
1769 | */ |
|
1770 | ||
1771 | $recordData = StringHelper::UTF8toBIFF8UnicodeLong($this->phpSheet->getHeaderFooter()->getOddFooter()); |
|
1772 | $length = strlen($recordData); |
|
1773 | ||
1774 | $header = pack('vv', $record, $length); |
|
1775 | ||
1776 | $this->append($header . $recordData); |
|
1777 | } |
|
1778 | ||
1779 | /** |
|
1780 | * Store the horizontal centering HCENTER BIFF record. |