ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
PHPExcel_Style_Font Class Reference
+ Inheritance diagram for PHPExcel_Style_Font:
+ Collaboration diagram for PHPExcel_Style_Font:

Public Member Functions

 __construct ($isSupervisor=FALSE, $isConditional=FALSE)
 Create a new PHPExcel_Style_Font. More...
 
 getSharedComponent ()
 Get the shared style component for the currently active cell in currently active sheet. More...
 
 getStyleArray ($array)
 Build style array from subcomponents. More...
 
 applyFromArray ($pStyles=null)
 Apply styles from array. More...
 
 getName ()
 Get Name. More...
 
 setName ($pValue='Calibri')
 Set Name. More...
 
 getSize ()
 Get Size. More...
 
 setSize ($pValue=10)
 Set Size. More...
 
 getBold ()
 Get Bold. More...
 
 setBold ($pValue=false)
 Set Bold. More...
 
 getItalic ()
 Get Italic. More...
 
 setItalic ($pValue=false)
 Set Italic. More...
 
 getSuperScript ()
 Get SuperScript. More...
 
 setSuperScript ($pValue=false)
 Set SuperScript. More...
 
 getSubScript ()
 Get SubScript. More...
 
 setSubScript ($pValue=false)
 Set SubScript. More...
 
 getUnderline ()
 Get Underline. More...
 
 setUnderline ($pValue=self::UNDERLINE_NONE)
 Set Underline. More...
 
 getStrikethrough ()
 Get Strikethrough. More...
 
 setStrikethrough ($pValue=false)
 Set Strikethrough. More...
 
 getColor ()
 Get Color. More...
 
 setColor (PHPExcel_Style_Color $pValue=null)
 Set Color. More...
 
 getHashCode ()
 Get hash code. More...
 
- Public Member Functions inherited from PHPExcel_Style_Supervisor
 __construct ($isSupervisor=FALSE)
 Create a new PHPExcel_Style_Alignment. More...
 
 bindParent ($parent, $parentPropertyName=NULL)
 Bind parent. More...
 
 getIsSupervisor ()
 Is this a supervisor or a cell style component? More...
 
 getActiveSheet ()
 Get the currently active sheet. More...
 
 getSelectedCells ()
 Get the currently active cell coordinate in currently active sheet. More...
 
 getActiveCell ()
 Get the currently active cell coordinate in currently active sheet. More...
 
 __clone ()
 Implement PHP __clone to create a deep clone, not just a shallow copy. More...
 

Data Fields

const UNDERLINE_NONE = 'none'
 
const UNDERLINE_DOUBLE = 'double'
 
const UNDERLINE_DOUBLEACCOUNTING = 'doubleAccounting'
 
const UNDERLINE_SINGLE = 'single'
 
const UNDERLINE_SINGLEACCOUNTING = 'singleAccounting'
 

Protected Attributes

 $_name = 'Calibri'
 
 $_size = 11
 
 $_bold = FALSE
 
 $_italic = FALSE
 
 $_superScript = FALSE
 
 $_subScript = FALSE
 
 $_underline = self::UNDERLINE_NONE
 
 $_strikethrough = FALSE
 
 $_color
 
- Protected Attributes inherited from PHPExcel_Style_Supervisor
 $_isSupervisor
 
 $_parent
 

Detailed Description

Definition at line 36 of file Font.php.

Constructor & Destructor Documentation

◆ __construct()

PHPExcel_Style_Font::__construct (   $isSupervisor = FALSE,
  $isConditional = FALSE 
)

Create a new PHPExcel_Style_Font.

Parameters
boolean$isSupervisorFlag indicating if this is a supervisor or not Leave this value at default unless you understand exactly what its ramifications are
boolean$isConditionalFlag indicating if this is a conditional style or not Leave this value at default unless you understand exactly what its ramifications are

Definition at line 118 of file Font.php.

References PHPExcel_Style_Color\COLOR_BLACK.

