Example #1
0
 /**
  * Converts CSS 'border' style.
  *
  * This method receives a $targetProperty DOMElement and converts the given 
  * style with $styleName and $styleValue to attributes on this 
  * $targetProperty.
  * 
  * @param DOMElement $targetProperty 
  * @param string $styleName 
  * @param ezcDocumentPcssStyleValue $styleValue 
  */
 public function convert(DOMElement $targetProperty, $styleName, ezcDocumentPcssStyleValue $styleValue)
 {
     foreach ($styleValue->value as $type => $borderValues) {
         $targetProperty->setAttributeNS(ezcDocumentOdt::NS_ODT_FO, "fo:border-{$type}", sprintf("%smm %s %s", $borderValues['width'], $borderValues['style'], ezcDocumentOdtPcssConverterTools::serializeColor($borderValues['color'])));
     }
 }
Example #2
0
 /**
  * Converts color properties.
  *
  * This method receives a $targetProperty DOMElement and converts the given 
  * style with $styleName and $styleValue to attributes on this 
  * $targetProperty.
  * 
  * @param DOMElement $targetProperty 
  * @param string $styleName 
  * @param ezcDocumentPcssStyleValue $styleValue 
  */
 public function convert(DOMElement $targetProperty, $styleName, ezcDocumentPcssStyleValue $styleValue)
 {
     $targetProperty->setAttributeNS(ezcDocumentOdt::NS_ODT_FO, "fo:{$styleName}", ezcDocumentOdtPcssConverterTools::serializeColor($styleValue->value));
 }