118 public function __construct($isSupervisor = FALSE, $isConditional = FALSE)
121 parent::__construct($isSupervisor);
124 if ($isConditional) {
128 $this->_italic = NULL;
129 $this->_superScript = NULL;
130 $this->_subScript = NULL;
131 $this->_underline = NULL;
132 $this->_strikethrough = NULL;
139 $this->_color->bindParent($this,
'_color');
151 return $this->_parent->getSharedComponent()->getFont();
162 return array(
'font' => $array);
188 if (is_array($pStyles)) {
189 if ($this->_isSupervisor) {
192 if (array_key_exists(
'name', $pStyles)) {
193 $this->
setName($pStyles[
'name']);
195 if (array_key_exists(
'bold', $pStyles)) {
196 $this->
setBold($pStyles[
'bold']);
198 if (array_key_exists(
'italic', $pStyles)) {
201 if (array_key_exists(
'superScript', $pStyles)) {
204 if (array_key_exists(
'subScript', $pStyles)) {
207 if (array_key_exists(
'underline', $pStyles)) {
210 if (array_key_exists(
'strike', $pStyles)) {
213 if (array_key_exists(
'color', $pStyles)) {
214 $this->
getColor()->applyFromArray($pStyles[
'color']);
216 if (array_key_exists(
'size', $pStyles)) {
217 $this->
setSize($pStyles[
'size']);
232 if ($this->_isSupervisor) {
244 public function setName($pValue =
'Calibri') {
248 if ($this->_isSupervisor) {
252 $this->_name = $pValue;
263 if ($this->_isSupervisor) {
279 if ($this->_isSupervisor) {
283 $this->_size = $pValue;
294 if ($this->_isSupervisor) {
310 if ($this->_isSupervisor) {
314 $this->_bold = $pValue;
325 if ($this->_isSupervisor) {
341 if ($this->_isSupervisor) {
345 $this->_italic = $pValue;
356 if ($this->_isSupervisor) {
372 if ($this->_isSupervisor) {
376 $this->_superScript = $pValue;
377 $this->_subScript = !$pValue;
388 if ($this->_isSupervisor) {
404 if ($this->_isSupervisor) {
408 $this->_subScript = $pValue;
409 $this->_superScript = !$pValue;
420 if ($this->_isSupervisor) {
435 if (is_bool($pValue)) {
436 $pValue = ($pValue) ? self::UNDERLINE_SINGLE : self::UNDERLINE_NONE;
437 } elseif ($pValue ==
'') {
438 $pValue = self::UNDERLINE_NONE;
440 if ($this->_isSupervisor) {
444 $this->_underline = $pValue;
455 if ($this->_isSupervisor) {
471 if ($this->_isSupervisor) {
475 $this->_strikethrough = $pValue;
498 $color = $pValue->getIsSupervisor() ? $pValue->getSharedComponent() : $pValue;
500 if ($this->_isSupervisor) {
501 $styleArray = $this->
getColor()->getStyleArray(
array(
'argb' => $color->getARGB()));
504 $this->_color = $color;
515 if ($this->_isSupervisor) {
521 . ($this->_bold ?
't' :
'f')
522 . ($this->_italic ?
't' :
'f')
523 . ($this->_superScript ?
't' :
'f')
524 . ($this->_subScript ?
't' :
'f')
526 . ($this->_strikethrough ?
't' :
'f')
527 . $this->_color->getHashCode()
setStrikethrough($pValue=false)
Set Strikethrough.
setColor(PHPExcel_Style_Color $pValue=null)
Set Color.
setUnderline($pValue=self::UNDERLINE_NONE)
Set Underline.
getUnderline()
Get Underline.
getSuperScript()
Get SuperScript.
setBold($pValue=false)
Set Bold.
setSize($pValue=10)
Set Size.
setName($pValue='Calibri')
Set Name.
getSharedComponent()
Get the shared style component for the currently active cell in currently active sheet.
getSelectedCells()
Get the currently active cell coordinate in currently active sheet.
getStyleArray($array)
Build style array from subcomponents.
setItalic($pValue=false)
Set Italic.
const UNDERLINE_DOUBLEACCOUNTING
getStrikethrough()
Get Strikethrough.
setSubScript($pValue=false)
Set SubScript.
applyFromArray($pStyles=null)
Apply styles from array.
getHashCode()
Get hash code.
setSuperScript($pValue=false)
Set SuperScript.
const UNDERLINE_SINGLEACCOUNTING
Create styles array
The data for the language used.
__construct($isSupervisor=FALSE, $isConditional=FALSE)
Create a new PHPExcel_Style_Font.
getSubScript()
Get SubScript.
getActiveSheet()
Get the currently active sheet.