119  {
120  // Supervisor?
121  parent::__construct($isSupervisor);
122 
123  // Initialise values
124  if ($isConditional) {
125  $this->_name = NULL;
126  $this->_size = NULL;
127  $this->_bold = NULL;
128  $this->_italic = NULL;
129  $this->_superScript = NULL;
130  $this->_subScript = NULL;
131  $this->_underline = NULL;
132  $this->_strikethrough = NULL;
133  $this->_color = new PHPExcel_Style_Color(PHPExcel_Style_Color::COLOR_BLACK, $isSupervisor, $isConditional);
134  } else {
135  $this->_color = new PHPExcel_Style_Color(PHPExcel_Style_Color::COLOR_BLACK, $isSupervisor);
136  }
137  // bind parent if we are a supervisor
138  if ($isSupervisor) {
139  $this->_color->bindParent($this, '_color');
140  }
141  }

Member Function Documentation

◆ applyFromArray()

PHPExcel_Style_Font::applyFromArray (   $pStyles = null)

Apply styles from array.

$objPHPExcel->getActiveSheet()->getStyle('B2')->getFont()->applyFromArray( array( 'name' => 'Arial', 'bold' => TRUE, 'italic' => FALSE, 'underline' => PHPExcel_Style_Font::UNDERLINE_DOUBLE, 'strike' => FALSE, 'color' => array( 'rgb' => '808080' ) ) );

Parameters
array$pStylesArray containing style information
Exceptions
PHPExcel_Exception
Returns
PHPExcel_Style_Font

Definition at line 187 of file Font.php.

References PHPExcel_Style_Supervisor\getActiveSheet(), getColor(), PHPExcel_Style_Supervisor\getSelectedCells(), getStyleArray(), setBold(), setItalic(), setName(), setSize(), setStrikethrough(), setSubScript(), setSuperScript(), and setUnderline().

187  {
188  if (is_array($pStyles)) {
189  if ($this->_isSupervisor) {
190  $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($pStyles));
191  } else {
192  if (array_key_exists('name', $pStyles)) {
193  $this->setName($pStyles['name']);
194  }
195  if (array_key_exists('bold', $pStyles)) {
196  $this->setBold($pStyles['bold']);
197  }
198  if (array_key_exists('italic', $pStyles)) {
199  $this->setItalic($pStyles['italic']);
200  }
201  if (array_key_exists('superScript', $pStyles)) {
202  $this->setSuperScript($pStyles['superScript']);
203  }
204  if (array_key_exists('subScript', $pStyles)) {
205  $this->setSubScript($pStyles['subScript']);
206  }
207  if (array_key_exists('underline', $pStyles)) {
208  $this->setUnderline($pStyles['underline']);
209  }
210  if (array_key_exists('strike', $pStyles)) {
211  $this->setStrikethrough($pStyles['strike']);
212  }
213  if (array_key_exists('color', $pStyles)) {
214  $this->getColor()->applyFromArray($pStyles['color']);
215  }
216  if (array_key_exists('size', $pStyles)) {
217  $this->setSize($pStyles['size']);
218  }
219  }
220  } else {
221  throw new PHPExcel_Exception("Invalid style array passed.");
222  }
223  return $this;
224  }
setStrikethrough($pValue=false)
Set Strikethrough.
Definition: Font.php:467
setUnderline($pValue=self::UNDERLINE_NONE)
Set Underline.
Definition: Font.php:434
setBold($pValue=false)
Set Bold.
Definition: Font.php:306
setSize($pValue=10)
Set Size.
Definition: Font.php:275
setName($pValue='Calibri')
Set Name.
Definition: Font.php:244
getSelectedCells()
Get the currently active cell coordinate in currently active sheet.
Definition: Supervisor.php:103
getStyleArray($array)
Build style array from subcomponents.
Definition: Font.php:160
setItalic($pValue=false)
Set Italic.
Definition: Font.php:337
getColor()
Get Color.
Definition: Font.php:485
setSubScript($pValue=false)
Set SubScript.
Definition: Font.php:400
setSuperScript($pValue=false)
Set SuperScript.
Definition: Font.php:368
getActiveSheet()
Get the currently active sheet.
Definition: Supervisor.php:92
+ Here is the call graph for this function:

