@@ 1879-1890 (lines=12) @@ | ||
1876 | * |
|
1877 | * @access private |
|
1878 | */ |
|
1879 | private function writeHcenter() |
|
1880 | { |
|
1881 | $record = 0x0083; // Record identifier |
|
1882 | $length = 0x0002; // Bytes to follow |
|
1883 | ||
1884 | $fHCenter = $this->phpSheet->getPageSetup()->getHorizontalCentered() ? 1 : 0; // Horizontal centering |
|
1885 | ||
1886 | $header = pack("vv", $record, $length); |
|
1887 | $data = pack("v", $fHCenter); |
|
1888 | ||
1889 | $this->append($header.$data); |
|
1890 | } |
|
1891 | ||
1892 | /** |
|
1893 | * Store the vertical centering VCENTER BIFF record. |
|
@@ 1895-1905 (lines=11) @@ | ||
1892 | /** |
|
1893 | * Store the vertical centering VCENTER BIFF record. |
|
1894 | */ |
|
1895 | private function writeVcenter() |
|
1896 | { |
|
1897 | $record = 0x0084; // Record identifier |
|
1898 | $length = 0x0002; // Bytes to follow |
|
1899 | ||
1900 | $fVCenter = $this->phpSheet->getPageSetup()->getVerticalCentered() ? 1 : 0; // Horizontal centering |
|
1901 | ||
1902 | $header = pack("vv", $record, $length); |
|
1903 | $data = pack("v", $fVCenter); |
|
1904 | $this->append($header . $data); |
|
1905 | } |
|
1906 | ||
1907 | /** |
|
1908 | * Store the LEFTMARGIN BIFF record. |
|
@@ 2002-2012 (lines=11) @@ | ||
1999 | * Write the PRINTGRIDLINES BIFF record. Must be used in conjunction with the |
|
2000 | * GRIDSET record. |
|
2001 | */ |
|
2002 | private function writePrintGridlines() |
|
2003 | { |
|
2004 | $record = 0x002b; // Record identifier |
|
2005 | $length = 0x0002; // Bytes to follow |
|
2006 | ||
2007 | $fPrintGrid = $this->phpSheet->getPrintGridlines() ? 1 : 0; // Boolean flag |
|
2008 | ||
2009 | $header = pack("vv", $record, $length); |
|
2010 | $data = pack("v", $fPrintGrid); |
|
2011 | $this->append($header . $data); |
|
2012 | } |
|
2013 | ||
2014 | /** |
|
2015 | * Write the GRIDSET BIFF record. Must be used in conjunction with the |
|
@@ 2213-2229 (lines=17) @@ | ||
2210 | /** |
|
2211 | * Set the Biff PROTECT record to indicate that the worksheet is protected. |
|
2212 | */ |
|
2213 | private function writeProtect() |
|
2214 | { |
|
2215 | // Exit unless sheet protection has been specified |
|
2216 | if (!$this->phpSheet->getProtection()->getSheet()) { |
|
2217 | return; |
|
2218 | } |
|
2219 | ||
2220 | $record = 0x0012; // Record identifier |
|
2221 | $length = 0x0002; // Bytes to follow |
|
2222 | ||
2223 | $fLock = 1; // Worksheet is protected |
|
2224 | ||
2225 | $header = pack("vv", $record, $length); |
|
2226 | $data = pack("v", $fLock); |
|
2227 | ||
2228 | $this->append($header.$data); |
|
2229 | } |
|
2230 | ||
2231 | /** |
|
2232 | * Write SCENPROTECT |