1334,7 → 1334,7 |
* @access private |
* @param string $data The binary data to append |
*/ |
function _append($data) |
function _append(&$data) |
{ |
if ($this->_using_tmpfile) { |
// Add CONTINUE records if necessary |
1534,7 → 1534,8 |
$xl_double = strrev($xl_double); |
} |
|
$this->_append($header.$data.$xl_double); |
$data = $header . $data . $xl_double; |
$this->_append($data); |
return(0); |
} |
|
1594,7 → 1595,9 |
|
$header = pack("vv", $record, $length); |
$data = pack("vvvv", $row, $col, $xf, $strlen); |
$this->_append($header . $data . $str); |
|
$data = $header . $data . $str; |
$this->_append($data); |
return($str_error); |
} |
|
1666,7 → 1669,9 |
|
$header = pack('vv', $record, $length); |
$data = pack('vvvV', $row, $col, $xf, $this->_str_table[$str]); |
$this->_append($header.$data); |
$data = $header . $data; |
|
$this->_append($data); |
return $str_error; |
} |
|
1742,15 → 1747,19 |
// Length for this record is no more than 2048 + 6 |
$length = 0x0006 + min($note_length, 2048); |
$header = pack("vv", $record, $length); |
$data = pack("vvv", $row, $col, $note_length); |
$this->_append($header . $data . substr($note, 0, 2048)); |
$data = pack("vvv", $row, $col, $note_length) . substr($note, 0, 2048); |
$data = $header . $data; |
|
$this->_append($data); |
|
for ($i = $max_length; $i < $note_length; $i += $max_length) { |
$chunk = substr($note, $i, $max_length); |
$length = 0x0006 + strlen($chunk); |
$header = pack("vv", $record, $length); |
$data = pack("vvv", -1, 0, strlen($chunk)); |
$this->_append($header.$data.$chunk); |
$data = pack("vvv", -1, 0, strlen($chunk)) . $chunk; |
$data = $header . $data; |
|
$this->_append($data); |
} |
return(0); |
} |
1805,7 → 1814,9 |
|
$header = pack("vv", $record, $length); |
$data = pack("vvv", $row, $col, $xf); |
$this->_append($header . $data); |
$data = $header . $data; |
|
$this->_append($data); |
return 0; |
} |
|
1875,8 → 1886,9 |
$header = pack("vv", $record, $length); |
$data = pack("vvvdvVv", $row, $col, $xf, $num, |
$grbit, $unknown, $formlen); |
$data = $header . $data . $formula; |
|
$this->_append($header . $data . $formula); |
$this->_append($data); |
return 0; |
} |
|
1996,10 → 2008,10 |
$header = pack("vv", $record, $length); |
$data = pack("vvvv", $row1, $row2, $col1, $col2); |
|
$data = $header . $data . $unknown1 . $options . $unknown2 . $url_len . $url; |
|
// Write the packed data |
$this->_append($header . $data . |
$unknown1 . $options . |
$unknown2 . $url_len . $url); |
$this->_append($data); |
return($str_error); |
} |
|
2058,10 → 2070,10 |
$header = pack("vv", $record, $length); |
$data = pack("vvvv", $row1, $row2, $col1, $col2); |
|
$data = $header . $data . $unknown1 . $options . $url_len . $url; |
|
// Write the packed data |
$this->_append($header . $data . |
$unknown1 . $options . |
$url_len . $url); |
$this->_append($data); |
return($str_error); |
} |
|
2195,9 → 2207,10 |
// Pack the header data |
$length = strlen($data); |
$header = pack("vv", $record, $length); |
|
$data = $header. $data; |
|
// Write the packed data |
$this->_append($header. $data); |
$this->_append($data); |
return($str_error); |
} |
|
2258,7 → 2271,8 |
$header = pack("vv", $record, $length); |
$data = pack("vvvvvvvv", $row, $colMic, $colMac, $miyRw, |
$irwMac,$reserved, $grbit, $ixfe); |
$this->_append($header.$data); |
$data = $header . $data; |
$this->_append($data); |
} |
|
/** |
2344,7 → 2358,9 |
$zoom_factor_normal = 0x0000; |
$data .= pack("vvvvV", $rgbHdr, 0x0000, $zoom_factor_page_break, $zoom_factor_normal, 0x00000000); |
} |
$this->_append($header.$data); |
$data = $header.$data; |
|
$this->_append($data); |
} |
|
/** |
2464,7 → 2480,9 |
$irefAct, $cref, |
$rwFirst, $rwLast, |
$colFirst, $colLast); |
$this->_append($header . $data); |
$data = $header . $data; |
|
$this->_append($data); |
} |
|
/** |
2486,8 → 2504,9 |
$data = pack('v', count($ranges)); |
foreach($ranges as $range) |
$data .= pack('vvvv', $range[0], $range[2], $range[1], $range[3]); |
$string=$header.$data; |
$this->_append(&$string, true); |
$string = $header . $data; |
|
$this->_append($string); |
} |
} |
|
2624,7 → 2643,8 |
|
$header = pack("vv", $record, $length); |
$data = pack("vvvvv", $x, $y, $rwTop, $colLeft, $pnnAct); |
$this->_append($header . $data); |
$data = $header . $data; |
$this->_append($data); |
} |
|
/** |
2892,8 → 2912,8 |
$header = pack("vv", $record, $length); |
$data = pack("vvvvv", $cref, $first_row, $last_row, |
$first_col, $last_col); |
|
$this->_append($header.$data); |
$data = $header . $data; |
$this->_append($data); |
} |
|
/** |
3210,7 → 3230,8 |
$lcb = $size; |
|
$header = pack("vvvvV", $record, $length, $cf, $env, $lcb); |
$this->_append($header.$data); |
$data = $header . $data; |
$this->_append($data); |
} |
|
/** |
3445,7 → 3466,8 |
$data .= pack("v", $grbit2); |
$data .= pack("V", $Reserved5); |
|
$this->_append($header . $data); |
$data = $header . $data; |
$this->_append($data); |
} |
|
/** |
3553,7 → 3575,8 |
|
$header = pack("vv", $record, $length); |
$data = pack("vv", $this->_zoom, 100); |
$this->_append($header . $data); |
$data = $header . $data; |
$this->_append($data); |
} |
|
/** |
3583,13 → 3606,15 |
$header = pack('vv', $record, $length); |
$data = pack('vVVVV', $grbit, $horPos, $verPos, $objId, |
count($this->_dv)); |
$this->_append($header.$data); |
$data = $header . $data; |
$this->_append($data); |
|
$record = 0x01be; // Record identifier |
foreach ($this->_dv as $dv) { |
$length = strlen($dv); // Bytes to follow |
$header = pack("vv", $record, $length); |
$this->_append($header . $dv); |
$header .= $dv; |
$this->_append($header); |
} |
} |
} |