◆ getBold()

PHPExcel_Style_Font::getBold ( )

Get Bold.

Returns
boolean

Definition at line 293 of file Font.php.

References $_bold, and getSharedComponent().

Referenced by PHPExcel_Writer_HTML\_createCSSStyleFont().

293  {
294  if ($this->_isSupervisor) {
295  return $this->getSharedComponent()->getBold();
296  }
297  return $this->_bold;
298  }
getSharedComponent()
Get the shared style component for the currently active cell in currently active sheet.
Definition: Font.php:149
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getColor()

PHPExcel_Style_Font::getColor ( )

Get Color.

Returns
PHPExcel_Style_Color

Definition at line 485 of file Font.php.

References $_color.

Referenced by PHPExcel_Writer_Excel5_Workbook\_addFont(), PHPExcel_Writer_HTML\_createCSSStyleFont(), applyFromArray(), and setColor().

485  {
486  return $this->_color;
487  }
+ Here is the caller graph for this function:

◆ getHashCode()

PHPExcel_Style_Font::getHashCode ( )

Get hash code.

Returns
string Hash code

Implements PHPExcel_IComparable.

Definition at line 514 of file Font.php.

References getSharedComponent().

Referenced by PHPExcel_Writer_Excel5_Workbook\_addFont().

514  {
515  if ($this->_isSupervisor) {
516  return $this->getSharedComponent()->getHashCode();
517  }
518  return md5(
519  $this->_name
520  . $this->_size
521  . ($this->_bold ? 't' : 'f')
522  . ($this->_italic ? 't' : 'f')
523  . ($this->_superScript ? 't' : 'f')
524  . ($this->_subScript ? 't' : 'f')
525  . $this->_underline
526  . ($this->_strikethrough ? 't' : 'f')
527  . $this->_color->getHashCode()
528  . __CLASS__
529  );
530  }
getSharedComponent()
Get the shared style component for the currently active cell in currently active sheet.
Definition: Font.php:149
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getItalic()

PHPExcel_Style_Font::getItalic ( )

Get Italic.

Returns
boolean

Definition at line 324 of file Font.php.

References $_italic, and getSharedComponent().

Referenced by PHPExcel_Writer_HTML\_createCSSStyleFont().

324  {
325  if ($this->_isSupervisor) {
326  return $this->getSharedComponent()->getItalic();
327  }
328  return $this->_italic;
329  }
getSharedComponent()
Get the shared style component for the currently active cell in currently active sheet.
Definition: Font.php:149
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getName()

PHPExcel_Style_Font::getName ( )

Get Name.

Returns
string

Definition at line 231 of file Font.php.

References $_name, and getSharedComponent().

Referenced by PHPExcel_Writer_HTML\_createCSSStyleFont(), PHPExcel_Shared_Drawing\cellDimensionToPixels(), PHPExcel_Shared_Font\getDefaultColumnWidthByFont(), PHPExcel_Shared_Font\getDefaultRowHeightByFont(), and PHPExcel_Shared_Drawing\pixelsToCellDimension().

231  {
232  if ($this->_isSupervisor) {
233  return $this->getSharedComponent()->getName();
234  }
235  return $this->_name;
236  }
getSharedComponent()
Get the shared style component for the currently active cell in currently active sheet.
Definition: Font.php:149
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSharedComponent()

PHPExcel_Style_Font::getSharedComponent ( )

Get the shared style component for the currently active cell in currently active sheet.

Only used for style supervisor

Returns
PHPExcel_Style_Font

Definition at line 149 of file Font.php.

