all attributes of the class documented

git-svn-id: https://svn.php.net/repository/pear/packages/Spreadsheet_Excel_Writer/trunk@111083 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Xavier Noguer Gallego 2003-01-08 21:56:50 +00:00
parent e8d3a41e1c
commit a900104e34
1 changed files with 85 additions and 37 deletions

View File

@ -131,6 +131,42 @@ class Format extends PEAR
*/ */
var $_num_format; var $_num_format;
/**
* Bit specifying if formulas are hidden.
* @var integer
*/
var $_hidden;
/**
* Bit specifying if the cell is locked.
* @var integer
*/
var $_locked;
/**
* The three bits specifying the text horizontal alignment.
* @var integer
*/
var $_text_h_align;
/**
* Bit specifying if the text is wrapped at the right border.
* @var integer
*/
var $_text_wrap;
/**
* The three bits specifying the text vertical alignment.
* @var integer
*/
var $_text_v_align;
/**
* 1 bit, apparently not used.
* @var integer
*/
var $_text_justlast;
/** /**
* The two bits specifying the text rotation. * The two bits specifying the text rotation.
* @var integer * @var integer
@ -232,16 +268,16 @@ class Format extends PEAR
$this->_hidden = 0; $this->_hidden = 0;
$this->_locked = 1; $this->_locked = 1;
$this->_text_h_align = 0; // no declarada $this->_text_h_align = 0;
$this->_text_wrap = 0; // no declarada $this->_text_wrap = 0;
$this->_text_v_align = 2; // no declarada $this->_text_v_align = 2;
$this->_text_justlast = 0; // no declarada $this->_text_justlast = 0;
$this->_rotation = 0; $this->_rotation = 0;
$this->_fg_color = 0x40; $this->_fg_color = 0x40;
$this->_bg_color = 0x41; $this->_bg_color = 0x41;
$this->_pattern = 0; $this->_pattern = 0;
$this->_bottom = 0; $this->_bottom = 0;
@ -496,34 +532,48 @@ class Format extends PEAR
$location = strtolower($location); $location = strtolower($location);
if ($location == 'left') if ($location == 'left') {
$this->_text_h_align = 1; $this->_text_h_align = 1;
if ($location == 'centre') }
$this->_text_h_align = 2; if ($location == 'centre') {
if ($location == 'center') $this->_text_h_align = 2;
$this->_text_h_align = 2; }
if ($location == 'right') if ($location == 'center') {
$this->_text_h_align = 3; $this->_text_h_align = 2;
if ($location == 'fill') }
$this->_text_h_align = 4; if ($location == 'right') {
if ($location == 'justify') $this->_text_h_align = 3;
}
if ($location == 'fill') {
$this->_text_h_align = 4;
}
if ($location == 'justify') {
$this->_text_h_align = 5; $this->_text_h_align = 5;
if ($location == 'merge') }
if ($location == 'merge') {
$this->_text_h_align = 6; $this->_text_h_align = 6;
if ($location == 'equal_space') // For T.K. }
$this->_text_h_align = 7; if ($location == 'equal_space') { // For T.K.
if ($location == 'top') $this->_text_h_align = 7;
$this->_text_v_align = 0; }
if ($location == 'vcentre') if ($location == 'top') {
$this->_text_v_align = 1; $this->_text_v_align = 0;
if ($location == 'vcenter') }
$this->_text_v_align = 1; if ($location == 'vcentre') {
if ($location == 'bottom') $this->_text_v_align = 1;
$this->_text_v_align = 2; }
if ($location == 'vjustify') if ($location == 'vcenter') {
$this->_text_v_align = 3; $this->_text_v_align = 1;
if ($location == 'vequal_space') // For T.K. }
$this->_text_v_align = 4; if ($location == 'bottom') {
$this->_text_v_align = 2;
}
if ($location == 'vjustify') {
$this->_text_v_align = 3;
}
if ($location == 'vequal_space') { // For T.K.
$this->_text_v_align = 4;
}
} }
/** /**
@ -780,12 +830,10 @@ class Format extends PEAR
* Sets text wrapping * Sets text wrapping
* *
* @access public * @access public
* @param integer $text_wrap Optional. 0 => no text wrapping, 1 => text wrapping.
* Defaults to 1.
*/ */
function setTextWrap($text_wrap = 1) function setTextWrap()
{ {
$this->_text_wrap = $text_wrap; $this->_text_wrap = 1;
} }
/** /**