Moodle  2.2.1
http://www.collinsharper.com
Spreadsheet_Excel_Writer_Format Class Reference
Inheritance diagram for Spreadsheet_Excel_Writer_Format:
Collaboration diagram for Spreadsheet_Excel_Writer_Format:

Public Member Functions

 Spreadsheet_Excel_Writer_Format ($BIFF_version, $index=0, $properties=array())
 getXf ($style)
 getFont ()
 getFontKey ()
 getXfIndex ()
 _getColor ($name_color= '')
 setAlign ($location)
 setHAlign ($location)
 setVAlign ($location)
 setMerge ()
 setBold ($weight=1)
 setBottom ($style)
 setTop ($style)
 setLeft ($style)
 setRight ($style)
 setBorder ($style)
 setBorderColor ($color)
 setBottomColor ($color)
 setTopColor ($color)
 setLeftColor ($color)
 setRightColor ($color)
 setFgColor ($color)
 setBgColor ($color)
 setColor ($color)
 setPattern ($arg=1)
 setUnderline ($underline)
 setItalic ()
 setSize ($size)
 setTextWrap ()
 setTextRotation ($angle)
 setNumFormat ($num_format)
 setStrikeOut ()
 setOutLine ()
 setShadow ()
 setScript ($script)
 setLocked ()
 setUnLocked ()
 setFontFamily ($font_family)

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

Detailed Description

Definition at line 45 of file Format.php.


Member Function Documentation

_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

Parameters:
string$name_colorname of the color (i.e.: 'blue', 'red', etc..). Optional.
Returns:
integer The color index

Definition at line 533 of file Format.php.

Here is the caller graph for this function:

getFont ( )

Generate an Excel BIFF FONT record.

Returns:
string The FONT record

Definition at line 447 of file Format.php.

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

Returns:
string A key for this font

Definition at line 503 of file Format.php.

getXf ( style)

Generate an Excel BIFF XF record (style or cell).

Parameters:
string$styleThe type of the XF record ('style' or 'cell').
Returns:
string The XF record

Definition at line 315 of file Format.php.

Returns the index used by Spreadsheet_Excel_Writer_Worksheet::_XF()

Returns:
integer The index for the XF record

Definition at line 519 of file Format.php.

setAlign ( location)

Set cell alignment.

public

Parameters:
string$locationalignment for the cell ('left', 'right', etc...).

Definition at line 591 of file Format.php.

Here is the caller graph for this function:

setBgColor ( color)

Sets the cell's background color

public

Parameters:
mixed$coloreither a string (like 'blue'), or an integer (range is [8...63]).

Definition at line 908 of file Format.php.

Here is the call graph for this function:

setBold ( weight = 1)

Sets the boldness of the text. Bold has a range 100..1000. 0 (400) is normal. 1 (700) is bold.

public

Parameters:
integer$weightWeight 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.

setBorder ( style)

Set cells borders to the same style

public

Parameters:
integer$stylestyle to apply for all cell borders. 1 => thin, 2 => thick.

Definition at line 810 of file Format.php.

Here is the call graph for this function:

setBorderColor ( color)

Sets all the cell's borders to the same color

public

Parameters:
mixed$colorThe color we are setting. Either a string (like 'blue'), or an integer (range is [8...63]).

Definition at line 830 of file Format.php.

Here is the call graph for this function:

setBottom ( style)

Sets the width for the bottom border of the cell

public

Parameters:
integer$stylestyle of the cell border. 1 => thin, 2 => thick.

Definition at line 765 of file Format.php.

Here is the caller graph for this function:

setBottomColor ( color)

Sets the cell's bottom border color

public

Parameters:
mixed$coloreither a string (like 'blue'), or an integer (range is [8...63]).

Definition at line 844 of file Format.php.

Here is the call graph for this function:

Here is the caller graph for this function:

setColor ( color)

Sets the cell's color

public

Parameters:
mixed$coloreither a string (like 'blue'), or an integer (range is [8...63]).

Definition at line 923 of file Format.php.

Here is the call graph for this function:

setFgColor ( color)

Sets the cell's foreground color

public

Parameters:
mixed$coloreither a string (like 'blue'), or an integer (range is [8...63]).

Definition at line 893 of file Format.php.

Here is the call graph for this function:

setFontFamily ( font_family)

Sets the font family name.

public

Parameters:
string$fontfamilyThe font family name. Possible values are: 'Times New Roman', 'Arial', 'Courier'.

Definition at line 1097 of file Format.php.

setHAlign ( location)

Set cell horizontal alignment.

public

Parameters:
string$locationalignment for the cell ('left', 'right', etc...).

Definition at line 649 of file Format.php.

setItalic ( )

Sets the font style as italic

public

Definition at line 958 of file Format.php.

setLeft ( style)

Sets the width for the left border of the cell

public

Parameters:
integer$stylestyle of the cell left border. 1 => thin, 2 => thick.

Definition at line 787 of file Format.php.

Here is the caller graph for this function:

setLeftColor ( color)

Sets the cell's left border color

public

Parameters:
mixed$coloreither a string (like 'blue'), or an integer (range is [8...63]).