Referenced by getBold(), getHashCode(), getItalic(), getName(), getSize(), getStrikethrough(), getSubScript(), getSuperScript(), and getUnderline().

150  {
151  return $this->_parent->getSharedComponent()->getFont();
152  }
+ Here is the caller graph for this function:

◆ getSize()

PHPExcel_Style_Font::getSize ( )

Get Size.

Returns
double

Definition at line 262 of file Font.php.

References $_size, and getSharedComponent().

Referenced by PHPExcel_Writer_HTML\_createCSSStyleFont(), PHPExcel_Shared_Drawing\cellDimensionToPixels(), PHPExcel_Shared_Font\getDefaultColumnWidthByFont(), PHPExcel_Shared_Font\getDefaultRowHeightByFont(), PHPExcel_Shared_Font\getTextWidthPixelsExact(), and PHPExcel_Shared_Drawing\pixelsToCellDimension().

262  {
263  if ($this->_isSupervisor) {
264  return $this->getSharedComponent()->getSize();
265  }
266  return $this->_size;
267  }
getSharedComponent()
Get the shared style component for the currently active cell in currently active sheet.
Definition: Font.php:149
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getStrikethrough()

PHPExcel_Style_Font::getStrikethrough ( )

Get Strikethrough.

Returns
boolean

Definition at line 454 of file Font.php.

References $_strikethrough, and getSharedComponent().

Referenced by PHPExcel_Writer_HTML\_createCSSStyleFont().

454  {
455  if ($this->_isSupervisor) {
456  return $this->getSharedComponent()->getStrikethrough();
457  }
458  return $this->_strikethrough;
459  }
getSharedComponent()
Get the shared style component for the currently active cell in currently active sheet.
Definition: Font.php:149
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getStyleArray()

PHPExcel_Style_Font::getStyleArray (   $array)

Build style array from subcomponents.

Parameters
array$array
Returns
array

Definition at line 160 of file Font.php.

References array.

Referenced by applyFromArray(), setBold(), setItalic(), setName(), setSize(), setStrikethrough(), setSubScript(), setSuperScript(), and setUnderline().

161  {
162  return array('font' => $array);
163  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ getSubScript()

PHPExcel_Style_Font::getSubScript ( )

Get SubScript.

Returns
boolean

Definition at line 387 of file Font.php.

References $_subScript, and getSharedComponent().

387  {
388  if ($this->_isSupervisor) {
389  return $this->getSharedComponent()->getSubScript();
390  }
391  return $this->_subScript;
392  }
getSharedComponent()
Get the shared style component for the currently active cell in currently active sheet.
Definition: Font.php:149
+ Here is the call graph for this function:

◆ getSuperScript()

PHPExcel_Style_Font::getSuperScript ( )

Get SuperScript.

Returns
boolean

Definition at line 355 of file Font.php.

References $_superScript, and getSharedComponent().

355  {
356  if ($this->_isSupervisor) {
357  return $this->getSharedComponent()->getSuperScript();
358  }
359  return $this->_superScript;
360  }
getSharedComponent()
Get the shared style component for the currently active cell in currently active sheet.
Definition: Font.php:149
+ Here is the call graph for this function:

◆ getUnderline()

PHPExcel_Style_Font::getUnderline ( )

Get Underline.

Returns
string

Definition at line 419 of file Font.php.

References $_underline, and getSharedComponent().

Referenced by PHPExcel_Writer_HTML\_createCSSStyleFont().

419  {
420  if ($this->_isSupervisor) {
421  return $this->getSharedComponent()->getUnderline();
422  }
423  return $this->_underline;
424  }
getSharedComponent()
Get the shared style component for the currently active cell in currently active sheet.
Definition: Font.php:149
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setBold()

PHPExcel_Style_Font::setBold (   $pValue = false)

Set Bold.

Parameters
boolean$pValue
Returns
PHPExcel_Style_Font

Definition at line 306 of file Font.php.

References array, PHPExcel_Style_Supervisor\getActiveSheet(), PHPExcel_Style_Supervisor\getSelectedCells(), and getStyleArray().

Referenced by applyFromArray().

306  {
307  if ($pValue == '') {
308  $pValue = false;
309  }
310  if ($this->_isSupervisor) {
311  $styleArray = $this->getStyleArray(array('bold' => $pValue));
312  $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);
313  } else {
314  $this->_bold = $pValue;
315  }
316  return $this;
317  }
getSelectedCells()
Get the currently active cell coordinate in currently active sheet.
Definition: Supervisor.php:103
getStyleArray($array)
Build style array from subcomponents.
Definition: Font.php:160
Create styles array
The data for the language used.
getActiveSheet()
Get the currently active sheet.
Definition: Supervisor.php:92
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setColor()

