예제 #1
0
 /**
  * Register border colors.
  *
  * @param \PhpOffice\PhpWord\Style\Border $style
  * @return void
  */
 private function registerBorderColor($style)
 {
     $colors = $style->getBorderColor();
     foreach ($colors as $color) {
         if ($color !== null) {
             $this->registerTableItem($this->colorTable, $color);
         }
     }
 }
예제 #2
0
 /**
  * Set Style value
  *
  * @param string $key
  * @param mixed $value
  * @return self
  */
 public function setStyleValue($key, $value)
 {
     $key = String::removeUnderscorePrefix($key);
     if ('indent' == $key || 'hanging' == $key) {
         $value = $value * 720;
     } elseif ('spacing' == $key) {
         $value += 240;
         // because line height of 1 matches 240 twips
     }
     return parent::setStyleValue($key, $value);
 }