vr-shopxo-source/extend/phpexcel/PHPExcel/Writer/Excel5/Workbook.php

1445 lines
52 KiB
PHP
Executable File

<?php
/**
* PHPExcel_Writer_Excel5_Workbook
*
* Copyright (c) 2006 - 2015 PHPExcel
*
* This library 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; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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 library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category PHPExcel
* @package PHPExcel_Writer_Excel5
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
*/
// Original file header of PEAR::Spreadsheet_Excel_Writer_Workbook (used as the base for this class):
// -----------------------------------------------------------------------------------------
// /*
// * Module written/ported by Xavier Noguer <xnoguer@rezebra.com>
// *
// * The majority of this is _NOT_ my code. I simply ported it from the
// * PERL Spreadsheet::WriteExcel module.
// *
// * The author of the Spreadsheet::WriteExcel module is John McNamara
// * <jmcnamara@cpan.org>
// *
// * I _DO_ maintain this code, and John McNamara has nothing to do with the
// * porting of this code to PHP. Any questions directly related to this
// * class library should be directed to me.
// *
// * License Information:
// *
// * Spreadsheet_Excel_Writer: A library for generating Excel Spreadsheets
// * Copyright (c) 2002-2003 Xavier Noguer xnoguer@rezebra.com
// *
// * This library 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; either
// * version 2.1 of the License, or (at your option) any later version.
// *
// * This library 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 library; if not, write to the Free Software
// * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// */
class PHPExcel_Writer_Excel5_Workbook extends PHPExcel_Writer_Excel5_BIFFwriter
{
/**
* Formula parser
*
* @var PHPExcel_Writer_Excel5_Parser
*/
private $parser;
/**
* The BIFF file size for the workbook.
* @var integer
* @see calcSheetOffsets()
*/
private $biffSize;
/**
* XF Writers
* @var PHPExcel_Writer_Excel5_Xf[]
*/
private $xfWriters = array();
/**
* Array containing the colour palette
* @var array
*/
private $palette;
/**
* The codepage indicates the text encoding used for strings
* @var integer
*/
private $codepage;
/**
* The country code used for localization
* @var integer
*/
private $countryCode;
/**
* Workbook
* @var PHPExcel
*/
private $phpExcel;
/**
* Fonts writers
*
* @var PHPExcel_Writer_Excel5_Font[]
*/
private $fontWriters = array();
/**
* Added fonts. Maps from font's hash => index in workbook
*
* @var array
*/
private $addedFonts = array();
/**
* Shared number formats
*
* @var array
*/
private $numberFormats = array();
/**