예제 #1
0
 /**
  * add style/width to column
  *
  * @param string $_styleName
  * @param string $_columnWidth (for example: '2,5cm')
  */
 protected function _addColumnStyle($_styleName, $_columnWidth)
 {
     $this->_openDocumentObject->addStyle('<style:style style:name="' . $_styleName . '" style:family="table-column" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"><style:table-column-properties style:column-width="' . $_columnWidth . '"/></style:style>');
 }
 /**
  * add style/width to column
  *
  * @param string $styleName
  * @param string $values
  */
 protected function _addColumnStyle($styleName, $values)
 {
     $xml = '<style:style style:name="' . $styleName . '" style:family="table-column" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"><style:table-column-properties';
     foreach ($values as $attr => $value) {
         $xml .= ' style:' . $attr . '="' . $value . '"';
     }
     $xml .= ' /></style:style>';
     $this->_openDocumentObject->addStyle(array($xml));
 }