@@ 1864-1875 (lines=12) @@ | ||
1861 | /** |
|
1862 | * Store the horizontal centering HCENTER BIFF record. |
|
1863 | */ |
|
1864 | private function writeHcenter() |
|
1865 | { |
|
1866 | $record = 0x0083; // Record identifier |
|
1867 | $length = 0x0002; // Bytes to follow |
|
1868 | ||
1869 | $fHCenter = $this->phpSheet->getPageSetup()->getHorizontalCentered() ? 1 : 0; // Horizontal centering |
|
1870 | ||
1871 | $header = pack('vv', $record, $length); |
|
1872 | $data = pack('v', $fHCenter); |
|
1873 | ||
1874 | $this->append($header . $data); |
|
1875 | } |
|
1876 | ||
1877 | /** |
|
1878 | * Store the vertical centering VCENTER BIFF record. |
|
@@ 1880-1890 (lines=11) @@ | ||
1877 | /** |
|
1878 | * Store the vertical centering VCENTER BIFF record. |
|
1879 | */ |
|
1880 | private function writeVcenter() |
|
1881 | { |
|
1882 | $record = 0x0084; // Record identifier |
|
1883 | $length = 0x0002; // Bytes to follow |
|
1884 | ||
1885 | $fVCenter = $this->phpSheet->getPageSetup()->getVerticalCentered() ? 1 : 0; // Horizontal centering |
|
1886 | ||
1887 | $header = pack('vv', $record, $length); |
|
1888 | $data = pack('v', $fVCenter); |
|
1889 | $this->append($header . $data); |
|
1890 | } |
|
1891 | ||
1892 | /** |
|
1893 | * Store the LEFTMARGIN BIFF record. |
|
@@ 1987-1997 (lines=11) @@ | ||
1984 | * Write the PRINTGRIDLINES BIFF record. Must be used in conjunction with the |
|
1985 | * GRIDSET record. |
|
1986 | */ |
|
1987 | private function writePrintGridlines() |
|
1988 | { |
|
1989 | $record = 0x002b; // Record identifier |
|
1990 | $length = 0x0002; // Bytes to follow |
|
1991 | ||
1992 | $fPrintGrid = $this->phpSheet->getPrintGridlines() ? 1 : 0; // Boolean flag |
|
1993 | ||
1994 | $header = pack('vv', $record, $length); |
|
1995 | $data = pack('v', $fPrintGrid); |
|
1996 | $this->append($header . $data); |
|
1997 | } |
|
1998 | ||
1999 | /** |
|
2000 | * Write the GRIDSET BIFF record. Must be used in conjunction with the |
|
@@ 2198-2214 (lines=17) @@ | ||
2195 | /** |
|
2196 | * Set the Biff PROTECT record to indicate that the worksheet is protected. |
|
2197 | */ |
|
2198 | private function writeProtect() |
|
2199 | { |
|
2200 | // Exit unless sheet protection has been specified |
|
2201 | if (!$this->phpSheet->getProtection()->getSheet()) { |
|
2202 | return; |
|
2203 | } |
|
2204 | ||
2205 | $record = 0x0012; // Record identifier |
|
2206 | $length = 0x0002; // Bytes to follow |
|
2207 | ||
2208 | $fLock = 1; // Worksheet is protected |
|
2209 | ||
2210 | $header = pack('vv', $record, $length); |
|
2211 | $data = pack('v', $fLock); |
|
2212 | ||
2213 | $this->append($header . $data); |
|
2214 | } |
|
2215 | ||
2216 | /** |
|
2217 | * Write SCENPROTECT |