setClass ('table-row'); if (isset($style_name)) { $this->setStyleName ($style_name); } } /** * Return the elements name. * * @return string The ODT XML element name. */ public function getElementName () { return ('table:table-row'); } /** * Return string with encoded opening tag. * * @return string The ODT XML code to open this element. */ public function getOpeningTag () { $style_name = $this->getStyleName(); if (isset($style_name)) { return ''; } return ''; } /** * Return string with encoded closing tag. * * @return string The ODT XML code to close this element. */ public function getClosingTag () { return ''; } /** * Are we in a paragraph or not? * As a table row we are not. * * @return boolean */ public function getInParagraph() { return false; } /** * Determine and set the parent for this element. * As a table row our parent is the table element. * * @param ODTStateElement $previous */ public function determineParent(ODTStateElement $previous) { $table = $previous; while (isset($table)) { if ($table->getClass() == 'table') { break; } $table = $table->getParent(); } $this->setParent($table); if (!isset($table)) { // ??? Should not be... return; } // A new row, we are back in the first column again. $table->increaseRowCount(); $table->setTableCurrentColumn(0); } /** * Return the table to which this column belongs. * * @return ODTStateElement */ public function getTable () { return $this->getParent(); } }