Пример #1
0
 /**
  * @param Style $styleToUpdate Style to update (passed as reference)
  * @param Style $baseStyle
  * @return void
  */
 private function mergeCellProperties($styleToUpdate, $baseStyle)
 {
     if (!$this->hasSetWrapText && $baseStyle->shouldWrapText()) {
         $styleToUpdate->setShouldWrapText();
     }
     if (!$this->getBorder() && $baseStyle->shouldApplyBorder()) {
         $styleToUpdate->setBorder($baseStyle->getBorder());
     }
     if (!$this->hasSetBackgroundColor && $baseStyle->shouldApplyBackgroundColor()) {
         $styleToUpdate->setBackgroundColor($baseStyle->getBackgroundColor());
     }
 }