@@ 1808-1822 (lines=15) @@ | ||
1805 | /** |
|
1806 | * Store the LEFTMARGIN BIFF record. |
|
1807 | */ |
|
1808 | private function writeMarginLeft() |
|
1809 | { |
|
1810 | $record = 0x0026; // Record identifier |
|
1811 | $length = 0x0008; // Bytes to follow |
|
1812 | ||
1813 | $margin = $this->phpSheet->getPageMargins()->getLeft(); // Margin in inches |
|
1814 | ||
1815 | $header = pack('vv', $record, $length); |
|
1816 | $data = pack('d', $margin); |
|
1817 | if (self::getByteOrder()) { // if it's Big Endian |
|
1818 | $data = strrev($data); |
|
1819 | } |
|
1820 | ||
1821 | $this->append($header . $data); |
|
1822 | } |
|
1823 | ||
1824 | /** |
|
1825 | * Store the RIGHTMARGIN BIFF record. |
|
@@ 1827-1841 (lines=15) @@ | ||
1824 | /** |
|
1825 | * Store the RIGHTMARGIN BIFF record. |
|
1826 | */ |
|
1827 | private function writeMarginRight() |
|
1828 | { |
|
1829 | $record = 0x0027; // Record identifier |
|
1830 | $length = 0x0008; // Bytes to follow |
|
1831 | ||
1832 | $margin = $this->phpSheet->getPageMargins()->getRight(); // Margin in inches |
|
1833 | ||
1834 | $header = pack('vv', $record, $length); |
|
1835 | $data = pack('d', $margin); |
|
1836 | if (self::getByteOrder()) { // if it's Big Endian |
|
1837 | $data = strrev($data); |
|
1838 | } |
|
1839 | ||
1840 | $this->append($header . $data); |
|
1841 | } |
|
1842 | ||
1843 | /** |
|
1844 | * Store the TOPMARGIN BIFF record. |
|
@@ 1846-1860 (lines=15) @@ | ||
1843 | /** |
|
1844 | * Store the TOPMARGIN BIFF record. |
|
1845 | */ |
|
1846 | private function writeMarginTop() |
|
1847 | { |
|
1848 | $record = 0x0028; // Record identifier |
|
1849 | $length = 0x0008; // Bytes to follow |
|
1850 | ||
1851 | $margin = $this->phpSheet->getPageMargins()->getTop(); // Margin in inches |
|
1852 | ||
1853 | $header = pack('vv', $record, $length); |
|
1854 | $data = pack('d', $margin); |
|
1855 | if (self::getByteOrder()) { // if it's Big Endian |
|
1856 | $data = strrev($data); |
|
1857 | } |
|
1858 | ||
1859 | $this->append($header . $data); |
|
1860 | } |
|
1861 | ||
1862 | /** |
|
1863 | * Store the BOTTOMMARGIN BIFF record. |
|
@@ 1865-1879 (lines=15) @@ | ||
1862 | /** |
|
1863 | * Store the BOTTOMMARGIN BIFF record. |
|
1864 | */ |
|
1865 | private function writeMarginBottom() |
|
1866 | { |
|
1867 | $record = 0x0029; // Record identifier |
|
1868 | $length = 0x0008; // Bytes to follow |
|
1869 | ||
1870 | $margin = $this->phpSheet->getPageMargins()->getBottom(); // Margin in inches |
|
1871 | ||
1872 | $header = pack('vv', $record, $length); |
|
1873 | $data = pack('d', $margin); |
|
1874 | if (self::getByteOrder()) { // if it's Big Endian |
|
1875 | $data = strrev($data); |
|
1876 | } |
|
1877 | ||
1878 | $this->append($header . $data); |
|
1879 | } |
|
1880 | ||
1881 | /** |
|
1882 | * Write the PRINTHEADERS BIFF record. |