cvs: pear /Excel Font.php Format.php Formula.php Workbook.php

From: Date: Sun, 07 Apr 2002 15:03:06 +0000
Subject: cvs: pear /Excel Font.php Format.php Formula.php Workbook.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-3102@lists.php.net to get a copy of this message
tuupola Sun Apr 7 11:03:06 2002 EDT Modified files: /pear/Excel Font.php Format.php Formula.php Workbook.php Log: * update PHPDoc Index: pear/Excel/Font.php diff -u pear/Excel/Font.php:1.1 pear/Excel/Font.php:1.2 --- pear/Excel/Font.php:1.1 Thu Apr 4 13:20:13 2002 +++ pear/Excel/Font.php Sun Apr 7 11:03:06 2002 @@ -20,7 +20,7 @@ // Based on CPAN's Spreadsheet::WriteExcel // by John McNamara <john.exeng@abanet.it> // -// $Id: Font.php,v 1.1 2002/04/04 18:20:13 tuupola Exp $ +// $Id: Font.php,v 1.2 2002/04/07 15:03:06 tuupola Exp $ define('EXCEL_FONT_BOLD', 0x0001); define('EXCEL_FONT_ITALIC', 0x0002); @@ -29,6 +29,15 @@ require_once('PEAR.php'); +/** +* Excel_Font +* +* @version $Revision: 1.2 $ +* @author Mika Tuupola <tuupola@appelsiini.net> +* @package Excel +* +*/ + class Excel_Font { var $height; @@ -40,6 +49,12 @@ var $name; var $index; + /** + * Constructor + * + * @return object + */ + function Excel_Font() { $this->height = 10 * 20; // 1/20 points @@ -51,13 +66,24 @@ $this->name = 'Arial'; } + /** + * Get the font record + * + * Returns the font record in binary format for inserting + * into worksheet data. + * + * @return string + * @access public + * + */ + function getRecord() { $option = 0x0000; - $option += $this->getBold(); - $option += $this->getItalic(); - $option += $this->getUnderline(); - $option += $this->getStruck(); + $option += $this->getBold(); + $option += $this->getItalic(); + $option += $this->getUnderline(); + $option += $this->getStruck(); $name = $this->getName(); @@ -78,50 +104,144 @@ return($retval); } + + /** + * Get the name of the font + * + * @return string + * @access public + */ function getName() { return($this->name); } + /** + * Get the bold flag + * + * @return integer + * @access public + */ + function getBold() { return($this->bold); } + /** + * Get the italic flag + * + * @return integer + * @access public + */ + function getItalic() { return($this->italic); } + /** + * Get the underline flag + * + * @return integer + * @access public + */ + function getUnderline() { return($this->underline); } + /** + * Get the struck flag + * + * @return integer + * @access public + */ + function getStruck() { return($this->struck); } + /** + * Get the palette object + * + * @return object + * @access public + */ + function getPalette() { return($this->palette); } + /** + * Get the height + * + * @return integer + * @access public + */ + function getHeight() { return($this->height); } + /** + * Set the index of the font + * + * @access public + */ + function setIndex($index) { $this->index = $index; } + /** + * Get the index of the font + * + * @return integer + * @access public + */ + + function getIndex() { + return($this->index); + } + + /** + * Set the bold flag + * + * @param boolean + * @access public + */ + function setBold($switch=TRUE) { $this->bold = $switch ? EXCEL_FONT_BOLD : 0x0000; } + /** + * Set the italic flag + * + * @param boolean + * @access public + */ + function setItalic($switch=TRUE) { $this->italic = $switch ? EXCEL_FONT_ITALIC : 0x0000; } + /** + * Set the underline flag + * + * @param boolean + * @access public + */ + function setUnderline($switch=TRUE) { $this->underline = $switch ? EXCEL_FONT_UNDERLINE : 0x0000; } + + /** + * Set the struck flag + * + * @param boolean + * @access public + */ function setStruck($switch=TRUE) { $this->struck = $switch ? EXCEL_FONT_STRUCK : 0x0000; Index: pear/Excel/Format.php diff -u pear/Excel/Format.php:1.1 pear/Excel/Format.php:1.2 --- pear/Excel/Format.php:1.1 Thu Apr 4 08:14:56 2002 +++ pear/Excel/Format.php Sun Apr 7 11:03:06 2002 @@ -20,9 +20,18 @@ // Based on CPAN's Spreadsheet::WriteExcel // by John McNamara <john.exeng@abanet.it> // -// $Id: Format.php,v 1.1 2002/04/04 13:14:56 tuupola Exp $ +// $Id: Format.php,v 1.2 2002/04/07 15:03:06 tuupola Exp $ require_once('PEAR.php'); + +/** +* Excel_Format +* +* @version $Revision: 1.2 $ +* @author Mika Tuupola <tuupola@appelsiini.net> +* @package Excel +* +*/ class Excel_Format { Index: pear/Excel/Formula.php diff -u pear/Excel/Formula.php:1.1 pear/Excel/Formula.php:1.2 --- pear/Excel/Formula.php:1.1 Thu Apr 4 08:14:56 2002 +++ pear/Excel/Formula.php Sun Apr 7 11:03:06 2002 @@ -20,9 +20,18 @@ // Based on CPAN's Spreadsheet::WriteExcel // by John McNamara <john.exeng@abanet.it> // -// $Id: Formula.php,v 1.1 2002/04/04 13:14:56 tuupola Exp $ +// $Id: Formula.php,v 1.2 2002/04/07 15:03:06 tuupola Exp $ require_once('PEAR.php'); + +/** +* Excel_Formula +* +* @version $Revision: 1.2 $ +* @author Mika Tuupola <tuupola@appelsiini.net> +* @package Excel +* +*/ class Excel_Formula { Index: pear/Excel/Workbook.php diff -u pear/Excel/Workbook.php:1.1 pear/Excel/Workbook.php:1.2 --- pear/Excel/Workbook.php:1.1 Thu Apr 4 08:14:56 2002 +++ pear/Excel/Workbook.php Sun Apr 7 11:03:06 2002 @@ -20,11 +20,20 @@ // Based on CPAN's Spreadsheet::WriteExcel // by John McNamara <john.exeng@abanet.it> // -// $Id: Workbook.php,v 1.1 2002/04/04 13:14:56 tuupola Exp $ +// $Id: Workbook.php,v 1.2 2002/04/07 15:03:06 tuupola Exp $ require_once('PEAR.php'); require_once('Excel/File.php'); require_once('Excel/Worksheet.php'); + +/** +* Excel_Workbook +* +* @version $Revision: 1.2 $ +* @author Mika Tuupola <tuupola@appelsiini.net> +* @package Excel +* +*/ class Excel_Workbook extends Excel_File {

« previous php.pear.cvs (#3102) next »