code cleanup

git-svn-id: https://svn.php.net/repository/pear/packages/Spreadsheet_Excel_Writer/trunk@141423 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Xavier Noguer Gallego 2003-10-01 09:17:45 +00:00
parent 7641474dfb
commit e461d9b467
1 changed files with 60 additions and 62 deletions

View File

@ -1,6 +1,6 @@
<?php
/*
* Module written/ported by Xavier Noguer <xnoguer@rezebra.com>
* Module written/ported by Xavier Noguer <xnoguer@php.net>
*
* The majority of this is _NOT_ my code. I simply ported it from the
* PERL Spreadsheet::WriteExcel module.
@ -15,7 +15,7 @@
* License Information:
*
* Spreadsheet_Excel_Writer: A library for generating Excel Spreadsheets
* Copyright (c) 2002-2003 Xavier Noguer xnoguer@rezebra.com
* Copyright (c) 2002-2003 Xavier Noguer xnoguer@php.net
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -46,7 +46,7 @@ require_once('PEAR.php');
* formula entered into a cell; one describes the size and location of a
* window into a document; another describes a picture format.
*
* @author Xavier Noguer <xnoguer@rezebra.com>
* @author Xavier Noguer <xnoguer@php.net>
* @category FileFormats
* @package Spreadsheet_Excel_Writer
*/
@ -106,8 +106,6 @@ class Spreadsheet_Excel_Writer_BIFFwriter extends PEAR
* @access private
*/
function _setByteOrder()
{
if ($this->_byte_order == '')
{
// Check if "pack" gives the required IEEE 64bit float
$teststr = pack("d", 1.2345);
@ -120,9 +118,8 @@ class Spreadsheet_Excel_Writer_BIFFwriter extends PEAR
}
else {
// Give up. I'll fix this in a later version.
$this->raiseError("Required floating point format not supported ".
"on this platform.");
}
return $this->raiseError("Required floating point format ".
"not supported on this platform.");
}
$this->_byte_order = $byte_order;
}
@ -161,7 +158,8 @@ class Spreadsheet_Excel_Writer_BIFFwriter extends PEAR
* Writes Excel BOF record to indicate the beginning of a stream or
* sub-stream in the BIFF file.
*
* @param integer $type type of BIFF file to write: 0x0005 Workbook, 0x0010 Worksheet.
* @param integer $type Type of BIFF file to write: 0x0005 Workbook,
* 0x0010 Worksheet.
* @access private
*/
function _storeBof($type)
@ -229,7 +227,7 @@ class Spreadsheet_Excel_Writer_BIFFwriter extends PEAR
$tmp .= $header;
$tmp .= substr($data,$i,strlen($data) - $i);
return($tmp);
return $tmp;
}
}
?>