diff --git a/htdocs/includes/odtphp/odf.php b/htdocs/includes/odtphp/odf.php index 225466ca453cbc03ee14244edbc3f505fad905fe..d4b79af8013028bfa20beaa625d58d1b41e6666b 100644 --- a/htdocs/includes/odtphp/odf.php +++ b/htdocs/includes/odtphp/odf.php @@ -610,6 +610,21 @@ IMG; closedir($handle); } } + + /** + * return the value present on odt in [valuename][/valuename] + * @param string $value name balise in the template + * @return string the value inside the balise + * + */ + public function getvalue($valuename) + { + $searchreg="/\\[".$valuename."\\](.*)\\[\\/".$valuename."\\]/"; + preg_match($searchreg, $this->contentXml, $matches); + $this->contentXml = preg_replace($searchreg, "", $this->contentXml); + return $matches[1]; + } + } ?>