PHPExcel_Style_Font::setColor ( PHPExcel_Style_Color  $pValue = null)

Set Color.

Parameters
PHPExcel_Style_Color$pValue
Exceptions
PHPExcel_Exception
Returns
PHPExcel_Style_Font

Definition at line 496 of file Font.php.

References array, PHPExcel_Style_Supervisor\getActiveSheet(), getColor(), and PHPExcel_Style_Supervisor\getSelectedCells().

496  {
497  // make sure parameter is a real color and not a supervisor
498  $color = $pValue->getIsSupervisor() ? $pValue->getSharedComponent() : $pValue;
499 
500  if ($this->_isSupervisor) {
501  $styleArray = $this->getColor()->getStyleArray(array('argb' => $color->getARGB()));
502  $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);
503  } else {
504  $this->_color = $color;
505  }
506  return $this;
507  }
getSelectedCells()
Get the currently active cell coordinate in currently active sheet.
Definition: Supervisor.php:103
getIsSupervisor()
Is this a supervisor or a cell style component?
Definition: Supervisor.php:82
getSharedComponent()
Get the shared style component for the currently active cell in currently active sheet.
Definition: Color.php:114
getColor()
Get Color.
Definition: Font.php:485
Create styles array
The data for the language used.
getActiveSheet()
Get the currently active sheet.
Definition: Supervisor.php:92
+ Here is the call graph for this function:

◆ setItalic()

PHPExcel_Style_Font::setItalic (   $pValue = false)

Set Italic.

Parameters
boolean$pValue
Returns
PHPExcel_Style_Font

Definition at line 337 of file Font.php.

References array, PHPExcel_Style_Supervisor\getActiveSheet(), PHPExcel_Style_Supervisor\getSelectedCells(), and getStyleArray().

Referenced by applyFromArray().

337  {
338  if ($pValue == '') {
339  $pValue = false;
340  }
341  if ($this->_isSupervisor) {
342  $styleArray = $this->getStyleArray(array('italic' => $pValue));
343  $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);
344  } else {
345  $this->_italic = $pValue;
346  }
347  return $this;
348  }
getSelectedCells()
Get the currently active cell coordinate in currently active sheet.
Definition: Supervisor.php:103
getStyleArray($array)
Build style array from subcomponents.
Definition: Font.php:160
Create styles array
The data for the language used.
getActiveSheet()
Get the currently active sheet.
Definition: Supervisor.php:92
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setName()

PHPExcel_Style_Font::setName (   $pValue = 'Calibri')

Set Name.

Parameters
string$pValue
Returns
PHPExcel_Style_Font

Definition at line 244 of file Font.php.

References array, PHPExcel_Style_Supervisor\getActiveSheet(), PHPExcel_Style_Supervisor\getSelectedCells(), and getStyleArray().

Referenced by applyFromArray().

244  {
245  if ($pValue == '') {
246  $pValue = 'Calibri';
247  }
248  if ($this->_isSupervisor) {
249  $styleArray = $this->getStyleArray(array('name' => $pValue));
250  $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);
251  } else {
252  $this->_name = $pValue;
253  }
254  return $this;
255  }
getSelectedCells()
Get the currently active cell coordinate in currently active sheet.
Definition: Supervisor.php:103
getStyleArray($array)
Build style array from subcomponents.
Definition: Font.php:160
Create styles array
The data for the language used.
getActiveSheet()
Get the currently active sheet.
Definition: Supervisor.php:92
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSize()

