ILIAS
release_4-3 Revision
|
Public Member Functions | |
Spreadsheet_Excel_Writer_Format ($BIFF_version, $index=0, $properties=array()) | |
Constructor. | |
getXf ($style) | |
Generate an Excel BIFF XF record (style or cell). | |
getFont () | |
Generate an Excel BIFF FONT record. | |
getFontKey () | |
Returns a unique hash key for a font. | |
getXfIndex () | |
Returns the index used by Spreadsheet_Excel_Writer_Worksheet::_XF() | |
_getColor ($name_color= '') | |
Used in conjunction with the set_xxx_color methods to convert a color string into a number. | |
setAlign ($location) | |
Set cell alignment. | |
setHAlign ($location) | |
Set cell horizontal alignment. | |
setVAlign ($location) | |
Set cell vertical alignment. | |
setMerge () | |
This is an alias for the unintuitive setAlign('merge') | |
setBold ($weight=1) | |
Sets the boldness of the text. | |
setBottom ($style) | |
Sets the width for the bottom border of the cell. | |
setTop ($style) | |
Sets the width for the top border of the cell. | |
setLeft ($style) | |
Sets the width for the left border of the cell. | |
setRight ($style) | |
Sets the width for the right border of the cell. | |
setBorder ($style) | |
Set cells borders to the same style. | |
setBorderColor ($color) | |
Sets all the cell's borders to the same color. | |
setBottomColor ($color) | |
Sets the cell's bottom border color. | |
setTopColor ($color) | |
Sets the cell's top border color. | |
setLeftColor ($color) | |
Sets the cell's left border color. | |
setRightColor ($color) | |
Sets the cell's right border color. | |
setFgColor ($color) | |
Sets the cell's foreground color. | |
setBgColor ($color) | |
Sets the cell's background color. | |
setColor ($color) | |
Sets the cell's color. | |
setPattern ($arg=1) | |
Sets the fill pattern attribute of a cell. | |
setUnderline ($underline) | |
Sets the underline of the text. | |
setItalic () | |
Sets the font style as italic. | |
setSize ($size) | |
Sets the font size. | |
setTextWrap () | |
Sets text wrapping. | |
setTextRotation ($angle) | |
Sets the orientation of the text. | |
setNumFormat ($num_format) | |
Sets the numeric format. | |
setStrikeOut () | |
Sets font as strikeout. | |
setOutLine () | |
Sets outlining for a font. | |
setShadow () | |
Sets font as shadow. | |
setScript ($script) | |
Sets the script type of the text. | |
setLocked () | |
Locks a cell. | |
setUnLocked () | |
Unlocks a cell. | |
setFontFamily ($font_family) | |
Sets the font family name. | |
Public Member Functions inherited from PEAR | |
PEAR ($error_class=null) | |
Constructor. | |
_PEAR () | |
Destructor (the emulated type of...). | |
& | getStaticProperty ($class, $var) |
If you have a class that's mostly/entirely static, and you need static properties, you can use this method to simulate them. | |
registerShutdownFunc ($func, $args=array()) | |
Use this function to register a shutdown method for static classes. | |
isError ($data, $code=null) | |
Tell whether a value is a PEAR error. | |
setErrorHandling ($mode=null, $options=null) | |
Sets how errors generated by this object should be handled. | |
expectError ($code= '*') | |
This method is used to tell which errors you expect to get. | |
popExpect () | |
This method pops one element off the expected error codes stack. | |
_checkDelExpect ($error_code) | |
This method checks unsets an error code if available. | |
delExpect ($error_code) | |
This method deletes all occurences of the specified element from the expected error codes stack. | |
& | raiseError ($message=null, $code=null, $mode=null, $options=null, $userinfo=null, $error_class=null, $skipmsg=false) |
This method is a wrapper that returns an instance of the configured error class with this object's default error handling applied. | |
& | throwError ($message=null, $code=null, $userinfo=null) |
Simpler form of raiseError with fewer options. | |
staticPushErrorHandling ($mode, $options=null) | |
staticPopErrorHandling () | |
pushErrorHandling ($mode, $options=null) | |
Push a new error handler on top of the error handler options stack. | |
popErrorHandling () | |
Pop the last error handler used. | |
loadExtension ($ext) | |
OS independant PHP extension load. |
Data Fields | |
$_xf_index | |
$font_index | |
$_font_name | |
$_size | |
$_bold | |
$_italic | |
$_color | |
$_underline | |
$_font_strikeout | |
$_font_outline | |
$_font_shadow | |
$_font_script | |
$_font_family | |
$_font_charset | |
$_num_format | |
$_hidden | |
$_locked | |
$_text_h_align | |
$_text_wrap | |
$_text_v_align | |
$_text_justlast | |
$_rotation | |
$_fg_color | |
$_bg_color | |
$_pattern | |
$_bottom | |
$_bottom_color | |
$_top | |
$_top_color | |
$_left | |
$_left_color | |
$_right | |
$_right_color | |
Data Fields inherited from PEAR | |
$_debug = false | |
$_default_error_mode = null | |
$_default_error_options = null | |
$_default_error_handler = '' | |
$_error_class = 'PEAR_Error' | |
$_expected_errors = array() |
Definition at line 45 of file Format.php.
Spreadsheet_Excel_Writer_Format::_getColor | ( | $name_color = '' | ) |
Used in conjunction with the set_xxx_color methods to convert a color string into a number.
Color range is 0..63 but we will restrict it to 8..63 to comply with Gnumeric. Colors 0..7 are repeated in 8..15.
private
string | $name_color | name of the color (i.e.: 'blue', 'red', etc..). Optional. |
Definition at line 533 of file Format.php.
Referenced by setBgColor(), setBottomColor(), setColor(), setFgColor(), setLeftColor(), setRightColor(), and setTopColor().
Spreadsheet_Excel_Writer_Format::getFont | ( | ) |
Generate an Excel BIFF FONT record.
Definition at line 447 of file Format.php.
References $_bold, $_color, $_font_charset, $_font_family, $_font_script, $_underline, and $data.
Spreadsheet_Excel_Writer_Format::getFontKey | ( | ) |
Returns a unique hash key for a font.
Used by Spreadsheet_Excel_Writer_Workbook::_storeAllFonts()
The elements that form the key are arranged to increase the probability of generating a unique key. Elements that hold a large range of numbers (eg. _color) are placed between two binary elements such as _italic
Definition at line 503 of file Format.php.
Spreadsheet_Excel_Writer_Format::getXf | ( | $style | ) |
Generate an Excel BIFF XF record (style or cell).
string | $style | The type of the XF record ('style' or 'cell'). |
Definition at line 315 of file Format.php.
References $_fg_color, $_hidden, $_left, $_left_color, $_locked, $_num_format, $_pattern, $_right, $_rotation, $_text_h_align, $_text_wrap, $_top, $_top_color, $data, and $font_index.
Spreadsheet_Excel_Writer_Format::getXfIndex | ( | ) |
Returns the index used by Spreadsheet_Excel_Writer_Worksheet::_XF()
Definition at line 519 of file Format.php.
Spreadsheet_Excel_Writer_Format::setAlign | ( | $location | ) |
Set cell alignment.
public
string | $location | alignment for the cell ('left', 'right', etc...). |
Definition at line 591 of file Format.php.
References $location.
Referenced by setMerge().
Spreadsheet_Excel_Writer_Format::setBgColor | ( | $color | ) |
Sets the cell's background color.
public
mixed | $color | either a string (like 'blue'), or an integer (range is [8...63]). |
Definition at line 908 of file Format.php.
References _getColor().
Spreadsheet_Excel_Writer_Format::setBold | ( | $weight = 1 | ) |
Sets the boldness of the text.
Bold has a range 100..1000. 0 (400) is normal. 1 (700) is bold.
public
integer | $weight | Weight for the text, 0 maps to 400 (normal text), 1 maps to 700 (bold text). Valid range is: 100-1000. It's Optional, default is 1 (bold). |
Definition at line 737 of file Format.php.
Spreadsheet_Excel_Writer_Format::setBorder | ( | $style | ) |
Set cells borders to the same style.
public
integer | $style | style to apply for all cell borders. 1 => thin, 2 => thick. |
Definition at line 810 of file Format.php.
References setBottom(), setLeft(), setRight(), and setTop().
Spreadsheet_Excel_Writer_Format::setBorderColor | ( | $color | ) |
Sets all the cell's borders to the same color.
public
mixed | $color | The color we are setting. Either a string (like 'blue'), or an integer (range is [8...63]). |
Definition at line 830 of file Format.php.
References setBottomColor(), setLeftColor(), setRightColor(), and setTopColor().
Spreadsheet_Excel_Writer_Format::setBottom | ( | $style | ) |
Sets the width for the bottom border of the cell.
public
integer | $style | style of the cell border. 1 => thin, 2 => thick. |
Definition at line 765 of file Format.php.
Referenced by setBorder().
Spreadsheet_Excel_Writer_Format::setBottomColor | ( | $color | ) |
Sets the cell's bottom border color.
public
mixed | $color | either a string (like 'blue'), or an integer (range is [8...63]). |
Definition at line 844 of file Format.php.
References _getColor().
Referenced by setBorderColor().
Spreadsheet_Excel_Writer_Format::setColor | ( | $color | ) |
Sets the cell's color.
public
mixed | $color | either a string (like 'blue'), or an integer (range is [8...63]). |
Definition at line 923 of file Format.php.
References _getColor().
Spreadsheet_Excel_Writer_Format::setFgColor | ( | $color | ) |
Sets the cell's foreground color.
public
mixed | $color | either a string (like 'blue'), or an integer (range is [8...63]). |
Definition at line 893 of file Format.php.
References _getColor().
Spreadsheet_Excel_Writer_Format::setFontFamily | ( | $font_family | ) |
Sets the font family name.
public
string | $fontfamily | The font family name. Possible values are: 'Times New Roman', 'Arial', 'Courier'. |
Definition at line 1109 of file Format.php.
Spreadsheet_Excel_Writer_Format::setHAlign | ( | $location | ) |
Set cell horizontal alignment.
public
string | $location | alignment for the cell ('left', 'right', etc...). |
Definition at line 649 of file Format.php.
References $location.
Spreadsheet_Excel_Writer_Format::setItalic | ( | ) |
Sets the font style as italic.
public
Definition at line 958 of file Format.php.
Spreadsheet_Excel_Writer_Format::setLeft | ( | $style | ) |
Sets the width for the left border of the cell.
public
integer | $style | style of the cell left border. 1 => thin, 2 => thick. |
Definition at line 787 of file Format.php.
Referenced by setBorder().
Spreadsheet_Excel_Writer_Format::setLeftColor | ( | $color | ) |
Sets the cell's left border color.
public
mixed | $color | either a string (like 'blue'), or an integer (range is [8...63]). |
Definition at line 868 of file Format.php.
References _getColor().
Referenced by setBorderColor().
Spreadsheet_Excel_Writer_Format::setLocked | ( | ) |
Spreadsheet_Excel_Writer_Format::setMerge | ( | ) |
This is an alias for the unintuitive setAlign('merge')
public
Definition at line 722 of file Format.php.
References setAlign().
Spreadsheet_Excel_Writer_Format::setNumFormat | ( | $num_format | ) |
Sets the numeric format.
It can be date, time, currency, etc...
public
integer | $num_format | The numeric format. |
Definition at line 1035 of file Format.php.
Spreadsheet_Excel_Writer_Format::setOutLine | ( | ) |
Sets outlining for a font.
public
Definition at line 1055 of file Format.php.
Spreadsheet_Excel_Writer_Format::setPattern | ( | $arg = 1 | ) |
Sets the fill pattern attribute of a cell.
public
integer | $arg | Optional. Defaults to 1. Meaningful values are: 0-18, 0 meaning no background. |
Definition at line 936 of file Format.php.
Spreadsheet_Excel_Writer_Format::setRight | ( | $style | ) |
Sets the width for the right border of the cell.
public
integer | $style | style of the cell right border. 1 => thin, 2 => thick. |
Definition at line 798 of file Format.php.
Referenced by setBorder().
Spreadsheet_Excel_Writer_Format::setRightColor | ( | $color | ) |
Sets the cell's right border color.
public
mixed | $color | either a string (like 'blue'), or an integer (range is [8...63]). |
Definition at line 880 of file Format.php.
References _getColor().
Referenced by setBorderColor().
Spreadsheet_Excel_Writer_Format::setScript | ( | $script | ) |
Sets the script type of the text.
public
integer | $script | The value for script type. Possible values are: 1 => superscript, 2 => subscript. |
Definition at line 1077 of file Format.php.
Spreadsheet_Excel_Writer_Format::setShadow | ( | ) |
Sets font as shadow.
public
Definition at line 1065 of file Format.php.
Spreadsheet_Excel_Writer_Format::setSize | ( | $size | ) |
Sets the font size.
public
integer | $size | The font size (in pixels I think). |
Definition at line 969 of file Format.php.
References $size.
Spreadsheet_Excel_Writer_Format::setStrikeOut | ( | ) |
Sets font as strikeout.
public
Definition at line 1045 of file Format.php.
Spreadsheet_Excel_Writer_Format::setTextRotation | ( | $angle | ) |
Sets the orientation of the text.
public
integer | $angle | The rotation angle for the text (clockwise). Possible values are: 0, 90, 270 and -1 for stacking top-to-bottom. |
Definition at line 991 of file Format.php.
References PEAR\raiseError().
Spreadsheet_Excel_Writer_Format::setTextWrap | ( | ) |
Spreadsheet_Excel_Writer_Format::setTop | ( | $style | ) |
Sets the width for the top border of the cell.
public
integer | $style | style of the cell top border. 1 => thin, 2 => thick. |
Definition at line 776 of file Format.php.
Referenced by setBorder().
Spreadsheet_Excel_Writer_Format::setTopColor | ( | $color | ) |
Sets the cell's top border color.
public
mixed | $color | either a string (like 'blue'), or an integer (range is [8...63]). |
Definition at line 856 of file Format.php.
References _getColor().
Referenced by setBorderColor().
Spreadsheet_Excel_Writer_Format::setUnderline | ( | $underline | ) |
Sets the underline of the text.
public
integer | $underline | The value for underline. Possible values are: 1 => underline, 2 => double underline. |
Definition at line 948 of file Format.php.
Spreadsheet_Excel_Writer_Format::setUnLocked | ( | ) |
Unlocks a cell.
Useful for unprotecting particular cells of a protected sheet.
public
Definition at line 1097 of file Format.php.
Spreadsheet_Excel_Writer_Format::setVAlign | ( | $location | ) |
Set cell vertical alignment.
public
string | $location | alignment for the cell ('top', 'vleft', 'vright', etc...). |
Definition at line 689 of file Format.php.
References $location.
Spreadsheet_Excel_Writer_Format::Spreadsheet_Excel_Writer_Format | ( | $BIFF_version, | |
$index = 0 , |
|||
$properties = array() |
|||
) |
Constructor.
private
integer | $index | the XF index for the format. |
array | $properties | array with properties to be set on initialization. |
Definition at line 252 of file Format.php.
Spreadsheet_Excel_Writer_Format::$_bg_color |
Definition at line 189 of file Format.php.
Spreadsheet_Excel_Writer_Format::$_bold |
Definition at line 75 of file Format.php.
Referenced by getFont().
Spreadsheet_Excel_Writer_Format::$_bottom |
Definition at line 201 of file Format.php.
Spreadsheet_Excel_Writer_Format::$_bottom_color |
Definition at line 207 of file Format.php.
Spreadsheet_Excel_Writer_Format::$_color |
Definition at line 87 of file Format.php.
Referenced by getFont().
Spreadsheet_Excel_Writer_Format::$_fg_color |
Definition at line 183 of file Format.php.
Referenced by getXf().
Spreadsheet_Excel_Writer_Format::$_font_charset |
Definition at line 129 of file Format.php.
Referenced by getFont().
Spreadsheet_Excel_Writer_Format::$_font_family |
Definition at line 123 of file Format.php.
Referenced by getFont().
Spreadsheet_Excel_Writer_Format::$_font_name |
Definition at line 63 of file Format.php.
Spreadsheet_Excel_Writer_Format::$_font_outline |
Definition at line 105 of file Format.php.
Spreadsheet_Excel_Writer_Format::$_font_script |
Definition at line 117 of file Format.php.
Referenced by getFont().
Spreadsheet_Excel_Writer_Format::$_font_shadow |
Definition at line 111 of file Format.php.
Spreadsheet_Excel_Writer_Format::$_font_strikeout |
Definition at line 99 of file Format.php.
Spreadsheet_Excel_Writer_Format::$_hidden |
Definition at line 141 of file Format.php.
Referenced by getXf().
Spreadsheet_Excel_Writer_Format::$_italic |
Definition at line 81 of file Format.php.
Spreadsheet_Excel_Writer_Format::$_left |
Definition at line 225 of file Format.php.
Referenced by getXf().
Spreadsheet_Excel_Writer_Format::$_left_color |
Definition at line 231 of file Format.php.
Referenced by getXf().
Spreadsheet_Excel_Writer_Format::$_locked |
Definition at line 147 of file Format.php.
Referenced by getXf().
Spreadsheet_Excel_Writer_Format::$_num_format |
Definition at line 135 of file Format.php.
Referenced by getXf().
Spreadsheet_Excel_Writer_Format::$_pattern |
Definition at line 195 of file Format.php.
Referenced by getXf().
Spreadsheet_Excel_Writer_Format::$_right |
Definition at line 237 of file Format.php.
Referenced by getXf().
Spreadsheet_Excel_Writer_Format::$_right_color |
Definition at line 243 of file Format.php.
Spreadsheet_Excel_Writer_Format::$_rotation |
Definition at line 177 of file Format.php.
Referenced by getXf().
Spreadsheet_Excel_Writer_Format::$_size |
Definition at line 69 of file Format.php.
Spreadsheet_Excel_Writer_Format::$_text_h_align |
Definition at line 153 of file Format.php.
Referenced by getXf().
Spreadsheet_Excel_Writer_Format::$_text_justlast |
Definition at line 171 of file Format.php.
Spreadsheet_Excel_Writer_Format::$_text_v_align |
Definition at line 165 of file Format.php.
Spreadsheet_Excel_Writer_Format::$_text_wrap |
Definition at line 159 of file Format.php.
Referenced by getXf().
Spreadsheet_Excel_Writer_Format::$_top |
Definition at line 213 of file Format.php.
Referenced by getXf().
Spreadsheet_Excel_Writer_Format::$_top_color |
Definition at line 219 of file Format.php.
Referenced by getXf().
Spreadsheet_Excel_Writer_Format::$_underline |
Definition at line 93 of file Format.php.
Referenced by getFont().
Spreadsheet_Excel_Writer_Format::$_xf_index |
Definition at line 51 of file Format.php.
Spreadsheet_Excel_Writer_Format::$font_index |
Definition at line 57 of file Format.php.
Referenced by getXf().