예제 #1
0
 /**
  * Write level font.
  *
  * @since 0.11.0
  *
  * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
  * @param \PhpOffice\PhpWord\Style\NumberingLevel $level
  * @return void
  * @todo Use font style writer
  */
 private function writeFont(XMLWriter $xmlWriter, NumberingLevel $level)
 {
     $font = $level->getFont();
     $hint = $level->getHint();
     $xmlWriter->startElement('w:rPr');
     $xmlWriter->startElement('w:rFonts');
     $xmlWriter->writeAttributeIf($font !== null, 'w:ascii', $font);
     $xmlWriter->writeAttributeIf($font !== null, 'w:hAnsi', $font);
     $xmlWriter->writeAttributeIf($font !== null, 'w:cs', $font);
     $xmlWriter->writeAttributeIf($hint !== null, 'w:hint', $hint);
     $xmlWriter->endElement();
     // w:rFonts
     $xmlWriter->endElement();
     // w:rPr
 }
예제 #2
0
파일: Shape.php 프로젝트: Senasum/PHPWord
 /**
  * Write polyline.
  *
  * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
  * @param \PhpOffice\PhpWord\Style\Shape $style
  * @return void
  */
 private function writePolyline(XMLWriter $xmlWriter, ShapeStyle $style)
 {
     $xmlWriter->writeAttributeIf($style->getPoints() !== null, 'points', $style->getPoints());
 }