PHPExcel_Style_Font::setSize (   $pValue = 10)

Set Size.

Parameters
double$pValue
Returns
PHPExcel_Style_Font

Definition at line 275 of file Font.php.

References array, PHPExcel_Style_Supervisor\getActiveSheet(), PHPExcel_Style_Supervisor\getSelectedCells(), and getStyleArray().

Referenced by applyFromArray().

275  {
276  if ($pValue == '') {
277  $pValue = 10;
278  }
279  if ($this->_isSupervisor) {
280  $styleArray = $this->getStyleArray(array('size' => $pValue));
281  $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);
282  } else {
283  $this->_size = $pValue;
284  }
285  return $this;
286  }
getSelectedCells()
Get the currently active cell coordinate in currently active sheet.
Definition: Supervisor.php:103
getStyleArray($array)
Build style array from subcomponents.
Definition: Font.php:160
Create styles array
The data for the language used.
getActiveSheet()
Get the currently active sheet.
Definition: Supervisor.php:92
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setStrikethrough()

PHPExcel_Style_Font::setStrikethrough (   $pValue = false)

Set Strikethrough.

Parameters
boolean$pValue
Returns
PHPExcel_Style_Font

Definition at line 467 of file Font.php.

References array, PHPExcel_Style_Supervisor\getActiveSheet(), PHPExcel_Style_Supervisor\getSelectedCells(), and getStyleArray().

Referenced by applyFromArray().

467  {
468  if ($pValue == '') {
469  $pValue = false;
470  }
471  if ($this->_isSupervisor) {
472  $styleArray = $this->getStyleArray(array('strike' => $pValue));
473  $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);
474  } else {
475  $this->_strikethrough = $pValue;
476  }
477  return $this;
478  }
getSelectedCells()
Get the currently active cell coordinate in currently active sheet.
Definition: Supervisor.php:103
getStyleArray($array)
Build style array from subcomponents.
Definition: Font.php:160
Create styles array
The data for the language used.
getActiveSheet()
Get the currently active sheet.
Definition: Supervisor.php:92
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSubScript()

PHPExcel_Style_Font::setSubScript (   $pValue = false)

Set SubScript.

Parameters
boolean$pValue
Returns
PHPExcel_Style_Font

Definition at line 400 of file Font.php.

References array, PHPExcel_Style_Supervisor\getActiveSheet(), PHPExcel_Style_Supervisor\getSelectedCells(), and getStyleArray().

Referenced by applyFromArray().

400  {
401  if ($pValue == '') {
402  $pValue = false;
403  }
404  if ($this->_isSupervisor) {
405  $styleArray = $this->getStyleArray(array('subScript' => $pValue));
406  $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);
407  } else {
408  $this->_subScript = $pValue;
409  $this->_superScript = !$pValue;
410  }
411  return $this;
412  }
getSelectedCells()
Get the currently active cell coordinate in currently active sheet.
Definition: Supervisor.php:103
getStyleArray($array)
Build style array from subcomponents.
Definition: Font.php:160
Create styles array
The data for the language used.
getActiveSheet()
Get the currently active sheet.
Definition: Supervisor.php:92
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSuperScript()

PHPExcel_Style_Font::setSuperScript (   $pValue = false)

Set SuperScript.

Parameters
boolean$pValue
Returns
PHPExcel_Style_Font

Definition at line 368 of file Font.php.

References array, PHPExcel_Style_Supervisor\getActiveSheet(), PHPExcel_Style_Supervisor\getSelectedCells(), and getStyleArray().

Referenced by applyFromArray().

