Replace var with public, prefix function definitions with public or protected

This commit is contained in:
Alexey Kopytko 2016-06-16 11:20:14 +09:00
parent 22c7e1705f
commit 012389ee13
6 changed files with 399 additions and 399 deletions

View File

@ -57,51 +57,51 @@ class Spreadsheet_Excel_Writer_BIFFwriter extends PEAR
* The BIFF/Excel version (5).
* @var integer
*/
var $_BIFF_version = 0x0500;
public $_BIFF_version = 0x0500;
/**
* The byte order of this architecture. 0 => little endian, 1 => big endian
* @var integer
*/
var $_byte_order;
public $_byte_order;
/**
* The string containing the data of the BIFF stream
* @var string
*/
var $_data;
public $_data;
/**
* The size of the data in bytes. Should be the same as strlen($this->_data)
* @var integer
*/
var $_datasize;
public $_datasize;
/**
* The maximun length for a BIFF record. See _addContinue()
* @var integer
* @see _addContinue()
*/
var $_limit;
public $_limit;
/**
* The temporary dir for storing the OLE file
* @var string
*/
var $_tmp_dir;
public $_tmp_dir;
/**
* The temporary file for storing the OLE file
* @var string
*/
var $_tmp_file;
public $_tmp_file;
/**
* Constructor
*
* @access public
*/
function Spreadsheet_Excel_Writer_BIFFwriter()
public function Spreadsheet_Excel_Writer_BIFFwriter()
{
$this->_byte_order = '';
$this->_data = '';
@ -118,7 +118,7 @@ class Spreadsheet_Excel_Writer_BIFFwriter extends PEAR
*
* @access private
*/
function _setByteOrder()
protected function _setByteOrder()
{
// Check if "pack" gives the required IEEE 64bit float
$teststr = pack("d", 1.2345);
@ -136,12 +136,12 @@ class Spreadsheet_Excel_Writer_BIFFwriter extends PEAR
}
/**
* General storage function
* General storage public function
*
* @param string $data binary data to prepend
* @access private
*/
function _prepend($data)
protected function _prepend($data)
{
if (strlen($data) > $this->_limit) {
$data = $this->_addContinue($data);
@ -151,12 +151,12 @@ class Spreadsheet_Excel_Writer_BIFFwriter extends PEAR
}
/**
* General storage function
* General storage public function
*
* @param string $data binary data to append
* @access private
*/
function _append($data)
protected function _append($data)
{
if (strlen($data) > $this->_limit) {
$data = $this->_addContinue($data);
@ -173,7 +173,7 @@ class Spreadsheet_Excel_Writer_BIFFwriter extends PEAR
* 0x0010 Worksheet.
* @access private
*/
function _storeBof($type)
protected function _storeBof($type)
{
$record = 0x0809; // Record identifier
@ -202,7 +202,7 @@ class Spreadsheet_Excel_Writer_BIFFwriter extends PEAR
*
* @access private
*/
function _storeEof()
protected function _storeEof()
{
$record = 0x000A; // Record identifier
$length = 0x0000; // Number of bytes to follow
@ -215,14 +215,14 @@ class Spreadsheet_Excel_Writer_BIFFwriter extends PEAR
* Excel 97 the limit is 8228 bytes. Records that are longer than these limits
* must be split up into CONTINUE blocks.
*
* This function takes a long BIFF record and inserts CONTINUE records as
* This public function takes a long BIFF record and inserts CONTINUE records as
* necessary.
*
* @param string $data The original binary data to be written
* @return string A very convenient string of continue blocks
* @access private
*/
function _addContinue($data)
protected function _addContinue($data)
{
$limit = $this->_limit;
$record = 0x003C; // Record identifier
@ -255,7 +255,7 @@ class Spreadsheet_Excel_Writer_BIFFwriter extends PEAR
* @param string $dir The dir to be used as temp dir
* @return true if given dir is valid, false otherwise
*/
function setTempDir($dir)
public function setTempDir($dir)
{
if (is_dir($dir)) {
$this->_tmp_dir = $dir;

View File

@ -48,199 +48,199 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
* The index given by the workbook when creating a new format.
* @var integer
*/
var $_xf_index;
public $_xf_index;
/**
* Index to the FONT record.
* @var integer
*/
var $font_index;
public $font_index;
/**
* The font name (ASCII).
* @var string
*/
var $_font_name;
public $_font_name;
/**
* Height of font (1/20 of a point)
* @var integer
*/
var $_size;
public $_size;
/**
* Bold style
* @var integer
*/
var $_bold;
public $_bold;
/**
* Bit specifiying if the font is italic.
* @var integer
*/
var $_italic;
public $_italic;
/**
* Index to the cell's color
* @var integer
*/
var $_color;
public $_color;
/**
* The text underline property
* @var integer
*/
var $_underline;
public $_underline;
/**
* Bit specifiying if the font has strikeout.
* @var integer
*/
var $_font_strikeout;
public $_font_strikeout;
/**
* Bit specifiying if the font has outline.
* @var integer
*/
var $_font_outline;
public $_font_outline;
/**
* Bit specifiying if the font has shadow.
* @var integer
*/
var $_font_shadow;
public $_font_shadow;
/**
* 2 bytes specifiying the script type for the font.
* @var integer
*/
var $_font_script;
public $_font_script;
/**
* Byte specifiying the font family.
* @var integer
*/
var $_font_family;
public $_font_family;
/**
* Byte specifiying the font charset.
* @var integer
*/
var $_font_charset;
public $_font_charset;
/**
* An index (2 bytes) to a FORMAT record (number format).
* @var integer
*/
var $_num_format;
public $_num_format;
/**
* Bit specifying if formulas are hidden.
* @var integer
*/
var $_hidden;
public $_hidden;
/**
* Bit specifying if the cell is locked.
* @var integer
*/
var $_locked;
public $_locked;
/**
* The three bits specifying the text horizontal alignment.
* @var integer
*/
var $_text_h_align;
public $_text_h_align;
/**
* Bit specifying if the text is wrapped at the right border.
* @var integer
*/
var $_text_wrap;
public $_text_wrap;
/**
* The three bits specifying the text vertical alignment.
* @var integer
*/
var $_text_v_align;
public $_text_v_align;
/**
* 1 bit, apparently not used.
* @var integer
*/
var $_text_justlast;
public $_text_justlast;
/**
* The two bits specifying the text rotation.
* @var integer
*/
var $_rotation;
public $_rotation;
/**
* The cell's foreground color.
* @var integer
*/
var $_fg_color;
public $_fg_color;
/**
* The cell's background color.
* @var integer
*/
var $_bg_color;
public $_bg_color;
/**
* The cell's background fill pattern.
* @var integer
*/
var $_pattern;
public $_pattern;
/**
* Style of the bottom border of the cell
* @var integer
*/
var $_bottom;
public $_bottom;
/**
* Color of the bottom border of the cell.
* @var integer
*/
var $_bottom_color;
public $_bottom_color;
/**
* Style of the top border of the cell
* @var integer
*/
var $_top;
public $_top;
/**
* Color of the top border of the cell.
* @var integer
*/
var $_top_color;
public $_top_color;
/**
* Style of the left border of the cell
* @var integer
*/
var $_left;
public $_left;
/**
* Color of the left border of the cell.
* @var integer
*/
var $_left_color;
public $_left_color;
/**
* Style of the right border of the cell
* @var integer
*/
var $_right;
public $_right;
/**
* Color of the right border of the cell.
* @var integer
*/
var $_right_color;
public $_right_color;
/**
* Constructor
@ -249,7 +249,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
* @param integer $index the XF index for the format.
* @param array $properties array with properties to be set on initialization.
*/
function Spreadsheet_Excel_Writer_Format($BIFF_version, $index = 0, $properties = array())
public function Spreadsheet_Excel_Writer_Format($BIFF_version, $index = 0, $properties = array())
{
$this->_xf_index = $index;
$this->_BIFF_version = $BIFF_version;
@ -312,7 +312,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
* @param string $style The type of the XF record ('style' or 'cell').
* @return string The XF record
*/
function getXf($style)
public function getXf($style)
{
// Set the type of the XF record and some of the attributes.
if ($style == 'style') {
@ -444,7 +444,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
*
* @return string The FONT record
*/
function getFont()
public function getFont()
{
$dyHeight = $this->_size * 20; // Height of font (1/20 of a point)
$icv = $this->_color; // Index to color palette
@ -500,7 +500,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
*
* @return string A key for this font
*/
function getFontKey()
public function getFontKey()
{
$key = "$this->_font_name$this->_size";
$key .= "$this->_font_script$this->_underline";
@ -516,7 +516,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
*
* @return integer The index for the XF record
*/
function getXfIndex()
public function getXfIndex()
{
return($this->_xf_index);
}
@ -530,7 +530,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
* @param string $name_color name of the color (i.e.: 'blue', 'red', etc..). Optional.
* @return integer The color index
*/
function _getColor($name_color = '')
protected function _getColor($name_color = '')
{
$colors = array(
'aqua' => 0x07,
@ -583,7 +583,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
* @access public
* @param string $location alignment for the cell ('left', 'right', etc...).
*/
function setAlign($location)
public function setAlign($location)
{
if (preg_match("/\d/",$location)) {
return; // Ignore numbers
@ -641,7 +641,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
* @access public
* @param string $location alignment for the cell ('left', 'right', etc...).
*/
function setHAlign($location)
public function setHAlign($location)
{
if (preg_match("/\d/",$location)) {
return; // Ignore numbers
@ -681,7 +681,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
* @access public
* @param string $location alignment for the cell ('top', 'vleft', 'vright', etc...).
*/
function setVAlign($location)
public function setVAlign($location)
{
if (preg_match("/\d/",$location)) {
return; // Ignore numbers
@ -714,7 +714,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
*
* @access public
*/
function setMerge()
public function setMerge()
{
$this->setAlign('merge');
}
@ -729,7 +729,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
1 maps to 700 (bold text). Valid range is: 100-1000.
It's Optional, default is 1 (bold).
*/
function setBold($weight = 1)
public function setBold($weight = 1)
{
if ($weight == 1) {
$weight = 0x2BC; // Bold text
@ -757,7 +757,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
* @access public
* @param integer $style style of the cell border. 1 => thin, 2 => thick.
*/
function setBottom($style)
public function setBottom($style)
{
$this->_bottom = $style;
}
@ -768,7 +768,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
* @access public
* @param integer $style style of the cell top border. 1 => thin, 2 => thick.
*/
function setTop($style)
public function setTop($style)
{
$this->_top = $style;
}
@ -779,7 +779,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
* @access public
* @param integer $style style of the cell left border. 1 => thin, 2 => thick.
*/
function setLeft($style)
public function setLeft($style)
{
$this->_left = $style;
}
@ -790,7 +790,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
* @access public
* @param integer $style style of the cell right border. 1 => thin, 2 => thick.
*/
function setRight($style)
public function setRight($style)
{
$this->_right = $style;
}
@ -802,7 +802,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
* @access public
* @param integer $style style to apply for all cell borders. 1 => thin, 2 => thick.
*/
function setBorder($style)
public function setBorder($style)
{
$this->setBottom($style);
$this->setTop($style);
@ -822,7 +822,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
* @param mixed $color The color we are setting. Either a string (like 'blue'),
* or an integer (range is [8...63]).
*/
function setBorderColor($color)
public function setBorderColor($color)
{
$this->setBottomColor($color);
$this->setTopColor($color);
@ -836,7 +836,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
* @access public
* @param mixed $color either a string (like 'blue'), or an integer (range is [8...63]).
*/
function setBottomColor($color)
public function setBottomColor($color)
{
$value = $this->_getColor($color);
$this->_bottom_color = $value;
@ -848,7 +848,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
* @access public
* @param mixed $color either a string (like 'blue'), or an integer (range is [8...63]).
*/
function setTopColor($color)
public function setTopColor($color)
{
$value = $this->_getColor($color);
$this->_top_color = $value;
@ -860,7 +860,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
* @access public
* @param mixed $color either a string (like 'blue'), or an integer (range is [8...63]).
*/
function setLeftColor($color)
public function setLeftColor($color)
{
$value = $this->_getColor($color);
$this->_left_color = $value;
@ -872,7 +872,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
* @access public
* @param mixed $color either a string (like 'blue'), or an integer (range is [8...63]).
*/
function setRightColor($color)
public function setRightColor($color)
{
$value = $this->_getColor($color);
$this->_right_color = $value;
@ -885,7 +885,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
* @access public
* @param mixed $color either a string (like 'blue'), or an integer (range is [8...63]).
*/
function setFgColor($color)
public function setFgColor($color)
{
$value = $this->_getColor($color);
$this->_fg_color = $value;
@ -900,7 +900,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
* @access public
* @param mixed $color either a string (like 'blue'), or an integer (range is [8...63]).
*/
function setBgColor($color)
public function setBgColor($color)
{
$value = $this->_getColor($color);
$this->_bg_color = $value;
@ -915,7 +915,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
* @access public
* @param mixed $color either a string (like 'blue'), or an integer (range is [8...63]).
*/
function setColor($color)
public function setColor($color)
{
$value = $this->_getColor($color);
$this->_color = $value;
@ -928,7 +928,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
* @param integer $arg Optional. Defaults to 1. Meaningful values are: 0-18,
* 0 meaning no background.
*/
function setPattern($arg = 1)
public function setPattern($arg = 1)
{
$this->_pattern = $arg;
}
@ -940,7 +940,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
* @param integer $underline The value for underline. Possible values are:
* 1 => underline, 2 => double underline.
*/
function setUnderline($underline)
public function setUnderline($underline)
{
$this->_underline = $underline;
}
@ -950,7 +950,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
*
* @access public
*/
function setItalic()
public function setItalic()
{
$this->_italic = 1;
}
@ -961,7 +961,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
* @access public
* @param integer $size The font size (in pixels I think).
*/
function setSize($size)
public function setSize($size)
{
$this->_size = $size;
}
@ -971,7 +971,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
*
* @access public
*/
function setTextWrap()
public function setTextWrap()
{
$this->_text_wrap = 1;
}
@ -983,7 +983,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
* @param integer $angle The rotation angle for the text (clockwise). Possible
values are: 0, 90, 270 and -1 for stacking top-to-bottom.
*/
function setTextRotation($angle)
public function setTextRotation($angle)
{
switch ($angle)
{
@ -1027,7 +1027,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
* @access public
* @param integer $num_format The numeric format.
*/
function setNumFormat($num_format)
public function setNumFormat($num_format)
{
$this->_num_format = $num_format;
}
@ -1037,7 +1037,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
*
* @access public
*/
function setStrikeOut()
public function setStrikeOut()
{
$this->_font_strikeout = 1;
}
@ -1047,7 +1047,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
*
* @access public
*/
function setOutLine()
public function setOutLine()
{
$this->_font_outline = 1;
}
@ -1057,7 +1057,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
*
* @access public
*/
function setShadow()
public function setShadow()
{
$this->_font_shadow = 1;
}
@ -1069,7 +1069,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
* @param integer $script The value for script type. Possible values are:
* 1 => superscript, 2 => subscript.
*/
function setScript($script)
public function setScript($script)
{
$this->_font_script = $script;
}
@ -1079,7 +1079,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
*
* @access public
*/
function setLocked()
public function setLocked()
{
$this->_locked = 1;
}
@ -1089,7 +1089,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
*
* @access public
*/
function setUnLocked()
public function setUnLocked()
{
$this->_locked = 0;
}
@ -1101,7 +1101,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
* @param string $fontfamily The font family name. Possible values are:
* 'Times New Roman', 'Arial', 'Courier'.
*/
function setFontFamily($font_family)
public function setFontFamily($font_family)
{
$this->_font_name = $font_family;
}

View File

@ -113,55 +113,55 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
* The index of the character we are currently looking at
* @var integer
*/
var $_current_char;
public $_current_char;
/**
* The token we are working on.
* @var string
*/
var $_current_token;
public $_current_token;
/**
* The formula to parse
* @var string
*/
var $_formula;
public $_formula;
/**
* The character ahead of the current char
* @var string
*/
var $_lookahead;
public $_lookahead;
/**
* The parse tree to be generated
* @var string
*/
var $_parse_tree;
public $_parse_tree;
/**
* The byte order. 1 => big endian, 0 => little endian.
* @var integer
*/
var $_byte_order;
public $_byte_order;
/**
* Array of external sheets
* @var array
*/
var $_ext_sheets;
public $_ext_sheets;
/**
* Array of sheet references in the form of REF structures
* @var array
*/
var $_references;
public $_references;
/**
* The BIFF version for the workbook
* @var integer
*/
var $_BIFF_version;
public $_BIFF_version;
/**
* The class constructor
@ -169,7 +169,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
* @param integer $byte_order The byte order (Little endian or Big endian) of the architecture
(optional). 1 => big endian, 0 (default) little endian.
*/
function Spreadsheet_Excel_Writer_Parser($byte_order, $biff_version)
public function Spreadsheet_Excel_Writer_Parser($byte_order, $biff_version)
{
$this->_current_char = 0;
$this->_BIFF_version = $biff_version;
@ -177,18 +177,18 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
$this->_formula = ''; // The formula to parse.
$this->_lookahead = ''; // The character ahead of the current char.
$this->_parse_tree = ''; // The parse tree to be generated.
$this->_initializeHashes(); // Initialize the hashes: ptg's and function's ptg's
$this->_initializeHashes(); // Initialize the hashes: ptg's and public function's ptg's
$this->_byte_order = $byte_order; // Little Endian or Big Endian
$this->_ext_sheets = array();
$this->_references = array();
}
/**
* Initialize the ptg and function hashes.
* Initialize the ptg and public function hashes.
*
* @access private
*/
function _initializeHashes()
protected function _initializeHashes()
{
// The Excel ptg indices
$this->ptg = array(
@ -292,18 +292,18 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
// Thanks to Michael Meeks and Gnumeric for the initial arg values.
//
// The following hash was generated by "function_locale.pl" in the distro.
// Refer to function_locale.pl for non-English function names.
// Refer to function_locale.pl for non-English public function names.
//
// The array elements are as follow:
// ptg: The Excel function ptg code.
// args: The number of arguments that the function takes:
// ptg: The Excel public function ptg code.
// args: The number of arguments that the public function takes:
// >=0 is a fixed number of arguments.
// -1 is a variable number of arguments.
// class: The reference, value or array class of the function args.
// vol: The function is volatile.
// class: The reference, value or array class of the public function args.
// vol: The public function is volatile.
//
$this->_functions = array(
// function ptg args class vol
// public function ptg args class vol
'COUNT' => array( 0, -1, 0, 0 ),
'IF' => array( 1, -1, 1, 0 ),
'ISNA' => array( 2, 1, 1, 0 ),
@ -540,7 +540,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
* @return mixed the converted token on success. PEAR_Error if the token
* is not recognized
*/
function _convert($token)
protected function _convert($token)
{
if (preg_match("/^\"[^\"]{0,255}\"$/", $token)) {
return $this->_convertString($token);
@ -600,7 +600,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
* @access private
* @param mixed $num an integer or double for conversion to its ptg value
*/
function _convertNumber($num)
protected function _convertNumber($num)
{
// Integer in the range 0..2**16-1
if ((preg_match("/^\d+$/", $num)) and ($num <= 65535)) {
@ -621,7 +621,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
* @return mixed the converted token on success. PEAR_Error if the string
* is longer than 255 characters.
*/
function _convertString($string)
protected function _convertString($string)
{
// chop away beggining and ending quotes
$string = substr($string, 1, strlen($string) - 2);
@ -638,15 +638,15 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
}
/**
* Convert a function to a ptgFunc or ptgFuncVarV depending on the number of
* Convert a public function to a ptgFunc or ptgFuncVarV depending on the number of
* args that it takes.
*
* @access private
* @param string $token The name of the function for convertion to ptg value.
* @param integer $num_args The number of arguments the function receives.
* @return string The packed ptg for the function
* @param string $token The name of the public function for convertion to ptg value.
* @param integer $num_args The number of arguments the public function receives.
* @return string The packed ptg for the public function
*/
function _convertFunction($token, $num_args)
protected function _convertFunction($token, $num_args)
{
$args = $this->_functions[$token][1];
$volatile = $this->_functions[$token][3];
@ -667,7 +667,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
* @access private
* @param string $range An Excel range in the A1:A2 or A1..A2 format.
*/
function _convertRange2d($range, $class=0)
protected function _convertRange2d($range, $class=0)
{
// TODO: possible class value 0,1,2 check Formula.pm
@ -716,7 +716,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
* @param string $token An Excel range in the Sheet1!A1:A2 format.
* @return mixed The packed ptgArea3d token on success, PEAR_Error on failure.
*/
function _convertRange3d($token)
protected function _convertRange3d($token)
{
$class = 2; // as far as I know, this is magick.
@ -780,7 +780,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
* @param string $cell An Excel cell reference
* @return string The cell in packed() format with the corresponding ptg
*/
function _convertRef2d($cell)
protected function _convertRef2d($cell)
{
$class = 2; // as far as I know, this is magick.
@ -813,7 +813,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
* @param string $cell An Excel cell reference
* @return mixed The packed ptgRef3d token on success, PEAR_Error on failure.
*/
function _convertRef3d($cell)
protected function _convertRef3d($cell)
{
$class = 2; // as far as I know, this is magick.
@ -858,7 +858,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
* @param string $ext_ref The name of the external reference
* @return string The reference index in packed() format
*/
function _packExtRef($ext_ref)
protected function _packExtRef($ext_ref)
{
$ext_ref = preg_replace("/^'/", '', $ext_ref); // Remove leading ' if any.
$ext_ref = preg_replace("/'$/", '', $ext_ref); // Remove trailing ' if any.
@ -904,7 +904,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
* @return mixed The reference index in packed() format on success,
* PEAR_Error on failure
*/
function _getRefIndex($ext_ref)
protected function _getRefIndex($ext_ref)
{
$ext_ref = preg_replace("/^'/", '', $ext_ref); // Remove leading ' if any.
$ext_ref = preg_replace("/'$/", '', $ext_ref); // Remove trailing ' if any.
@ -962,7 +962,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
* @access private
* @return integer The sheet index, -1 if the sheet was not found
*/
function _getSheetIndex($sheet_name)
protected function _getSheetIndex($sheet_name)
{
if (!isset($this->_ext_sheets[$sheet_name])) {
return -1;
@ -981,7 +981,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
* @param string $name The name of the worksheet being added
* @param integer $index The index of the worksheet being added
*/
function setExtSheet($name, $index)
public function setExtSheet($name, $index)
{
$this->_ext_sheets[$name] = $index;
}
@ -993,7 +993,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
* @param string $cell The Excel cell reference to be packed
* @return array Array containing the row and column in packed() format
*/
function _cellToPackedRowcol($cell)
protected function _cellToPackedRowcol($cell)
{
$cell = strtoupper($cell);
list($row, $col, $row_rel, $col_rel) = $this->_cellToRowcol($cell);
@ -1028,7 +1028,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
* @param string $range The Excel range to be packed
* @return array Array containing (row1,col1,row2,col2) in packed() format
*/
function _rangeToPackedRange($range)
protected function _rangeToPackedRange($range)
{
preg_match('/(\$)?(\d+)\:(\$)?(\d+)/', $range, $match);
// return absolute rows if there is a $ in the ref
@ -1075,7 +1075,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
* @param string $cell The Excel cell reference in A1 format.
* @return array
*/
function _cellToRowcol($cell)
protected function _cellToRowcol($cell)
{
preg_match('/(\$)?([A-I]?[A-Z])(\$)?(\d+)/',$cell,$match);
// return absolute column if there is a $ in the ref
@ -1105,7 +1105,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
*
* @access private
*/
function _advance()
protected function _advance()
{
$i = $this->_current_char;
$formula_length = strlen($this->_formula);
@ -1155,7 +1155,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
* @param mixed $token The token to check.
* @return mixed The checked token or false on failure
*/
function _match($token)
protected function _match($token)
{
switch($token) {
case SPREADSHEET_EXCEL_WRITER_ADD:
@ -1269,7 +1269,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
{
return $token;
}
// if it's a function call
// if it's a public function call
elseif (preg_match("/^[A-Z0-9\xc0-\xdc\.]+$/i",$token) and ($this->_lookahead == "("))
{
return $token;
@ -1286,7 +1286,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
* sign (=).
* @return mixed true on success, PEAR_Error on failure
*/
function parse($formula)
public function parse($formula)
{
$this->_current_char = 0;
$this->_formula = $formula;
@ -1306,7 +1306,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
* @access private
* @return mixed The parsed ptg'd tree on success, PEAR_Error on failure
*/
function _condition()
protected function _condition()
{
$result = $this->_expression();
if (PEAR::isError($result)) {
@ -1374,7 +1374,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
* @access private
* @return mixed The parsed ptg'd tree on success, PEAR_Error on failure
*/
function _expression()
protected function _expression()
{
// If it's a string return a string node
if (preg_match("/^\"[^\"]{0,255}\"$/", $this->_current_token)) {
@ -1415,14 +1415,14 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
}
/**
* This function just introduces a ptgParen element in the tree, so that Excel
* This public function just introduces a ptgParen element in the tree, so that Excel
* doesn't get confused when working with a parenthesized formula afterwards.
*
* @access private
* @see _fact()
* @return array The parsed ptg'd tree
*/
function _parenthesizedExpression()
protected function _parenthesizedExpression()
{
$result = $this->_createTree('ptgParen', $this->_expression(), '');
return $result;
@ -1435,7 +1435,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
* @access private
* @return mixed The parsed ptg'd tree on success, PEAR_Error on failure
*/
function _term()
protected function _term()
{
$result = $this->_fact();
if (PEAR::isError($result)) {
@ -1474,7 +1474,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
* @access private
* @return mixed The parsed ptg'd tree on success, PEAR_Error on failure
*/
function _fact()
protected function _fact()
{
if ($this->_current_token == SPREADSHEET_EXCEL_WRITER_OPEN) {
$this->_advance(); // eat the "("
@ -1534,7 +1534,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
$this->_advance();
return $result;
}
// if it's a function call
// if it's a public function call
elseif (preg_match("/^[A-Z0-9\xc0-\xdc\.]+$/i",$this->_current_token))
{
$result = $this->_func();
@ -1546,13 +1546,13 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
}
/**
* It parses a function call. It assumes the following rule:
* It parses a public function call. It assumes the following rule:
* Func -> ( Expr [,Expr]* )
*
* @access private
* @return mixed The parsed ptg'd tree on success, PEAR_Error on failure
*/
function _func()
protected function _func()
{
$num_args = 0; // number of arguments received
$function = strtoupper($this->_current_token);
@ -1568,7 +1568,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
$this->_advance(); // eat the "," or ";"
} else {
return $this->raiseError("Syntax error: comma expected in ".
"function $function, arg #{$num_args}");
"public function $function, arg #{$num_args}");
}
$result2 = $this->_condition();
if (PEAR::isError($result2)) {
@ -1590,7 +1590,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
$args = $this->_functions[$function][1];
// If fixed number of args eg. TIME($i,$j,$k). Check that the number of args is valid.
if (($args >= 0) and ($args != $num_args)) {
return $this->raiseError("Incorrect number of arguments in function $function() ");
return $this->raiseError("Incorrect number of arguments in public function $function() ");
}
$result = $this->_createTree($function, $result, $num_args);
@ -1608,7 +1608,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
* @param mixed $right The right array (sub-tree) or a final node.
* @return array A tree
*/
function _createTree($value, $left, $right)
protected function _createTree($value, $left, $right)
{
return array('value' => $value, 'left' => $left, 'right' => $right);
}
@ -1640,7 +1640,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
* @param array $tree The optional tree to convert.
* @return string The tree in reverse polish notation
*/
function toReversePolish($tree = array())
public function toReversePolish($tree = array())
{
$polish = ""; // the string we are going to return
if (empty($tree)) { // If it's the first call use _parse_tree
@ -1672,14 +1672,14 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
}
$polish .= $converted_tree;
}
// if it's a function convert it here (so we can set it's arguments)
// if it's a public function convert it here (so we can set it's arguments)
if (preg_match("/^[A-Z0-9\xc0-\xdc\.]+$/",$tree['value']) and
!preg_match('/^([A-Ia-i]?[A-Za-z])(\d+)$/',$tree['value']) and
!preg_match("/^[A-Ia-i]?[A-Za-z](\d+)\.\.[A-Ia-i]?[A-Za-z](\d+)$/",$tree['value']) and
!is_numeric($tree['value']) and
!isset($this->ptg[$tree['value']]))
{
// left subtree for a function is always an array.
// left subtree for a public function is always an array.
if ($tree['left'] != '') {
$left_tree = $this->toReversePolish($tree['left']);
} else {
@ -1700,4 +1700,4 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
return $polish;
}
}
?>

View File

@ -47,27 +47,27 @@ define("OP_LTE", 0x07);
*/
class Spreadsheet_Excel_Writer_Validator
{
var $_type;
var $_style;
var $_fixedList;
var $_blank;
var $_incell;
var $_showprompt;
var $_showerror;
var $_title_prompt;
var $_descr_prompt;
var $_title_error;
var $_descr_error;
var $_operator;
var $_formula1;
var $_formula2;
public $_type;
public $_style;
public $_fixedList;
public $_blank;
public $_incell;
public $_showprompt;
public $_showerror;
public $_title_prompt;
public $_descr_prompt;
public $_title_error;
public $_descr_error;
public $_operator;
public $_formula1;
public $_formula2;
/**
* The parser from the workbook. Used to parse validation formulas also
* @var Spreadsheet_Excel_Writer_Parser
*/
var $_parser;
public $_parser;
function Spreadsheet_Excel_Writer_Validator(&$parser)
public function Spreadsheet_Excel_Writer_Validator(&$parser)
{
$this->_parser = $parser;
$this->_type = 0x01; // FIXME: add method for setting datatype
@ -86,41 +86,41 @@ class Spreadsheet_Excel_Writer_Validator
$this->_formula2 = '';
}
function setPrompt($promptTitle = "\x00", $promptDescription = "\x00", $showPrompt = true)
public function setPrompt($promptTitle = "\x00", $promptDescription = "\x00", $showPrompt = true)
{
$this->_showprompt = $showPrompt;
$this->_title_prompt = $promptTitle;
$this->_descr_prompt = $promptDescription;
}
function setError($errorTitle = "\x00", $errorDescription = "\x00", $showError = true)
public function setError($errorTitle = "\x00", $errorDescription = "\x00", $showError = true)
{
$this->_showerror = $showError;
$this->_title_error = $errorTitle;
$this->_descr_error = $errorDescription;
}
function allowBlank()
public function allowBlank()
{
$this->_blank = true;
}
function onInvalidStop()
public function onInvalidStop()
{
$this->_style = 0x00;
}
function onInvalidWarn()
public function onInvalidWarn()
{
$this->_style = 0x01;
}
function onInvalidInfo()
public function onInvalidInfo()
{
$this->_style = 0x02;
}
function setFormula1($formula)
public function setFormula1($formula)
{
// Parse the formula using the parser in Parser.php
$error = $this->_parser->parse($formula);
@ -135,7 +135,7 @@ class Spreadsheet_Excel_Writer_Validator
return true;
}
function setFormula2($formula)
public function setFormula2($formula)
{
// Parse the formula using the parser in Parser.php
$error = $this->_parser->parse($formula);
@ -150,7 +150,7 @@ class Spreadsheet_Excel_Writer_Validator
return true;
}
function _getOptions()
protected function _getOptions()
{
$options = $this->_type;
$options |= $this->_style << 3;
@ -174,7 +174,7 @@ class Spreadsheet_Excel_Writer_Validator
return $options;
}
function _getData()
protected function _getData()
{
$title_prompt_len = strlen($this->_title_prompt);
$descr_prompt_len = strlen($this->_descr_prompt);
@ -199,13 +199,13 @@ class Spreadsheet_Excel_Writer_Validator
/*class Spreadsheet_Excel_Writer_Validation_List extends Spreadsheet_Excel_Writer_Validation
{
function Spreadsheet_Excel_Writer_Validation_list()
public function Spreadsheet_Excel_Writer_Validation_list()
{
parent::Spreadsheet_Excel_Writer_Validation();
$this->_type = 0x03;
}
function setList($source, $incell = true)
public function setList($source, $incell = true)
{
$this->_incell = $incell;
$this->_fixedList = true;
@ -214,13 +214,13 @@ class Spreadsheet_Excel_Writer_Validator
$this->_formula1 = pack("CCC", 0x17, strlen($source), 0x0c) . $source;
}
function setRow($row, $col1, $col2, $incell = true)
public function setRow($row, $col1, $col2, $incell = true)
{
$this->_incell = $incell;
//$this->_formula1 = ...;
}
function setCol($col, $row1, $row2, $incell = true)
public function setCol($col, $row1, $row2, $incell = true)
{
$this->_incell = $incell;
//$this->_formula1 = ...;

View File

@ -53,120 +53,120 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
* Filename for the Workbook
* @var string
*/
var $_filename;
public $_filename;
/**
* Formula parser
* @var object Parser
*/
var $_parser;
public $_parser;
/**
* Flag for 1904 date system (0 => base date is 1900, 1 => base date is 1904)
* @var integer
*/
var $_1904;
public $_1904;
/**
* The active worksheet of the workbook (0 indexed)
* @var integer
*/
var $_activesheet;
public $_activesheet;
/**
* 1st displayed worksheet in the workbook (0 indexed)
* @var integer
*/
var $_firstsheet;
public $_firstsheet;
/**
* Number of workbook tabs selected
* @var integer
*/
var $_selected;
public $_selected;
/**
* Index for creating adding new formats to the workbook
* @var integer
*/
var $_xf_index;
public $_xf_index;
/**
* Flag for preventing close from being called twice.
* @var integer
* @see close()
*/
var $_fileclosed;
public $_fileclosed;
/**
* The BIFF file size for the workbook.
* @var integer
* @see _calcSheetOffsets()
*/
var $_biffsize;
public $_biffsize;
/**
* The default sheetname for all sheets created.
* @var string
*/
var $_sheetname;
public $_sheetname;
/**
* The default XF format.
* @var object Format
*/
var $_tmp_format;
public $_tmp_format;
/**
* Array containing references to all of this workbook's worksheets
* @var array
*/
var $_worksheets;
public $_worksheets;
/**
* Array of sheetnames for creating the EXTERNSHEET records
* @var array
*/
var $_sheetnames;
public $_sheetnames;
/**
* Array containing references to all of this workbook's formats
* @var array
*/
var $_formats;
public $_formats;
/**
* Array containing the colour palette
* @var array
*/
var $_palette;
public $_palette;
/**
* The default format for URLs.
* @var object Format
*/
var $_url_format;
public $_url_format;
/**
* The codepage indicates the text encoding used for strings
* @var integer
*/
var $_codepage;
public $_codepage;
/**
* The country code used for localization
* @var integer
*/
var $_country_code;
public $_country_code;
/**
* number of bytes for sizeinfo of strings
* @var integer
*/
var $_string_sizeinfo_size;
public $_string_sizeinfo_size;
/** @var int */
var $_timestamp;
public $_timestamp;
/**
* Class constructor
@ -174,7 +174,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
* @param string filename for storing the workbook. "-" for writing to stdout.
* @access public
*/
function Spreadsheet_Excel_Writer_Workbook($filename)
public function Spreadsheet_Excel_Writer_Workbook($filename)
{
// It needs to call its parent's constructor explicitly
$this->Spreadsheet_Excel_Writer_BIFFwriter();
@ -215,7 +215,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
* @access public
* @return mixed true on success. PEAR_Error on failure
*/
function close()
public function close()
{
if ($this->_fileclosed) { // Prevent close() from being called twice.
return true;
@ -237,7 +237,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
* @see worksheets()
* @return array
*/
function sheets()
public function sheets()
{
return $this->worksheets();
}
@ -249,14 +249,14 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
* @access public
* @return array
*/
function worksheets()
public function worksheets()
{
return $this->_worksheets;
}
/**
* Sets the BIFF version.
* This method exists just to access experimental functionality
* This method exists just to access experimental public functionality
* from BIFF8. It will be deprecated !
* Only possible value is 8 (Excel 97/2000).
* For any other value it fails silently.
@ -264,7 +264,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
* @access public
* @param integer $version The BIFF version
*/
function setVersion($version)
public function setVersion($version)
{
if ($version == 8) { // only accept version 8
$version = 0x0600;
@ -297,7 +297,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
* @param integer $code Is the international calling country code for the
* chosen country.
*/
function setCountry($code)
public function setCountry($code)
{
$this->_country_code = $code;
}
@ -312,7 +312,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
* @return mixed reference to a worksheet object on success, PEAR_Error
* on failure
*/
function &addWorksheet($name = '')
public function &addWorksheet($name = '')
{
$index = count($this->_worksheets);
$sheetname = $this->_sheetname;
@ -362,7 +362,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
* @param array $properties array with properties for initializing the format.
* @return &Spreadsheet_Excel_Writer_Format reference to an Excel Format
*/
function &addFormat($properties = array())
public function &addFormat($properties = array())
{
$format = new Spreadsheet_Excel_Writer_Format($this->_BIFF_version, $this->_xf_index, $properties);
$this->_xf_index += 1;
@ -376,7 +376,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
* @access public
* @return &Spreadsheet_Excel_Writer_Validator reference to a Validator
*/
function &addValidator()
public function &addValidator()
{
include_once 'Spreadsheet/Excel/Writer/Validator.php';
/* FIXME: check for successful inclusion*/
@ -394,7 +394,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
* @param integer $blue blue RGB value [0-255]
* @return integer The palette index for the custom color
*/
function setCustomColor($index, $red, $green, $blue)
public function setCustomColor($index, $red, $green, $blue)
{
// Match a HTML #xxyyzz style parameter
/*if (defined $_[1] and $_[1] =~ /^#(\w\w)(\w\w)(\w\w)/ ) {
@ -427,7 +427,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
*
* @access private
*/
function _setPaletteXl97()
protected function _setPaletteXl97()
{
$this->_palette = array(
array(0x00, 0x00, 0x00, 0x00), // 8
@ -496,7 +496,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
* @access private
* @return mixed true on success. PEAR_Error on failure
*/
function _storeWorkbook()
protected function _storeWorkbook()
{
if (count($this->_worksheets) == 0) {
return true;
@ -572,7 +572,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
* @access private
* @return mixed true on success. PEAR_Error on failure
*/
function _storeOLEFile()
protected function _storeOLEFile()
{
if($this->_BIFF_version == 0x0600) {
$OLE = new OLE_PPS_File(OLE::Asc2Ucs('Workbook'));
@ -612,7 +612,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
*
* @access private
*/
function _calcSheetOffsets()
protected function _calcSheetOffsets()
{
if ($this->_BIFF_version == 0x0600) {
$boundsheet_length = 12; // fixed length for a BOUNDSHEET record
@ -651,7 +651,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
*
* @access private
*/
function _storeAllFonts()
protected function _storeAllFonts()
{
// tmp_format is added by the constructor. We use this to write the default XF's
$format = $this->_tmp_format;
@ -695,7 +695,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
*
* @access private
*/
function _storeAllNumFormats()
protected function _storeAllNumFormats()
{
// Leaning num_format syndrome
$hash_num_formats = array();
@ -743,7 +743,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
*
* @access private
*/
function _storeAllXfs()
protected function _storeAllXfs()
{
// _tmp_format is added by the constructor. We use this to write the default XF's
// The default font index is 0
@ -770,7 +770,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
*
* @access private
*/
function _storeAllStyles()
protected function _storeAllStyles()
{
$this->_storeStyle();
}
@ -781,7 +781,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
*
* @access private
*/
function _storeExterns()
protected function _storeExterns()
{
// Create EXTERNCOUNT with number of worksheets
@ -798,7 +798,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
*
* @access private
*/
function _storeNames()
protected function _storeNames()
{
// Create the print area NAME records
$total_worksheets = count($this->_worksheets);
@ -878,7 +878,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
*
* @access private
*/
function _storeCodepage()
protected function _storeCodepage()
{
$record = 0x0042; // Record identifier
$length = 0x0002; // Number of bytes to follow
@ -895,7 +895,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
*
* @access private
*/
function _storeWindow1()
protected function _storeWindow1()
{
$record = 0x003D; // Record identifier
$length = 0x0012; // Number of bytes to follow
@ -928,7 +928,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
* @param integer $offset Location of worksheet BOF
* @access private
*/
function _storeBoundsheet($sheetname,$offset)
protected function _storeBoundsheet($sheetname,$offset)
{
$record = 0x0085; // Record identifier
if ($this->_BIFF_version == 0x0600) {
@ -958,7 +958,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
*
* @access private
*/
function _storeSupbookInternal()
protected function _storeSupbookInternal()
{
$record = 0x01AE; // Record identifier
$length = 0x0004; // Bytes to follow
@ -975,7 +975,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
* @param string $sheetname Worksheet name
* @access private
*/
function _storeExternsheetBiff8()
protected function _storeExternsheetBiff8()
{
$total_references = count($this->_parser->_references);
$record = 0x0017; // Record identifier
@ -995,7 +995,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
*
* @access private
*/
function _storeStyle()
protected function _storeStyle()
{
$record = 0x0293; // Record identifier
$length = 0x0004; // Bytes to follow
@ -1017,7 +1017,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
* @param integer $ifmt Format index code
* @access private
*/
function _storeNumFormat($format, $ifmt)
protected function _storeNumFormat($format, $ifmt)
{
$record = 0x041E; // Record identifier
@ -1055,7 +1055,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
*
* @access private
*/
function _storeDatemode()
protected function _storeDatemode()
{
$record = 0x0022; // Record identifier
$length = 0x0002; // Bytes to follow
@ -1081,7 +1081,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
* @param integer $cxals Number of external references
* @access private
*/
function _storeExterncount($cxals)
protected function _storeExterncount($cxals)
{
$record = 0x0016; // Record identifier
$length = 0x0002; // Number of bytes to follow
@ -1102,7 +1102,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
* @param string $sheetname Worksheet name
* @access private
*/
function _storeExternsheet($sheetname)
protected function _storeExternsheet($sheetname)
{
$record = 0x0017; // Record identifier
$length = 0x02 + strlen($sheetname); // Number of bytes to follow
@ -1128,7 +1128,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
* @param integer $colmax End column
* @access private
*/
function _storeNameShort($index, $type, $rowmin, $rowmax, $colmin, $colmax)
protected function _storeNameShort($index, $type, $rowmin, $rowmax, $colmin, $colmax)
{
$record = 0x0018; // Record identifier
$length = 0x0024; // Number of bytes to follow
@ -1194,7 +1194,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
* @param integer $colmax End column
* @access private
*/
function _storeNameLong($index, $type, $rowmin, $rowmax, $colmin, $colmax)
protected function _storeNameLong($index, $type, $rowmin, $rowmax, $colmin, $colmax)
{
$record = 0x0018; // Record identifier
$length = 0x003d; // Number of bytes to follow
@ -1269,7 +1269,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
*
* @access private
*/
function _storeCountry()
protected function _storeCountry()
{
$record = 0x008C; // Record identifier
$length = 4; // Number of bytes to follow
@ -1285,7 +1285,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
*
* @access private
*/
function _storePalette()
protected function _storePalette()
{
$aref = $this->_palette;
@ -1315,7 +1315,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
*
* @access private
*/
function _calculateSharedStringsSizes()
protected function _calculateSharedStringsSizes()
{
/* Iterate through the strings to calculate the CONTINUE block sizes.
For simplicity we use the same size for the SST and CONTINUE records:
@ -1461,7 +1461,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
*
* @access private
*/
function _storeSharedStringsTable()
protected function _storeSharedStringsTable()
{
$record = 0x00fc; // Record identifier
$length = 0x0008; // Number of bytes to follow

File diff suppressed because it is too large Load Diff