@@ -36,9 +36,9 @@ |
||
36 | 36 | private $m; |
37 | 37 | |
38 | 38 | /** |
39 | - * Column dimension. |
|
40 | - * @var integer |
|
41 | - */ |
|
39 | + * Column dimension. |
|
40 | + * @var integer |
|
41 | + */ |
|
42 | 42 | private $n; |
43 | 43 | |
44 | 44 | /** |
@@ -121,8 +121,8 @@ discard block |
||
121 | 121 | } |
122 | 122 | |
123 | 123 | for ($i = 0; $i < $bbdBlocks; ++$i) { |
124 | - $bigBlockDepotBlocks[$i] = self::getInt4d($this->data, $pos); |
|
125 | - $pos += 4; |
|
124 | + $bigBlockDepotBlocks[$i] = self::getInt4d($this->data, $pos); |
|
125 | + $pos += 4; |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | for ($j = 0; $j < $this->numExtensionBlocks; ++$j) { |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | $block = $this->props[$stream]['startBlock']; |
189 | 189 | |
190 | 190 | while ($block != -2) { |
191 | - $pos = $block * self::SMALL_BLOCK_SIZE; |
|
191 | + $pos = $block * self::SMALL_BLOCK_SIZE; |
|
192 | 192 | $streamData .= substr($rootdata, $pos, self::SMALL_BLOCK_SIZE); |
193 | 193 | |
194 | 194 | $block = self::getInt4d($this->smallBlockChain, $block*4); |
@@ -37,7 +37,7 @@ |
||
37 | 37 | * @param \PHPExcel\Worksheet $sheet The sheet |
38 | 38 | * @param string $col The column |
39 | 39 | * @return integer The width in pixels |
40 | - */ |
|
40 | + */ |
|
41 | 41 | public static function sizeCol($sheet, $col = 'A') |
42 | 42 | { |
43 | 43 | // default font of the workbook |
@@ -144,40 +144,40 @@ |
||
144 | 144 | */ |
145 | 145 | public static $defaultColumnWidths = array( |
146 | 146 | 'Arial' => array( |
147 | - 1 => array('px' => 24, 'width' => 12.00000000), |
|
148 | - 2 => array('px' => 24, 'width' => 12.00000000), |
|
149 | - 3 => array('px' => 32, 'width' => 10.66406250), |
|
150 | - 4 => array('px' => 32, 'width' => 10.66406250), |
|
151 | - 5 => array('px' => 40, 'width' => 10.00000000), |
|
152 | - 6 => array('px' => 48, 'width' => 9.59765625), |
|
153 | - 7 => array('px' => 48, 'width' => 9.59765625), |
|
154 | - 8 => array('px' => 56, 'width' => 9.33203125), |
|
155 | - 9 => array('px' => 64, 'width' => 9.14062500), |
|
147 | + 1 => array('px' => 24, 'width' => 12.00000000), |
|
148 | + 2 => array('px' => 24, 'width' => 12.00000000), |
|
149 | + 3 => array('px' => 32, 'width' => 10.66406250), |
|
150 | + 4 => array('px' => 32, 'width' => 10.66406250), |
|
151 | + 5 => array('px' => 40, 'width' => 10.00000000), |
|
152 | + 6 => array('px' => 48, 'width' => 9.59765625), |
|
153 | + 7 => array('px' => 48, 'width' => 9.59765625), |
|
154 | + 8 => array('px' => 56, 'width' => 9.33203125), |
|
155 | + 9 => array('px' => 64, 'width' => 9.14062500), |
|
156 | 156 | 10 => array('px' => 64, 'width' => 9.14062500), |
157 | 157 | ), |
158 | 158 | 'Calibri' => array( |
159 | - 1 => array('px' => 24, 'width' => 12.00000000), |
|
160 | - 2 => array('px' => 24, 'width' => 12.00000000), |
|
161 | - 3 => array('px' => 32, 'width' => 10.66406250), |
|
162 | - 4 => array('px' => 32, 'width' => 10.66406250), |
|
163 | - 5 => array('px' => 40, 'width' => 10.00000000), |
|
164 | - 6 => array('px' => 48, 'width' => 9.59765625), |
|
165 | - 7 => array('px' => 48, 'width' => 9.59765625), |
|
166 | - 8 => array('px' => 56, 'width' => 9.33203125), |
|
167 | - 9 => array('px' => 56, 'width' => 9.33203125), |
|
159 | + 1 => array('px' => 24, 'width' => 12.00000000), |
|
160 | + 2 => array('px' => 24, 'width' => 12.00000000), |
|
161 | + 3 => array('px' => 32, 'width' => 10.66406250), |
|
162 | + 4 => array('px' => 32, 'width' => 10.66406250), |
|
163 | + 5 => array('px' => 40, 'width' => 10.00000000), |
|
164 | + 6 => array('px' => 48, 'width' => 9.59765625), |
|
165 | + 7 => array('px' => 48, 'width' => 9.59765625), |
|
166 | + 8 => array('px' => 56, 'width' => 9.33203125), |
|
167 | + 9 => array('px' => 56, 'width' => 9.33203125), |
|
168 | 168 | 10 => array('px' => 64, 'width' => 9.14062500), |
169 | 169 | 11 => array('px' => 64, 'width' => 9.14062500), |
170 | 170 | ), |
171 | 171 | 'Verdana' => array( |
172 | - 1 => array('px' => 24, 'width' => 12.00000000), |
|
173 | - 2 => array('px' => 24, 'width' => 12.00000000), |
|
174 | - 3 => array('px' => 32, 'width' => 10.66406250), |
|
175 | - 4 => array('px' => 32, 'width' => 10.66406250), |
|
176 | - 5 => array('px' => 40, 'width' => 10.00000000), |
|
177 | - 6 => array('px' => 48, 'width' => 9.59765625), |
|
178 | - 7 => array('px' => 48, 'width' => 9.59765625), |
|
179 | - 8 => array('px' => 64, 'width' => 9.14062500), |
|
180 | - 9 => array('px' => 72, 'width' => 9.00000000), |
|
172 | + 1 => array('px' => 24, 'width' => 12.00000000), |
|
173 | + 2 => array('px' => 24, 'width' => 12.00000000), |
|
174 | + 3 => array('px' => 32, 'width' => 10.66406250), |
|
175 | + 4 => array('px' => 32, 'width' => 10.66406250), |
|
176 | + 5 => array('px' => 40, 'width' => 10.00000000), |
|
177 | + 6 => array('px' => 48, 'width' => 9.59765625), |
|
178 | + 7 => array('px' => 48, 'width' => 9.59765625), |
|
179 | + 8 => array('px' => 64, 'width' => 9.14062500), |
|
180 | + 9 => array('px' => 72, 'width' => 9.00000000), |
|
181 | 181 | 10 => array('px' => 72, 'width' => 9.00000000), |
182 | 182 | ), |
183 | 183 | ); |
@@ -160,7 +160,7 @@ |
||
160 | 160 | $extracted = $this->zip->extractByIndex($index, PCLZIP_OPT_EXTRACT_AS_STRING); |
161 | 161 | $contents = ''; |
162 | 162 | if ((is_array($extracted)) && ($extracted != 0)) { |
163 | - $contents = $extracted[0]["content"]; |
|
163 | + $contents = $extracted[0]["content"]; |
|
164 | 164 | } |
165 | 165 | } |
166 | 166 | } |
@@ -33,98 +33,98 @@ discard block |
||
33 | 33 | class PPS |
34 | 34 | { |
35 | 35 | /** |
36 | - * The PPS index |
|
37 | - * @var integer |
|
38 | - */ |
|
36 | + * The PPS index |
|
37 | + * @var integer |
|
38 | + */ |
|
39 | 39 | public $No; |
40 | 40 | |
41 | 41 | /** |
42 | - * The PPS name (in Unicode) |
|
43 | - * @var string |
|
44 | - */ |
|
42 | + * The PPS name (in Unicode) |
|
43 | + * @var string |
|
44 | + */ |
|
45 | 45 | public $Name; |
46 | 46 | |
47 | 47 | /** |
48 | - * The PPS type. Dir, Root or File |
|
49 | - * @var integer |
|
50 | - */ |
|
48 | + * The PPS type. Dir, Root or File |
|
49 | + * @var integer |
|
50 | + */ |
|
51 | 51 | public $Type; |
52 | 52 | |
53 | 53 | /** |
54 | - * The index of the previous PPS |
|
55 | - * @var integer |
|
56 | - */ |
|
54 | + * The index of the previous PPS |
|
55 | + * @var integer |
|
56 | + */ |
|
57 | 57 | public $PrevPps; |
58 | 58 | |
59 | 59 | /** |
60 | - * The index of the next PPS |
|
61 | - * @var integer |
|
62 | - */ |
|
60 | + * The index of the next PPS |
|
61 | + * @var integer |
|
62 | + */ |
|
63 | 63 | public $NextPps; |
64 | 64 | |
65 | 65 | /** |
66 | - * The index of it's first child if this is a Dir or Root PPS |
|
67 | - * @var integer |
|
68 | - */ |
|
66 | + * The index of it's first child if this is a Dir or Root PPS |
|
67 | + * @var integer |
|
68 | + */ |
|
69 | 69 | public $DirPps; |
70 | 70 | |
71 | 71 | /** |
72 | - * A timestamp |
|
73 | - * @var integer |
|
74 | - */ |
|
72 | + * A timestamp |
|
73 | + * @var integer |
|
74 | + */ |
|
75 | 75 | public $Time1st; |
76 | 76 | |
77 | 77 | /** |
78 | - * A timestamp |
|
79 | - * @var integer |
|
80 | - */ |
|
78 | + * A timestamp |
|
79 | + * @var integer |
|
80 | + */ |
|
81 | 81 | public $Time2nd; |
82 | 82 | |
83 | 83 | /** |
84 | - * Starting block (small or big) for this PPS's data inside the container |
|
85 | - * @var integer |
|
86 | - */ |
|
84 | + * Starting block (small or big) for this PPS's data inside the container |
|
85 | + * @var integer |
|
86 | + */ |
|
87 | 87 | public $startBlock; |
88 | 88 | |
89 | 89 | /** |
90 | - * The size of the PPS's data (in bytes) |
|
91 | - * @var integer |
|
92 | - */ |
|
90 | + * The size of the PPS's data (in bytes) |
|
91 | + * @var integer |
|
92 | + */ |
|
93 | 93 | public $Size; |
94 | 94 | |
95 | 95 | /** |
96 | - * The PPS's data (only used if it's not using a temporary file) |
|
97 | - * @var string |
|
98 | - */ |
|
96 | + * The PPS's data (only used if it's not using a temporary file) |
|
97 | + * @var string |
|
98 | + */ |
|
99 | 99 | public $_data; |
100 | 100 | |
101 | 101 | /** |
102 | - * Array of child PPS's (only used by Root and Dir PPS's) |
|
103 | - * @var array |
|
104 | - */ |
|
102 | + * Array of child PPS's (only used by Root and Dir PPS's) |
|
103 | + * @var array |
|
104 | + */ |
|
105 | 105 | public $children = array(); |
106 | 106 | |
107 | 107 | /** |
108 | - * Pointer to OLE container |
|
109 | - * @var OLE |
|
110 | - */ |
|
108 | + * Pointer to OLE container |
|
109 | + * @var OLE |
|
110 | + */ |
|
111 | 111 | public $ole; |
112 | 112 | |
113 | 113 | /** |
114 | - * The constructor |
|
115 | - * |
|
116 | - * @access public |
|
117 | - * @param integer $No The PPS index |
|
118 | - * @param string $name The PPS name |
|
119 | - * @param integer $type The PPS type. Dir, Root or File |
|
120 | - * @param integer $prev The index of the previous PPS |
|
121 | - * @param integer $next The index of the next PPS |
|
122 | - * @param integer $dir The index of it's first child if this is a Dir or Root PPS |
|
123 | - * @param integer $time_1st A timestamp |
|
124 | - * @param integer $time_2nd A timestamp |
|
125 | - * @param string $data The (usually binary) source data of the PPS |
|
126 | - * @param array $children Array containing children PPS for this PPS |
|
127 | - */ |
|
114 | + * The constructor |
|
115 | + * |
|
116 | + * @access public |
|
117 | + * @param integer $No The PPS index |
|
118 | + * @param string $name The PPS name |
|
119 | + * @param integer $type The PPS type. Dir, Root or File |
|
120 | + * @param integer $prev The index of the previous PPS |
|
121 | + * @param integer $next The index of the next PPS |
|
122 | + * @param integer $dir The index of it's first child if this is a Dir or Root PPS |
|
123 | + * @param integer $time_1st A timestamp |
|
124 | + * @param integer $time_2nd A timestamp |
|
125 | + * @param string $data The (usually binary) source data of the PPS |
|
126 | + * @param array $children Array containing children PPS for this PPS |
|
127 | + */ |
|
128 | 128 | public function __construct($No, $name, $type, $prev, $next, $dir, $time_1st, $time_2nd, $data, $children) |
129 | 129 | { |
130 | 130 | $this->No = $No; |
@@ -145,11 +145,11 @@ discard block |
||
145 | 145 | } |
146 | 146 | |
147 | 147 | /** |
148 | - * Returns the amount of data saved for this PPS |
|
149 | - * |
|
150 | - * @access public |
|
151 | - * @return integer The amount of data (in bytes) |
|
152 | - */ |
|
148 | + * Returns the amount of data saved for this PPS |
|
149 | + * |
|
150 | + * @access public |
|
151 | + * @return integer The amount of data (in bytes) |
|
152 | + */ |
|
153 | 153 | public function getDataLen() |
154 | 154 | { |
155 | 155 | if (!isset($this->_data)) { |
@@ -165,43 +165,43 @@ discard block |
||
165 | 165 | } |
166 | 166 | |
167 | 167 | /** |
168 | - * Returns a string with the PPS's WK (What is a WK?) |
|
169 | - * |
|
170 | - * @access public |
|
171 | - * @return string The binary string |
|
172 | - */ |
|
168 | + * Returns a string with the PPS's WK (What is a WK?) |
|
169 | + * |
|
170 | + * @access public |
|
171 | + * @return string The binary string |
|
172 | + */ |
|
173 | 173 | public function _getPpsWk() |
174 | 174 | { |
175 | 175 | $ret = str_pad($this->Name, 64, "\x00"); |
176 | 176 | |
177 | 177 | $ret .= pack("v", strlen($this->Name) + 2) // 66 |
178 | - . pack("c", $this->Type) // 67 |
|
179 | - . pack("c", 0x00) //UK // 68 |
|
180 | - . pack("V", $this->PrevPps) //Prev // 72 |
|
181 | - . pack("V", $this->NextPps) //Next // 76 |
|
182 | - . pack("V", $this->DirPps) //Dir // 80 |
|
183 | - . "\x00\x09\x02\x00" // 84 |
|
184 | - . "\x00\x00\x00\x00" // 88 |
|
185 | - . "\xc0\x00\x00\x00" // 92 |
|
186 | - . "\x00\x00\x00\x46" // 96 // Seems to be ok only for Root |
|
187 | - . "\x00\x00\x00\x00" // 100 |
|
188 | - . \PHPExcel\Shared\OLE::localDateToOLE($this->Time1st) // 108 |
|
189 | - . \PHPExcel\Shared\OLE::localDateToOLE($this->Time2nd) // 116 |
|
190 | - . pack("V", isset($this->startBlock) ? $this->startBlock : 0) // 120 |
|
191 | - . pack("V", $this->Size) // 124 |
|
192 | - . pack("V", 0); // 128 |
|
178 | + . pack("c", $this->Type) // 67 |
|
179 | + . pack("c", 0x00) //UK // 68 |
|
180 | + . pack("V", $this->PrevPps) //Prev // 72 |
|
181 | + . pack("V", $this->NextPps) //Next // 76 |
|
182 | + . pack("V", $this->DirPps) //Dir // 80 |
|
183 | + . "\x00\x09\x02\x00" // 84 |
|
184 | + . "\x00\x00\x00\x00" // 88 |
|
185 | + . "\xc0\x00\x00\x00" // 92 |
|
186 | + . "\x00\x00\x00\x46" // 96 // Seems to be ok only for Root |
|
187 | + . "\x00\x00\x00\x00" // 100 |
|
188 | + . \PHPExcel\Shared\OLE::localDateToOLE($this->Time1st) // 108 |
|
189 | + . \PHPExcel\Shared\OLE::localDateToOLE($this->Time2nd) // 116 |
|
190 | + . pack("V", isset($this->startBlock) ? $this->startBlock : 0) // 120 |
|
191 | + . pack("V", $this->Size) // 124 |
|
192 | + . pack("V", 0); // 128 |
|
193 | 193 | return $ret; |
194 | 194 | } |
195 | 195 | |
196 | 196 | /** |
197 | - * Updates index and pointers to previous, next and children PPS's for this |
|
198 | - * PPS. I don't think it'll work with Dir PPS's. |
|
199 | - * |
|
200 | - * @access public |
|
201 | - * @param array &$raList Reference to the array of PPS's for the whole OLE |
|
202 | - * container |
|
203 | - * @return integer The index for this PPS |
|
204 | - */ |
|
197 | + * Updates index and pointers to previous, next and children PPS's for this |
|
198 | + * PPS. I don't think it'll work with Dir PPS's. |
|
199 | + * |
|
200 | + * @access public |
|
201 | + * @param array &$raList Reference to the array of PPS's for the whole OLE |
|
202 | + * container |
|
203 | + * @return integer The index for this PPS |
|
204 | + */ |
|
205 | 205 | public static function _savePpsSetPnt(&$raList, $to_save, $depth = 0) |
206 | 206 | { |
207 | 207 | if (!is_array($to_save) || (empty($to_save))) { |
@@ -33,34 +33,34 @@ |
||
33 | 33 | class File extends \PHPExcel\Shared\OLE\PPS |
34 | 34 | { |
35 | 35 | /** |
36 | - * The constructor |
|
37 | - * |
|
38 | - * @access public |
|
39 | - * @param string $name The name of the file (in Unicode) |
|
40 | - * @see OLE::ascToUcs() |
|
41 | - */ |
|
36 | + * The constructor |
|
37 | + * |
|
38 | + * @access public |
|
39 | + * @param string $name The name of the file (in Unicode) |
|
40 | + * @see OLE::ascToUcs() |
|
41 | + */ |
|
42 | 42 | public function __construct($name) |
43 | 43 | { |
44 | 44 | parent::__construct(null, $name, \PHPExcel\Shared\OLE::OLE_PPS_TYPE_FILE, null, null, null, null, null, '', array()); |
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
48 | - * Initialization method. Has to be called right after OLE_PPS_File(). |
|
49 | - * |
|
50 | - * @access public |
|
51 | - * @return mixed true on success |
|
52 | - */ |
|
48 | + * Initialization method. Has to be called right after OLE_PPS_File(). |
|
49 | + * |
|
50 | + * @access public |
|
51 | + * @return mixed true on success |
|
52 | + */ |
|
53 | 53 | public function init() |
54 | 54 | { |
55 | 55 | return true; |
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
59 | - * Append data to PPS |
|
60 | - * |
|
61 | - * @access public |
|
62 | - * @param string $data The data to append |
|
63 | - */ |
|
59 | + * Append data to PPS |
|
60 | + * |
|
61 | + * @access public |
|
62 | + * @param string $data The data to append |
|
63 | + */ |
|
64 | 64 | public function append($data) |
65 | 65 | { |
66 | 66 | $this->_data .= $data; |
@@ -51,17 +51,17 @@ discard block |
||
51 | 51 | } |
52 | 52 | |
53 | 53 | /** |
54 | - * Method for saving the whole OLE container (including files). |
|
55 | - * In fact, if called with an empty argument (or '-'), it saves to a |
|
56 | - * temporary file and then outputs it's contents to stdout. |
|
57 | - * If a resource pointer to a stream created by fopen() is passed |
|
58 | - * it will be used, but you have to close such stream by yourself. |
|
59 | - * |
|
60 | - * @param string|resource $filename The name of the file or stream where to save the OLE container. |
|
61 | - * @access public |
|
62 | - * @return mixed true on success |
|
63 | - * @throws \PHPExcel\Writer\Exception |
|
64 | - */ |
|
54 | + * Method for saving the whole OLE container (including files). |
|
55 | + * In fact, if called with an empty argument (or '-'), it saves to a |
|
56 | + * temporary file and then outputs it's contents to stdout. |
|
57 | + * If a resource pointer to a stream created by fopen() is passed |
|
58 | + * it will be used, but you have to close such stream by yourself. |
|
59 | + * |
|
60 | + * @param string|resource $filename The name of the file or stream where to save the OLE container. |
|
61 | + * @access public |
|
62 | + * @return mixed true on success |
|
63 | + * @throws \PHPExcel\Writer\Exception |
|
64 | + */ |
|
65 | 65 | public function save($filename) |
66 | 66 | { |
67 | 67 | // Initial Setting for saving |
@@ -117,12 +117,12 @@ discard block |
||
117 | 117 | } |
118 | 118 | |
119 | 119 | /** |
120 | - * Calculate some numbers |
|
121 | - * |
|
122 | - * @access public |
|
123 | - * @param array $raList Reference to an array of PPS's |
|
124 | - * @return array The array of numbers |
|
125 | - */ |
|
120 | + * Calculate some numbers |
|
121 | + * |
|
122 | + * @access public |
|
123 | + * @param array $raList Reference to an array of PPS's |
|
124 | + * @return array The array of numbers |
|
125 | + */ |
|
126 | 126 | public function _calcSize(&$raList) |
127 | 127 | { |
128 | 128 | // Calculate Basic Setting |
@@ -155,13 +155,13 @@ discard block |
||
155 | 155 | } |
156 | 156 | |
157 | 157 | /** |
158 | - * Helper function for caculating a magic value for block sizes |
|
159 | - * |
|
160 | - * @access public |
|
161 | - * @param integer $i2 The argument |
|
162 | - * @see save() |
|
163 | - * @return integer |
|
164 | - */ |
|
158 | + * Helper function for caculating a magic value for block sizes |
|
159 | + * |
|
160 | + * @access public |
|
161 | + * @param integer $i2 The argument |
|
162 | + * @see save() |
|
163 | + * @return integer |
|
164 | + */ |
|
165 | 165 | private static function adjust2($i2) |
166 | 166 | { |
167 | 167 | $iWk = log($i2)/log(2); |
@@ -169,13 +169,13 @@ discard block |
||
169 | 169 | } |
170 | 170 | |
171 | 171 | /** |
172 | - * Save OLE header |
|
173 | - * |
|
174 | - * @access public |
|
175 | - * @param integer $iSBDcnt |
|
176 | - * @param integer $iBBcnt |
|
177 | - * @param integer $iPPScnt |
|
178 | - */ |
|
172 | + * Save OLE header |
|
173 | + * |
|
174 | + * @access public |
|
175 | + * @param integer $iSBDcnt |
|
176 | + * @param integer $iBBcnt |
|
177 | + * @param integer $iPPScnt |
|
178 | + */ |
|
179 | 179 | public function _saveHeader($iSBDcnt, $iBBcnt, $iPPScnt) |
180 | 180 | { |
181 | 181 | $FILE = $this->_FILEH_; |
@@ -250,12 +250,12 @@ discard block |
||
250 | 250 | } |
251 | 251 | |
252 | 252 | /** |
253 | - * Saving big data (PPS's with data bigger than \PHPExcel\Shared\OLE::OLE_DATA_SIZE_SMALL) |
|
254 | - * |
|
255 | - * @access public |
|
256 | - * @param integer $iStBlk |
|
257 | - * @param array &$raList Reference to array of PPS's |
|
258 | - */ |
|
253 | + * Saving big data (PPS's with data bigger than \PHPExcel\Shared\OLE::OLE_DATA_SIZE_SMALL) |
|
254 | + * |
|
255 | + * @access public |
|
256 | + * @param integer $iStBlk |
|
257 | + * @param array &$raList Reference to array of PPS's |
|
258 | + */ |
|
259 | 259 | public function _saveBigData($iStBlk, &$raList) |
260 | 260 | { |
261 | 261 | $FILE = $this->_FILEH_; |
@@ -298,11 +298,11 @@ discard block |
||
298 | 298 | } |
299 | 299 | |
300 | 300 | /** |
301 | - * get small data (PPS's with data smaller than \PHPExcel\Shared\OLE::OLE_DATA_SIZE_SMALL) |
|
302 | - * |
|
303 | - * @access public |
|
304 | - * @param array &$raList Reference to array of PPS's |
|
305 | - */ |
|
301 | + * get small data (PPS's with data smaller than \PHPExcel\Shared\OLE::OLE_DATA_SIZE_SMALL) |
|
302 | + * |
|
303 | + * @access public |
|
304 | + * @param array &$raList Reference to array of PPS's |
|
305 | + */ |
|
306 | 306 | public function _makeSmallData(&$raList) |
307 | 307 | { |
308 | 308 | $sRes = ''; |
@@ -355,11 +355,11 @@ discard block |
||
355 | 355 | } |
356 | 356 | |
357 | 357 | /** |
358 | - * Saves all the PPS's WKs |
|
359 | - * |
|
360 | - * @access public |
|
361 | - * @param array $raList Reference to an array with all PPS's |
|
362 | - */ |
|
358 | + * Saves all the PPS's WKs |
|
359 | + * |
|
360 | + * @access public |
|
361 | + * @param array $raList Reference to an array with all PPS's |
|
362 | + */ |
|
363 | 363 | public function _savePps(&$raList) |
364 | 364 | { |
365 | 365 | // Save each PPS WK |
@@ -376,13 +376,13 @@ discard block |
||
376 | 376 | } |
377 | 377 | |
378 | 378 | /** |
379 | - * Saving Big Block Depot |
|
380 | - * |
|
381 | - * @access public |
|
382 | - * @param integer $iSbdSize |
|
383 | - * @param integer $iBsize |
|
384 | - * @param integer $iPpsCnt |
|
385 | - */ |
|
379 | + * Saving Big Block Depot |
|
380 | + * |
|
381 | + * @access public |
|
382 | + * @param integer $iSbdSize |
|
383 | + * @param integer $iBsize |
|
384 | + * @param integer $iPpsCnt |
|
385 | + */ |
|
386 | 386 | public function _saveBbd($iSbdSize, $iBsize, $iPpsCnt) |
387 | 387 | { |
388 | 388 | $FILE = $this->_FILEH_; |
@@ -50,43 +50,43 @@ discard block |
||
50 | 50 | /** |
51 | 51 | * The file handle for reading an OLE container |
52 | 52 | * @var resource |
53 | - */ |
|
53 | + */ |
|
54 | 54 | public $_file_handle; |
55 | 55 | |
56 | 56 | /** |
57 | - * Array of PPS's found on the OLE container |
|
58 | - * @var array |
|
59 | - */ |
|
57 | + * Array of PPS's found on the OLE container |
|
58 | + * @var array |
|
59 | + */ |
|
60 | 60 | public $_list = array(); |
61 | 61 | |
62 | 62 | /** |
63 | 63 | * Root directory of OLE container |
64 | 64 | * @var OLE_PPS_Root |
65 | - */ |
|
65 | + */ |
|
66 | 66 | public $root; |
67 | 67 | |
68 | 68 | /** |
69 | 69 | * Big Block Allocation Table |
70 | 70 | * @var array (blockId => nextBlockId) |
71 | - */ |
|
71 | + */ |
|
72 | 72 | public $bbat; |
73 | 73 | |
74 | 74 | /** |
75 | 75 | * Short Block Allocation Table |
76 | 76 | * @var array (blockId => nextBlockId) |
77 | - */ |
|
77 | + */ |
|
78 | 78 | public $sbat; |
79 | 79 | |
80 | 80 | /** |
81 | 81 | * Size of big blocks. This is usually 512. |
82 | 82 | * @var int number of octets per block. |
83 | - */ |
|
83 | + */ |
|
84 | 84 | public $bigBlockSize; |
85 | 85 | |
86 | 86 | /** |
87 | 87 | * Size of small blocks. This is usually 64. |
88 | 88 | * @var int number of octets per block |
89 | - */ |
|
89 | + */ |
|
90 | 90 | public $smallBlockSize; |
91 | 91 | |
92 | 92 | /** |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | * @param string $file |
97 | 97 | * @return mixed true on success, PEAR_Error on failure |
98 | 98 | * @throws \PHPExcel\Reader\Exception |
99 | - */ |
|
99 | + */ |
|
100 | 100 | public function read($file) |
101 | 101 | { |
102 | 102 | $fh = fopen($file, "r"); |
@@ -193,11 +193,11 @@ discard block |
||
193 | 193 | } |
194 | 194 | |
195 | 195 | /** |
196 | - * Returns a stream for use with fread() etc. External callers should |
|
197 | - * use \PHPExcel\Shared\OLE\PPS\File::getStream(). |
|
198 | - * @param int|PPS block id or PPS |
|
199 | - * @return resource read-only stream |
|
200 | - */ |
|
196 | + * Returns a stream for use with fread() etc. External callers should |
|
197 | + * use \PHPExcel\Shared\OLE\PPS\File::getStream(). |
|
198 | + * @param int|PPS block id or PPS |
|
199 | + * @return resource read-only stream |
|
200 | + */ |
|
201 | 201 | public function getStream($blockIdOrPps) |
202 | 202 | { |
203 | 203 | static $isRegistered = false; |
@@ -259,13 +259,13 @@ discard block |
||
259 | 259 | } |
260 | 260 | |
261 | 261 | /** |
262 | - * Gets information about all PPS's on the OLE container from the PPS WK's |
|
263 | - * creates an OLE_PPS object for each one. |
|
264 | - * |
|
265 | - * @access public |
|
266 | - * @param integer the block id of the first block |
|
267 | - * @return mixed true on success, PEAR_Error on failure |
|
268 | - */ |
|
262 | + * Gets information about all PPS's on the OLE container from the PPS WK's |
|
263 | + * creates an OLE_PPS object for each one. |
|
264 | + * |
|
265 | + * @access public |
|
266 | + * @param integer the block id of the first block |
|
267 | + * @return mixed true on success, PEAR_Error on failure |
|
268 | + */ |
|
269 | 269 | public function _readPpsWks($blockId) |
270 | 270 | { |
271 | 271 | $fh = $this->getStream($blockId); |
@@ -333,13 +333,13 @@ discard block |
||
333 | 333 | } |
334 | 334 | |
335 | 335 | /** |
336 | - * It checks whether the PPS tree is complete (all PPS's read) |
|
337 | - * starting with the given PPS (not necessarily root) |
|
338 | - * |
|
339 | - * @access public |
|
340 | - * @param integer $index The index of the PPS from which we are checking |
|
341 | - * @return boolean Whether the PPS tree for the given PPS is complete |
|
342 | - */ |
|
336 | + * It checks whether the PPS tree is complete (all PPS's read) |
|
337 | + * starting with the given PPS (not necessarily root) |
|
338 | + * |
|
339 | + * @access public |
|
340 | + * @param integer $index The index of the PPS from which we are checking |
|
341 | + * @return boolean Whether the PPS tree for the given PPS is complete |
|
342 | + */ |
|
343 | 343 | public function _ppsTreeComplete($index) |
344 | 344 | { |
345 | 345 | return isset($this->_list[$index]) && |
@@ -353,13 +353,13 @@ discard block |
||
353 | 353 | } |
354 | 354 | |
355 | 355 | /** |
356 | - * Checks whether a PPS is a File PPS or not. |
|
357 | - * If there is no PPS for the index given, it will return false. |
|
358 | - * |
|
359 | - * @access public |
|
360 | - * @param integer $index The index for the PPS |
|
361 | - * @return bool true if it's a File PPS, false otherwise |
|
362 | - */ |
|
356 | + * Checks whether a PPS is a File PPS or not. |
|
357 | + * If there is no PPS for the index given, it will return false. |
|
358 | + * |
|
359 | + * @access public |
|
360 | + * @param integer $index The index for the PPS |
|
361 | + * @return bool true if it's a File PPS, false otherwise |
|
362 | + */ |
|
363 | 363 | public function isFile($index) |
364 | 364 | { |
365 | 365 | if (isset($this->_list[$index])) { |
@@ -369,13 +369,13 @@ discard block |
||
369 | 369 | } |
370 | 370 | |
371 | 371 | /** |
372 | - * Checks whether a PPS is a Root PPS or not. |
|
373 | - * If there is no PPS for the index given, it will return false. |
|
374 | - * |
|
375 | - * @access public |
|
376 | - * @param integer $index The index for the PPS. |
|
377 | - * @return bool true if it's a Root PPS, false otherwise |
|
378 | - */ |
|
372 | + * Checks whether a PPS is a Root PPS or not. |
|
373 | + * If there is no PPS for the index given, it will return false. |
|
374 | + * |
|
375 | + * @access public |
|
376 | + * @param integer $index The index for the PPS. |
|
377 | + * @return bool true if it's a Root PPS, false otherwise |
|
378 | + */ |
|
379 | 379 | public function isRoot($index) |
380 | 380 | { |
381 | 381 | if (isset($this->_list[$index])) { |
@@ -385,28 +385,28 @@ discard block |
||
385 | 385 | } |
386 | 386 | |
387 | 387 | /** |
388 | - * Gives the total number of PPS's found in the OLE container. |
|
389 | - * |
|
390 | - * @access public |
|
391 | - * @return integer The total number of PPS's found in the OLE container |
|
392 | - */ |
|
388 | + * Gives the total number of PPS's found in the OLE container. |
|
389 | + * |
|
390 | + * @access public |
|
391 | + * @return integer The total number of PPS's found in the OLE container |
|
392 | + */ |
|
393 | 393 | public function ppsTotal() |
394 | 394 | { |
395 | 395 | return count($this->_list); |
396 | 396 | } |
397 | 397 | |
398 | 398 | /** |
399 | - * Gets data from a PPS |
|
400 | - * If there is no PPS for the index given, it will return an empty string. |
|
401 | - * |
|
402 | - * @access public |
|
403 | - * @param integer $index The index for the PPS |
|
404 | - * @param integer $position The position from which to start reading |
|
405 | - * (relative to the PPS) |
|
406 | - * @param integer $length The amount of bytes to read (at most) |
|
407 | - * @return string The binary string containing the data requested |
|
408 | - * @see OLE_PPS_File::getStream() |
|
409 | - */ |
|
399 | + * Gets data from a PPS |
|
400 | + * If there is no PPS for the index given, it will return an empty string. |
|
401 | + * |
|
402 | + * @access public |
|
403 | + * @param integer $index The index for the PPS |
|
404 | + * @param integer $position The position from which to start reading |
|
405 | + * (relative to the PPS) |
|
406 | + * @param integer $length The amount of bytes to read (at most) |
|
407 | + * @return string The binary string containing the data requested |
|
408 | + * @see OLE_PPS_File::getStream() |
|
409 | + */ |
|
410 | 410 | public function getData($index, $position, $length) |
411 | 411 | { |
412 | 412 | // if position is not valid return empty string |
@@ -420,13 +420,13 @@ discard block |
||
420 | 420 | } |
421 | 421 | |
422 | 422 | /** |
423 | - * Gets the data length from a PPS |
|
424 | - * If there is no PPS for the index given, it will return 0. |
|
425 | - * |
|
426 | - * @access public |
|
427 | - * @param integer $index The index for the PPS |
|
428 | - * @return integer The amount of bytes in data the PPS has |
|
429 | - */ |
|
423 | + * Gets the data length from a PPS |
|
424 | + * If there is no PPS for the index given, it will return 0. |
|
425 | + * |
|
426 | + * @access public |
|
427 | + * @param integer $index The index for the PPS |
|
428 | + * @return integer The amount of bytes in data the PPS has |
|
429 | + */ |
|
430 | 430 | public function getDataLength($index) |
431 | 431 | { |
432 | 432 | if (isset($this->_list[$index])) { |
@@ -436,13 +436,13 @@ discard block |
||
436 | 436 | } |
437 | 437 | |
438 | 438 | /** |
439 | - * Utility function to transform ASCII text to Unicode |
|
440 | - * |
|
441 | - * @access public |
|
442 | - * @static |
|
443 | - * @param string $ascii The ASCII string to transform |
|
444 | - * @return string The string in Unicode |
|
445 | - */ |
|
439 | + * Utility function to transform ASCII text to Unicode |
|
440 | + * |
|
441 | + * @access public |
|
442 | + * @static |
|
443 | + * @param string $ascii The ASCII string to transform |
|
444 | + * @return string The string in Unicode |
|
445 | + */ |
|
446 | 446 | public static function ascToUcs($ascii) |
447 | 447 | { |
448 | 448 | $rawname = ''; |
@@ -453,14 +453,14 @@ discard block |
||
453 | 453 | } |
454 | 454 | |
455 | 455 | /** |
456 | - * Utility function |
|
457 | - * Returns a string for the OLE container with the date given |
|
458 | - * |
|
459 | - * @access public |
|
460 | - * @static |
|
461 | - * @param integer $date A timestamp |
|
462 | - * @return string The string for the OLE container |
|
463 | - */ |
|
456 | + * Utility function |
|
457 | + * Returns a string for the OLE container with the date given |
|
458 | + * |
|
459 | + * @access public |
|
460 | + * @static |
|
461 | + * @param integer $date A timestamp |
|
462 | + * @return string The string for the OLE container |
|
463 | + */ |
|
464 | 464 | public static function localDateToOLE($date = null) |
465 | 465 | { |
466 | 466 | if (!isset($date)) { |
@@ -498,13 +498,13 @@ discard block |
||
498 | 498 | } |
499 | 499 | |
500 | 500 | /** |
501 | - * Returns a timestamp from an OLE container's date |
|
502 | - * |
|
503 | - * @access public |
|
504 | - * @static |
|
505 | - * @param integer $string A binary string with the encoded date |
|
506 | - * @return string The timestamp corresponding to the string |
|
507 | - */ |
|
501 | + * Returns a timestamp from an OLE container's date |
|
502 | + * |
|
503 | + * @access public |
|
504 | + * @static |
|
505 | + * @param integer $string A binary string with the encoded date |
|
506 | + * @return string The timestamp corresponding to the string |
|
507 | + */ |
|
508 | 508 | public static function OLE2LocalDate($string) |
509 | 509 | { |
510 | 510 | if (strlen($string) != 8) { |