368  {
369  if ($pValue == '') {
370  $pValue = false;
371  }
372  if ($this->_isSupervisor) {
373  $styleArray = $this->getStyleArray(array('superScript' => $pValue));
374  $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);
375  } else {
376  $this->_superScript = $pValue;
377  $this->_subScript = !$pValue;
378  }
379  return $this;
380  }
getSelectedCells()
Get the currently active cell coordinate in currently active sheet.
Definition: Supervisor.php:103
getStyleArray($array)
Build style array from subcomponents.
Definition: Font.php:160
Create styles array
The data for the language used.
getActiveSheet()
Get the currently active sheet.
Definition: Supervisor.php:92
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setUnderline()

PHPExcel_Style_Font::setUnderline (   $pValue = self::UNDERLINE_NONE)

Set Underline.

Parameters
string | boolean$pValuePHPExcel_Style_Font underline type If a boolean is passed, then TRUE equates to UNDERLINE_SINGLE, false equates to UNDERLINE_NONE
Returns
PHPExcel_Style_Font

Definition at line 434 of file Font.php.

References array, PHPExcel_Style_Supervisor\getActiveSheet(), PHPExcel_Style_Supervisor\getSelectedCells(), and getStyleArray().

Referenced by applyFromArray().

434  {
435  if (is_bool($pValue)) {
436  $pValue = ($pValue) ? self::UNDERLINE_SINGLE : self::UNDERLINE_NONE;
437  } elseif ($pValue == '') {
438  $pValue = self::UNDERLINE_NONE;
439  }
440  if ($this->_isSupervisor) {
441  $styleArray = $this->getStyleArray(array('underline' => $pValue));
442  $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);
443  } else {
444  $this->_underline = $pValue;
445  }
446  return $this;
447  }
getSelectedCells()
Get the currently active cell coordinate in currently active sheet.
Definition: Supervisor.php:103
getStyleArray($array)
Build style array from subcomponents.
Definition: Font.php:160
Create styles array
The data for the language used.
getActiveSheet()
Get the currently active sheet.
Definition: Supervisor.php:92
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $_bold

PHPExcel_Style_Font::$_bold = FALSE
protected

Definition at line 64 of file Font.php.

Referenced by getBold().

◆ $_color

PHPExcel_Style_Font::$_color
protected

Definition at line 106 of file Font.php.

Referenced by getColor().

◆ $_italic

PHPExcel_Style_Font::$_italic = FALSE
protected

Definition at line 71 of file Font.php.

Referenced by getItalic().

◆ $_name

PHPExcel_Style_Font::$_name = 'Calibri'
protected

Definition at line 50 of file Font.php.

Referenced by getName().

◆ $_size

PHPExcel_Style_Font::$_size = 11
protected

Definition at line 57 of file Font.php.

Referenced by getSize().

◆ $_strikethrough

PHPExcel_Style_Font::$_strikethrough = FALSE
protected

Definition at line 99 of file Font.php.

Referenced by getStrikethrough().

◆ $_subScript

PHPExcel_Style_Font::$_subScript = FALSE
protected

Definition at line 85 of file Font.php.

Referenced by getSubScript().

◆ $_superScript

PHPExcel_Style_Font::$_superScript = FALSE
protected

Definition at line 78 of file Font.php.

Referenced by getSuperScript().

◆ $_underline

PHPExcel_Style_Font::$_underline = self::UNDERLINE_NONE
protected

Definition at line 92 of file Font.php.

Referenced by getUnderline().

◆ UNDERLINE_DOUBLE

◆ UNDERLINE_DOUBLEACCOUNTING

const PHPExcel_Style_Font::UNDERLINE_DOUBLEACCOUNTING = 'doubleAccounting'

◆ UNDERLINE_NONE

◆ UNDERLINE_SINGLE

◆ UNDERLINE_SINGLEACCOUNTING

const PHPExcel_Style_Font::UNDERLINE_SINGLEACCOUNTING = 'singleAccounting'

The documentation for this class was generated from the following file: