Skip to content
Snippets Groups Projects
Commit 80e10158 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Add code comment

parent bb8e53de
Branches
Tags
No related merge requests found
...@@ -76,12 +76,15 @@ class Segment implements IteratorAggregate, Countable ...@@ -76,12 +76,15 @@ class Segment implements IteratorAggregate, Countable
/** /**
* Replace variables of the template in the XML code * Replace variables of the template in the XML code
* All the children are also called * All the children are also called
* Complete the current segment with new line
* *
* @return string * @return string
*/ */
public function merge() public function merge()
{ {
$this->xmlParsed .= str_replace(array_keys($this->vars), array_values($this->vars), $this->xml); $this->xmlParsed .= str_replace(array_keys($this->vars), array_values($this->vars), $this->xml); // We concat all file, later we will
// Note: To change style of table-row, we should make a replace here to add attribute
// table:style-name="Table4.A2"
if ($this->hasChildren()) { if ($this->hasChildren()) {
foreach ($this->children as $child) { foreach ($this->children as $child) {
$this->xmlParsed = str_replace($child->xml, ($child->xmlParsed=="")?$child->merge():$child->xmlParsed, $this->xmlParsed); $this->xmlParsed = str_replace($child->xml, ($child->xmlParsed=="")?$child->merge():$child->xmlParsed, $this->xmlParsed);
......
...@@ -107,6 +107,8 @@ class Odf ...@@ -107,6 +107,8 @@ class Odf
copy($filename, $this->tmpfile); copy($filename, $this->tmpfile);
// Now file has been loaded, we must move the [!-- BEGIN and [!-- END tags outside the
// <table:table-row tag
$this->_moveRowSegments(); $this->_moveRowSegments();
} }
...@@ -381,7 +383,8 @@ IMG; ...@@ -381,7 +383,8 @@ IMG;
} }
/** /**
* Declare a segment in order to use it in a loop * Declare a segment in order to use it in a loop.
* Extract the segment and store it into $this->segments[]. Return it for next call.
* *
* @param string $segment * @param string $segment
* @throws OdfException * @throws OdfException
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment