protected function PHPExcel_Helper_HTML::buildTextRun in Loft Data Grids 6.2
Same name and namespace in other branches
- 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Helper/HTML.php \PHPExcel_Helper_HTML::buildTextRun()
 
1 call to PHPExcel_Helper_HTML::buildTextRun()
- PHPExcel_Helper_HTML::parseTextNode in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Helper/ HTML.php  
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Helper/ HTML.php, line 602  
Class
Code
protected function buildTextRun() {
  $text = $this->stringData;
  if (trim($text) === '') {
    return;
  }
  $richtextRun = $this->richTextObject
    ->createTextRun($this->stringData);
  if ($this->face) {
    $richtextRun
      ->getFont()
      ->setName($this->face);
  }
  if ($this->size) {
    $richtextRun
      ->getFont()
      ->setSize($this->size);
  }
  if ($this->color) {
    $richtextRun
      ->getFont()
      ->setColor(new PHPExcel_Style_Color('ff' . $this->color));
  }
  if ($this->bold) {
    $richtextRun
      ->getFont()
      ->setBold(true);
  }
  if ($this->italic) {
    $richtextRun
      ->getFont()
      ->setItalic(true);
  }
  if ($this->underline) {
    $richtextRun
      ->getFont()
      ->setUnderline(PHPExcel_Style_Font::UNDERLINE_SINGLE);
  }
  if ($this->superscript) {
    $richtextRun
      ->getFont()
      ->setSuperScript(true);
  }
  if ($this->subscript) {
    $richtextRun
      ->getFont()
      ->setSubScript(true);
  }
  if ($this->strikethrough) {
    $richtextRun
      ->getFont()
      ->setStrikethrough(true);
  }
  $this->stringData = '';
}