Definition at line 868 of file Format.php.

Here is the call graph for this function:

Here is the caller graph for this function:

setLocked ( )

Locks a cell.

public

Definition at line 1075 of file Format.php.

setMerge ( )

This is an alias for the unintuitive setAlign('merge')

public

Definition at line 722 of file Format.php.

Here is the call graph for this function:

setNumFormat ( num_format)

Sets the numeric format. It can be date, time, currency, etc...

public

Parameters:
integer$num_formatThe numeric format.

Definition at line 1023 of file Format.php.

Sets outlining for a font.

public

Definition at line 1043 of file Format.php.

setPattern ( arg = 1)

Sets the fill pattern attribute of a cell

public

Parameters:
integer$argOptional. Defaults to 1. Meaningful values are: 0-18, 0 meaning no background.

Definition at line 936 of file Format.php.

setRight ( style)

Sets the width for the right border of the cell

public

Parameters:
integer$stylestyle of the cell right border. 1 => thin, 2 => thick.

Definition at line 798 of file Format.php.

Here is the caller graph for this function:

setRightColor ( color)

Sets the cell's right border color

public

Parameters:
mixed$coloreither a string (like 'blue'), or an integer (range is [8...63]).

Definition at line 880 of file Format.php.

Here is the call graph for this function:

Here is the caller graph for this function:

setScript ( script)

Sets the script type of the text

public

Parameters:
integer$scriptThe value for script type. Possible values are: 1 => superscript, 2 => subscript.

Definition at line 1065 of file Format.php.

setShadow ( )

Sets font as shadow.

public

Definition at line 1053 of file Format.php.

setSize ( size)

Sets the font size

public

Parameters:
integer$sizeThe font size (in pixels I think).

Definition at line 969 of file Format.php.

Sets font as strikeout.

public

Definition at line 1033 of file Format.php.

setTextRotation ( angle)

Sets the orientation of the text

public

Parameters:
integer$angleThe 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.

Here is the call graph for this function:

Sets text wrapping

public

Definition at line 979 of file Format.php.

setTop ( style)

Sets the width for the top border of the cell

public

Parameters:
integer$stylestyle of the cell top border. 1 => thin, 2 => thick.

Definition at line 776 of file Format.php.

Here is the caller graph for this function:

setTopColor ( color)

Sets the cell's top border color

public

Parameters:
mixed$coloreither a string (like 'blue'), or an integer (range is [8...63]).

Definition at line 856 of file Format.php.

Here is the call graph for this function:

Here is the caller graph for this function:

setUnderline ( underline)

Sets the underline of the text

public

Parameters:
integer$underlineThe value for underline. Possible values are: 1 => underline, 2 => double underline.

Definition at line 948 of file Format.php.

Unlocks a cell. Useful for unprotecting particular cells of a protected sheet.

public

Definition at line 1085 of file Format.php.

setVAlign ( location)

Set cell vertical alignment.

public

Parameters:
string$locationalignment for the cell ('top', 'vleft', 'vright', etc...).

Definition at line 689 of file Format.php.

Spreadsheet_Excel_Writer_Format ( BIFF_version,
index = 0,
properties = array() 
)

Constructor

private

Parameters:
integer$indexthe XF index for the format.
array$propertiesarray with properties to be set on initialization.

Definition at line 252 of file Format.php.


Field Documentation

$_bg_color

Definition at line 189 of file Format.php.

$_bold

Definition at line 75 of file Format.php.

$_bottom

Definition at line 201 of file Format.php.

$_bottom_color

Definition at line 207 of file Format.php.

$_color

Definition at line 87 of file Format.php.

$_fg_color

Definition at line 183 of file Format.php.

$_font_charset

Definition at line 129 of file Format.php.

$_font_family

Definition at line 123 of file Format.php.

$_font_name

Definition at line 63 of file Format.php.

$_font_outline

Definition at line 105 of file Format.php.

$_font_script

Definition at line 117 of file Format.php.

$_font_shadow

Definition at line 111 of file Format.php.

$_font_strikeout

Definition at line 99 of file Format.php.

$_hidden

Definition at line 141 of file Format.php.

$_italic

Definition at line 81 of file Format.php.

$_left

Definition at line 225 of file Format.php.

$_left_color

Definition at line 231 of file Format.php.

$_locked

Definition at line 147 of file Format.php.

$_num_format

Definition at line 135 of file Format.php.

$_pattern

Definition at line 195 of file Format.php.

$_right

Definition at line 237 of file Format.php.

$_right_color

Definition at line 243 of file Format.php.

$_rotation

Definition at line 177 of file Format.php.

$_size

Definition at line 69 of file Format.php.

$_text_h_align

Definition at line 153 of file Format.php.

$_text_justlast

Definition at line 171 of file Format.php.

$_text_v_align

Definition at line 165 of file Format.php.

$_text_wrap

Definition at line 159 of file Format.php.

$_top

Definition at line 213 of file Format.php.

$_top_color

Definition at line 219 of file Format.php.

$_underline

Definition at line 93 of file Format.php.

$_xf_index

Definition at line 51 of file Format.php.

$font_index

Definition at line 57 of file Format.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations