Source for file UserFieldDecls.php
Documentation is available at UserFieldDecls.php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
* Created on 26. Feb. 2007 by Norman Markgraf (nmarkgraf(at)user.sourceforge.net)
* UserFieldDecls class file.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* This software consists of voluntary contributions made by many individuals
* and is licensed under the GPL. For more information please see
* <http://opendocumentphp.org>.
* $Id: UserFieldDecls.php 256 2007-08-01 14:16:10Z nmarkgraf $
* @package OpenDocumentPHP
* @subpackage content_body_text
* @author Norman Markgraf (nmarkgraf(at)user.sourceforge.net)
* @copyright Copyright in 2006, 2007 by The OpenDocumentPHP Team
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License 2.0.
* @version SVN: $Id: UserFieldDecls.php 256 2007-08-01 14:16:10Z nmarkgraf $
* @link http://opendocumentphp.org
* @since 0.5.2 - 26. Feb. 2007
require_once 'OpenDocumentPHP/util/ODPElement.php';
* In this class we store all UserFieldDecl objects.
* @package OpenDocumentPHP
* @subpackage content_body_text
* @author Norman Markgraf (nmarkgraf(at)user.sourceforge.net)
* @copyright Copyright in 2006, 2007 by The OpenDocumentPHP Team
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License 2.0.
* @version Release: @package_version@
* @link http://opendocumentphp.org
* @since 0.5.2 - 26. Feb. 2007
* @since 0.5.2 - 26. Feb. 2007
function __construct($elem= null, $value= null, $namespace= null)
parent::__construct('text:user-field-decls', '', self::TEXT);
if ($elem instanceof DOMElement) {
* Retrieve User Field Decl by name and type;
* @since 0.5.2 - 26.02.2007
$node = $this->getTag('/office:document-content/office:body/office:text/text:user-field-decls/text:user-field-decl[@text:name="'. $name. '"]', '','', - 1);
// echo get_class($node) . ' ' . 'name:' . $node->tagName ."\n";
/*if ($node->attributes == null) {
echo $node->attributes->item(0)->name.":".$node->attributes->item(0)->value."\n";
echo $node->attributes->item(1)->name.":".$node->attributes->item(1)->value."\n";
echo $node->attributes->item(2)->name.":".$node->attributes->item(2)->value."\n";
if ($oldNode !== false) {
$tmp = $oldNode->getValueType();
$oldNode->setStringValue($value);
// echo "not found: '".$oldNode->getValueType()."'\n";
* Append new UserFieldDecl to this set.
* @since 0.5.2 - 26.02.2007
$this->appendChuld($newNode);
$newNode->setStringValue(value);
$newNode->setName($name);
if (isset ($newNode) && $newNode != NULL) {
|