示例#1
0
 /**
  * sets background color
  *
  * @param   string  $backgroundColor
  */
 public function setBackgroundColor($backgroundColor)
 {
     $this->_backgroundColor = $backgroundColor;
     if ($this->_backgroundColor && $this->_colorTable) {
         $this->_colorTable->add($this->_backgroundColor);
     }
 }
示例#2
0
 /**
  * @dataProvider provideGetColorIndex
  * @param   PHPRtfLite_DocHead_ColorTable   $colorTable
  * @param   string                          $color
  * @param   integer                         $colorIndex
  */
 public function testGetColorIndex(PHPRtfLite_DocHead_ColorTable $colorTable, $color, $colorIndex)
 {
     $colorTable->add($color);
     $this->assertEquals($colorIndex, $colorTable->getColorIndex($color));
 }
示例#3
0
 /**
  * sets rtf color table
  *
  * @param PHPRtfLite_DocHead_ColorTable $colorTable
  */
 public function setColorTable(PHPRtfLite_DocHead_ColorTable $colorTable)
 {
     if (!empty($this->_color)) {
         $colorTable->add($this->_color);
     }
     if (!empty($this->_backgroundColor)) {
         $colorTable->add($this->_backgroundColor);
     }
     $this->_colorTable = $colorTable;
 }
示例#4
0
 /**
  * sets rtf color table
  *
  * @param PHPRtfLite_DocHead_ColorTable $colorTable
  */
 public function setColorTable(PHPRtfLite_DocHead_ColorTable $colorTable)
 {
     if ($this->_color) {
         $colorTable->add($this->_color);
     }
     $this->_colorTable = $colorTable;
 }