Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 1604 → Rev 2407

/trunk/jrest/lib/Spreadsheet/Excel/Writer/Worksheet.php
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);
}
}
}
/trunk/jrest/lib/Spreadsheet/Excel/Writer/Workbook.php
882,7 → 882,8
$header = pack('vv', $record, $length);
$data = pack('v', $cv);
 
$this->_append($header . $data);
$data = $header . $data;
$this->_append($data);
}
 
/**
912,7 → 913,8
$grbit,
$itabCur, $itabFirst,
$ctabsel, $wTabRatio);
$this->_append($header . $data);
$data = $header . $data;
$this->_append($data);
}
 
/**
945,7 → 947,9
} else {
$data = pack("VvC", $offset, $grbit, $cch);
}
$this->_append($header.$data.$sheetname);
 
$data = $header.$data.$sheetname;
$this->_append($data);
}
 
/**
960,7 → 964,8
 
$header = pack("vv", $record, $length);
$data = pack("vv", count($this->_worksheets), 0x0104);
$this->_append($header . $data);
$data = $header . $data;
$this->_append($data);
}
 
/**
982,7 → 987,8
for ($i = 0; $i < $total_references; $i++) {
$data .= $this->_parser->_references[$i];
}
$this->_append($header . $data);
$data = $header . $data;
$this->_append($data);
}
 
/**
1001,7 → 1007,8
 
$header = pack("vv", $record, $length);
$data = pack("vCC", $ixfe, $BuiltIn, $iLevel);
$this->_append($header . $data);
$data = $header . $data;
$this->_append($data);
}
 
 
1042,7 → 1049,8
$header = pack("vv", $record, 3 + $length);
$data = pack("vC", $ifmt, $cch);
}
$this->_append($header . $data . $format);
$data = $header . $data . $format;
$this->_append($data);
}
 
/**
1059,7 → 1067,8
 
$header = pack("vv", $record, $length);
$data = pack("v", $f1904);
$this->_append($header . $data);
$data = $header . $data;
$this->_append($data);
}
 
 
1083,7 → 1092,8
 
$header = pack("vv", $record, $length);
$data = pack("v", $cxals);
$this->_append($header . $data);
$data = $header . $data;
$this->_append($data);
}
 
 
1107,7 → 1117,8
 
$header = pack("vv", $record, $length);
$data = pack("CC", $cch, $rgch);
$this->_append($header . $data . $sheetname);
$data = $header . $data . $sheetname;
$this->_append($data);
}
 
 
1171,7 → 1182,8
$data .= pack("v", $rowmax);
$data .= pack("C", $colmin);
$data .= pack("C", $colmax);
$this->_append($header . $data);
$data = $header . $data;
$this->_append($data);
}
 
 
1256,7 → 1268,8
$data .= pack("C", 0xff);
// End of data
$data .= pack("C", 0x10);
$this->_append($header . $data);
$data = $header . $data;
$this->_append($data);
}
 
/**
1272,7 → 1285,8
$header = pack('vv', $record, $length);
/* using the same country code always for simplicity */
$data = pack('vv', $this->_country_code, $this->_country_code);
$this->_append($header . $data);
$data = $header . $data;
$this->_append($data);
}
 
/**
1297,7 → 1311,8
}
 
$header = pack("vvv", $record, $length, $ccv);
$this->_append($header . $data);
$data = $header . $data;
$this->_append($data);
}
 
/**
1488,7 → 1503,8
// Write the SST block header information
$header = pack("vv", $record, $length);
$data = pack("VV", $this->_str_total, $this->_str_unique);
$this->_append($header . $data);
$data = $header . $data;
$this->_append($data);
 
 
 
/trunk/jrest/lib/Spreadsheet/Excel/Writer/BIFFwriter.php
156,7 → 156,7
* @param string $data binary data to append
* @access private
*/
function _append($data)
function _append(&$data)
{
if (strlen($data) > $this->_limit) {
$data = $this->_addContinue($data);