Source for file OpenDocumentAbstract.php
Documentation is available at OpenDocumentAbstract.php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
* Created on 04.01.2007 by Norman Markgraf (nmarkgraf(at)user.sourceforge.net)
* PHP versions 5.2 or better.
* 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: OpenDocumentAbstract.php 182 2007-06-11 13:32:34Z nmarkgraf $
require_once 'OpenDocumentPHP/util/AbstractDocument.php';
require_once 'OpenDocumentPHP/util/Fragment.php';
require_once 'OpenDocumentPHP/util/ElementFragment.php';
require_once 'OpenDocumentPHP/global/FontFaceDeclFragment.php';
require_once 'OpenDocumentPHP/global/AutomaticStylesFragment.php';
require_once 'OpenDocumentPHP/content/ContentDocument.php';
require_once 'OpenDocumentPHP/meta/MetaDocument.php';
require_once 'OpenDocumentPHP/styles/StylesDocument.php';
require_once 'OpenDocumentPHP/settings/SettingsDocument.php';
require_once 'OpenDocumentPHP/OpenDocumentArchive.php';
* OpenDocumentAbstract class.
* @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 $Revision: 182 $
* @package OpenDocumentPHP
* @link http://www.oasis-open.org/committees/download.php/12572/OpenDocument-v1.0-os.pdf Open Document Format for Office Applications Release 1.0
* @link http://www.oasis-open.org/committees/download.php/19274/OpenDocument-v1.0ed2-cs1.pdf Open Document Format for Office Applications Release 1.0 2nd Edition
* @link http://www.oasis-open.org/committees/download.php/20847/OpenDocument-v1.1-cs1.pdf Open Document Format for Office Applications Release 1.1
* @since 0.5.0 - 08.02.2007
* @since 0.5.0 - 08.02.2007
* @since 0.5.0 - 08.02.2007
* @since 0.5.0 - 08.02.2007
* @since 0.5.0 - 08.02.2007
* @since 0.5.0 - 08.02.2007
protected function init() {
* @since 0.5.0 - 08.02.2007
* @since 0.5.0 - 08.02.2007
* @since 0.5.0 - 08.02.2007
* @since 0.5.0 - 08.02.2007
* @since 0.5.0 - 08.02.2007
* @since 0.5.2 - 02.03.2007
return $this->meta->loadXML($this->getFromName('meta.xml'));
* Load settings document.
* @since 0.5.2 - 02.03.2007
* @since 0.5.2 - 02.03.2007
* @since 0.5.2 - 02.03.2007
* Open an OpenDocument and read the meta.xml and settings data.
* @todo content.xml and styles.xml should be loaded too.
* @since 0.5.2 - 22.02.2007
function open($filename, $flags = 0, $mimetype = '') {
$ret = parent :: open($filename, $flags, $mimetype);
if (($flags && self :: CREATE) > 0) {
|