diff --git a/include/php_writeexcel/class.writeexcel_workbook.inc.php b/include/php_writeexcel/class.writeexcel_workbook.inc.php
index 85a398d23d0cf441b8f121db03dc2616daf125b8..cdaac1557224f63c56876113e14c5f154b4073c8 100644 (file)
$this->_palette = array();
# Add the default format for hyperlinks
- $this->_url_format =& $this->addformat(array('color' => 'blue', 'underline' => 1));
+ $this->_url_format = $this->addformat(array('color' => 'blue', 'underline' => 1));
# Check for a filename
if ($this->_filename == '') {
#
# Returns: a list of the worksheet objects in a workbook
#
-function &sheets() {
+function sheets() {
return $this->_worksheets;
}
#
# Returns: reference to a worksheet object
#
-function &addworksheet($name="") {
+function addworksheet($name="") {
# Check that sheetname is <= 31 chars (Excel limit).
if (strlen($name) > 31) {
}
}
- $worksheet =& new writeexcel_worksheet($name, $index, $this->_activesheet,
+ $worksheet = new writeexcel_worksheet($name, $index, $this->_activesheet,
$this->_firstsheet,
$this->_url_format, $this->_parser,
$this->_tempdir);
- $this->_worksheets[$index] = &$worksheet; # Store ref for iterator
+ $this->_worksheets[$index] = $worksheet; # Store ref for iterator
$this->_sheetnames[$index] = $name; # Store EXTERNSHEET names
$this->_parser->set_ext_sheet($name, $index); # Store names in Formula.pm
return $worksheet;
# Add a new format to the Excel workbook. This adds an XF record and
# a FONT record. Also, pass any properties to the Format::new().
#
-function &addformat($para=false) {
+function addformat($para=false) {
if($para===false) {
- $format =& new writeexcel_format($this->_xf_index);
+ $format = new writeexcel_format($this->_xf_index);
} else {
- $format =& new writeexcel_format($this->_xf_index, $para);
+ $format = new writeexcel_format($this->_xf_index, $para);
}
$this->_xf_index += 1;
# Store format reference
- $this->_formats[]=&$format;
+ $this->_formats[]=$format;
return $format;
}
}
*/
- $aref = &$this->_palette;
+ $aref = $this->_palette;
# Check that the colour index is the right range
if ($index < 8 or $index > 64) {
# Calculate the number of selected worksheet tabs and call the finalization
# methods for each worksheet
for ($c=0;$c<sizeof($this->_worksheets);$c++) {
- $sheet=&$this->_worksheets[$c];
+ $sheet=$this->_worksheets[$c];
if ($sheet->_selected) {
$this->_selected++;
- }
+
+ }
$sheet->_close($this->_sheetnames);
}
# Add BOUNDSHEET records
for ($c=0;$c<sizeof($this->_worksheets);$c++) {
- $sheet=&$this->_worksheets[$c];
+ $sheet=$this->_worksheets[$c];
$this->_store_boundsheet($sheet->_name, $sheet->_offset);
}
$OLE->write($this->_data);
for ($c=0;$c<sizeof($this->_worksheets);$c++) {
- $sheet=&$this->_worksheets[$c];
+ $sheet=$this->_worksheets[$c];
while ($tmp = $sheet->get_data()) {
$OLE->write($tmp);
}
$offset += $EOF;
for ($c=0;$c<sizeof($this->_worksheets);$c++) {
- $sheet=&$this->_worksheets[$c];
+ $sheet=$this->_worksheets[$c];
$sheet->_offset = $offset;
$offset += $sheet->_datasize;
}
$fonts[$key] = 0; # Index of the default font
for ($c=0;$c<sizeof($this->_formats);$c++) {
- $format=&$this->_formats[$c];
+ $format=$this->_formats[$c];
$key = $format->get_font_key();
#
for ($c=0;$c<sizeof($this->_formats);$c++) {
- $format=&$this->_formats[$c];
+ $format=$this->_formats[$c];
$num_format = $format->_num_format;
# Stores the PALETTE biff record.
#
function _store_palette() {
- $aref = &$this->_palette;
+ $aref = $this->_palette;
$record = 0x0092; # Record identifier
$length = 2 + 4 * sizeof($aref); # Number of bytes to follow