Ejemplo n.º 1
0
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE
as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU LESSER GENERAL PUBLIC LICENSE for more details.

You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/
APIC::import("org.apicnet.io.OOo.absOOo");
APIC::import("org.apicnet.io.File");
/**
 * OOoMeta
 * 
 * @package 
 * @author diogene
 * @copyright Copyright (c) 2004
 * @version $Id: OOoMeta.php,v 1.6 2007-02-04 20:09:43 mose Exp $
 * @access public
 **/
class OOoMeta extends absOOo
{
    /**
     * OOoMeta::OOoMeta(), construteur. méthode d'instanciation des paramètre nécessaire au bon fonctionnement de cette class
     * 
     * @param $dir
Ejemplo n.º 2
0
 function unZip($dir, $file)
 {
     $zip = APIC::LoadClass("org.apicnet.io.archive.CZip");
     $zip->extract($dir, $file);
 }
Ejemplo n.º 3
0
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE
as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU LESSER GENERAL PUBLIC LICENSE for more details.

You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/
APIC::import("org.apicnet.io.OOo.absOOo");
APIC::import("org.apicnet.io.OOo.objOOo.OOoText");
/**
 * OOoWriter, classe de génération et de modification d'un fichier Writer
 * 
 * @package 
 * @author apicnet
 * @copyright Copyright (c) 2004
 * @version $Id$
 * @access public
 **/
class OOoWriter extends absOOo
{
    var $style;
    var $STYLNUM = array('style_family_text' => 1, 'style_family_para' => 1, 'style_page_style' => 1);
    function OOoWriter($dir)
    {
Ejemplo n.º 4
0
 function _save(&$sheet)
 {
     // Get rid of debug output
     ob_start();
     APIC::import("org.apicnet.io.OOo.objOOo.OOoTable");
     $OOoCalc = APIC::loadClass("org.apicnet.io.OOo.OOoDoc");
     $OOoCalc->newCalc();
     $OOoCalc->setName("export.sxc");
     $OOoCalc->meta->setCreator("TikiSheet");
     $OOoCalc->meta->setTitle("TikiSheet Export");
     $OOoCalc->content->addFeuille();
     foreach ($sheet->dataGrid as $rowIndex => $row) {
         foreach ($row as $columnIndex => $value) {
             $OOoCalc->content->addcellData($rowIndex + 1, $columnIndex + 1, array("DATA" => $value));
         }
     }
     $OOoCalc->save();
     $OOoCalc->close();
     ob_end_clean();
     $OOoCalc->download();
     return true;
 }
Ejemplo n.º 5
0
Copyright (c) 2002-2004 @PICNet

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE
as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU LESSER GENERAL PUBLIC LICENSE for more details.

You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/
APIC::import("org.apicnet.io.OOo.absOOo");
/**
 * 
 * @package 
 * @author Diogene 
 * @copyright Copyright (c) 2003
 * @version $Id: OOoTable.php,v 1.3 2005-05-18 11:01:39 mose Exp $
 * @access public 
 */
class OOoTable extends absOOo
{
    var $_column;
    var $_row;
    var $_lignCur;
    var $_colSpan;
    var $_rowSpan;
Ejemplo n.º 6
0
 function &loadClass($class_package, $parameters)
 {
     static $registry;
     if (!isset($registry)) {
         $registry =& APIClassRegistry::getInstance();
     }
     $class_package = preg_replace('/([À-Ý]|[A-Z])/e', 'chr(ord(\'\\1\')+32)', $class_package);
     $extractedClassName = strtolower(APIClassRegistry::extractClassName($class_package));
     if (isset($registry->instances[$extractedClassName])) {
         //	echo("OK ");
         //	echo(" chargement effectué avec succès de la class ".$registry->instances[$extractedClassName]->className()."<br>");
         return $registry->instances[$extractedClassName];
     } else {
         //	echo(" ....");
         return APIC::loadClass($class_package, $parameters, TRUE);
     }
 }
Ejemplo n.º 7
0
 /**
  * 
  *
  *
  * @param string $path chemin du répertoire à lister.
  * @access public
  * @since 1.1
  * @update 06/06/2002
  */
 function listDir($path)
 {
     if (file_exists($path) && is_dir($path)) {
         print "<ol>";
         $handle = opendir($path);
         while ($file = readdir($handle)) {
             if ($file != '.' && $file != '..') {
                 $fullpath = $path . '/' . $file;
                 if (is_dir($fullpath)) {
                     print "<li><strong>" . $file . "</strong>";
                     print "<ol>";
                     APIC::listDir($fullpath);
                     print "</ol>";
                 } else {
                     if (preg_match('/(\\.php)$/i', $file) > 0) {
                         print "<li>" . str_replace('.php', '', $file) . "</li>";
                     }
                 }
             }
         }
         print "</ol>";
     } else {
         print "<li>classes library directory cannot be found</li>";
     }
 }
Ejemplo n.º 8
0
Copyright (c) 2002-2004 @PICNet

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE
as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU LESSER GENERAL PUBLIC LICENSE for more details.

You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/
APIC::import("org.apicnet.io.OOo.*");
class OOoDoc extends OOoUtil
{
    var $meta;
    var $content;
    var $setting;
    var $manifest;
    var $fileName;
    var $dirName;
    var $XMLTYPE = array('Writer', 'Calc', 'Impress', 'Draw');
    var $TYPE;
    function OOoDoc()
    {
        $this->TYPE = NULL;
        $this->docExist = FALSE;
        $this->manifest = NULL;
Ejemplo n.º 9
0
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE
as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU LESSER GENERAL PUBLIC LICENSE for more details.

You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/
APIC::import("org.apicnet.io.OOo.absOOo");
APIC::import("org.apicnet.io.cdir");
class OOoManifest extends absOOo
{
    function OOoManifest($dir)
    {
        parent::absOOo();
        $this->DIRXML = $dir;
        $this->FILENAME = "META-INF/manifest.xml";
        $this->xml = new DOMIT_Document();
        $this->xml->setDocType("<!DOCTYPE manifest:manifest PUBLIC \"-//OpenOffice.org//DTD Manifest 1.0//EN\" \"Manifest.dtd\">");
    }
    function create($type)
    {
        $docManifestNode =& $this->xml->createElement("manifest:manifest");
        $docManifestNode->setAttribute("xmlns:manifest", "http://openoffice.org/2001/manifest");
        $fileEntryNode =& $this->xml->createElement("manifest:file-entry");
Ejemplo n.º 10
0
//this script may only be included - so its better to die if called directly.
if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
    header("location: index.php");
    exit;
}
/**
* @version 2.0
* @author Nicolas BUI <*****@*****.**>
* 
* This source file is part of JPHP Library Project.
* Copyright: 2002 Vitry sur Seine/FRANCE
*
* The latest version can be obtained from:
* http://www.jphplib.org
*/
APIC::import('org.apicnet.util.StringBuffer');
class File extends ErrorManager
{
    var $path = NULL;
    var $separator = NULL;
    var $os = NULL;
    function File($path = NULL, $new = False)
    {
        $this->separator = DIRECTORY_SEPARATOR;
        $this->os = getenv('OS');
        $this->setFilePath($path);
        if ($new) {
            $this->createFile();
        }
        parent::ErrorManager();
    }