/**
* The shared formulas in a sheet. One SHAREDFMLA record contributes with one value.
/**
* The shared formula parts in a sheet. One FORMULA record contributes with one value if it
// Resolve indexed colors for font, fill, and border colors
// Cannot be resolved already in XF record, because PALETTE record comes afterwards
if (!$this->_readDataOnly) {
// border colors
$top = $objStyle->getBorders()->getTop();
$right = $objStyle->getBorders()->getRight();
$bottom = $objStyle->getBorders()->getBottom();
$left = $objStyle->getBorders()->getLeft();
$diagonal = $objStyle->getBorders()->getDiagonal();
/**
* Matrix index to get number of words from $capacity array.
*/
define('QRCAP_WORDS', 1);
* Return the next frame position
* @return array of x,y coordinates
if (($x > 0) AND ($y > 0)) {
$b22 = ord($frameY[$x]) & ord($frameY[$x-1]) & ord($frameYM[$x]) & ord($frameYM[$x-1]);
$w22 = ord($frameY[$x]) | ord($frameY[$x-1]) | ord($frameYM[$x]) | ord($frameYM[$x-1]);
if (($b22 | ($w22 ^ 1)) & 1) {
}
if (($x == 0) AND (ord($frameY[$x]) & 1)) {
} elseif ($x > 0) {
if ((ord($frameY[$x]) ^ ord($frameY[$x-1])) & 1) {
} elseif ($y > 0) {
if ((ord($frame[$y][$x]) ^ ord($frame[$y-1][$x])) & 1) {
private static function _uniord($c) {
if (ord($c{0}) >=0 && ord($c{0}) <= 127)
return ord($c{0});
if (ord($c{0}) >= 192 && ord($c{0}) <= 223)
return (ord($c{0})-192)*64 + (ord($c{1})-128);
if (ord($c{0}) >= 224 && ord($c{0}) <= 239)
return (ord($c{0})-224)*4096 + (ord($c{1})-128)*64 + (ord($c{2})-128);
if (ord($c{0}) >= 240 && ord($c{0}) <= 247)
return (ord($c{0})-240)*262144 + (ord($c{1})-128)*4096 + (ord($c{2})-128)*64 + (ord($c{3})-128);
if (ord($c{0}) >= 248 && ord($c{0}) <= 251)
return (ord($c{0})-248)*16777216 + (ord($c{1})-128)*262144 + (ord($c{2})-128)*4096 + (ord($c{3})-128)*64 + (ord($c{4})-128);
if (ord($c{0}) >= 252 && ord($c{0}) <= 253)
return 0;
} // function _uniord()
/**
* @var right-bottom corner X coordinate of inserted image
/**
* @var right-bottom corner Y coordinate of inserted image
/**
* @var HTML PARSER: array of boolean values, true in case of ordered list (OL), false otherwise.
*/
protected $listordered = array();
*/
protected $bordermrk = array();
/**
* Symbol used for HTML unordered list items
/**
* Regular expression used to find blank characters used for word-wrapping.
*/
protected $svginheritprop = array('clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cursor', 'direction', 'fill', 'fill-opacity', 'fill-rule', 'font', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'image-rendering', 'kerning', 'letter-spacing', 'marker', 'marker-end', 'marker-mid', 'marker-start', 'pointer-events', 'shape-rendering', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-rendering', 'visibility', 'word-spacing', 'writing-mode');
/**
* @var clusters of codewords (0, 3, 6)<br/>
* Values are hex equivalents of binary representation of bars (1 = bar, 0 = space).<br/>
* The codewords numbered from 900 to 928 have special meaning, some enable to switch between modes in order to optimise the code:<ul>
* <li>903 - 912 : Reserved</li>
* <li>913 : Switch to "Octet" only for the next codeword</li>
* <li>921 : Initialization</li>
* <li>922 : Terminator codeword for Macro PDF control block</li>
* <li>927 : Identifier for an ECI of a character set or code page</li>
* <li>928 : Macro marker codeword to indicate the beginning of a Macro PDF Control Block</li>
$sequence = $this->getInputSequences($code);
$codewords = array(); // array of code-words
$cw = $this->getCompaction($seq[0], $seq[1], true);
$codewords = array_merge($codewords, $cw);
}
/**
* Read a generic record
// offset: 2; size: 2: Record Type
$length = PHPExcel_Reader_Excel5::_GetInt4d($this->_data, $this->_pos + 4);
$recordData = substr($this->_data, $this->_pos + 8, $length);
// move stream pointer to next record
/**
* Read DggContainer record (Drawing Group Container)
$length = PHPExcel_Reader_Excel5::_GetInt4d($this->_data, $this->_pos + 4);
$recordData = substr($this->_data, $this->_pos + 8, $length);
// move stream pointer to next record
// record is a container, read contents
// size in bytes of name
$nameSize = ord($d[self::SIZE_OF_NAME_POS]) | (ord($d[self::SIZE_OF_NAME_POS+1]) << 8);
// type of entry
$type = ord($d[self::TYPE_POS]);
// Hacked by Andreas Rehm 2006 to ensure correct result of the <<24 block on 32 and 64bit systems
$_or_24 = ord($data[$pos + 3]);
// negative number
$_ord_24 = -abs((256 - $_or_24) << 24);
} else {
$_ord_24 = ($_or_24 & 127) << 24;
}
return ord($data[$pos]) | (ord($data[$pos + 1]) << 8) | (ord($data[$pos + 2]) << 16) | $_ord_24;
* Can handle both BOM'ed data and un-BOM'ed data.
* Assumes Big-Endian byte order if no BOM is available.
if( strlen($str) < 2 ) return $str;
$c0 = ord($str{0});
$c1 = ord($str{1});
if( $c0 == 0xfe && $c1 == 0xff ) { $str = substr($str,2); }
for($i=0;$i<$len;$i+=2) {
if( $bom_be ) { $val = ord($str{$i}) << 4; $val += ord($str{$i+1}); }
else { $val = ord($str{$i+1}) << 4; $val += ord($str{$i}); }
$newstr .= ($val == 0x228) ? "\n" : chr($val);
for ($i = 0 ; $i < $clen; ++$i) {
if (ord($code{$i}) > 127) {
for ($i = 0 ; $i < $clen; ++$i) {
if (ord($code{$i}) > 127) {
$binary_code_102bit = $first_byte.substr($binary_code, 2);
// convert binary data to codewords
$codewords = array();
$data = $this->hex_to_dec($binary_code_102bit);
$codewords[0] = bcmod($data, 636) * 2;
for ($i = 1; $i < 9; ++$i) {
$codewords[$i] = bcmod($data, 1365);
}
$codewords[9] = $data;
if (($fcs >> 10) == 1) {
$bitmask = 512;
foreach($codewords as $k => $val) {
// $p_remove_dir : A path to remove from the real path of the file to archive,
// in order to have a shorter path memorized in the archive.
// $p_add_dir : A path to add before the real path of the archived file,
// in order to have it memorized in the archive.
// $p_remove_dir : A path to remove from the real path of the file to archive,
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Invalid order of index range for option '".PclZipUtilOptionText($p_options_list[$i])."'");
// ----- Swap the file descriptor
// Here is a trick : I swap the temporary fd with the zip fd, in order to use
// ----- Set the attributes
$p_header['compression'] = ord($v_data_header['cm']);
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Unable to find End of Central Dir Record signature");
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid End of Central Dir Record size : ".strlen($v_binary_data));
{
// Initialise cell coordinate
/**
* Get cell coordinate column
{
// echo 'Cell '.$this->getCoordinate().' value is a '.$this->_dataType.' with a value of '.$this->getValue().'<br />';
try {
// echo 'Cell value for '.$this->getCoordinate().' is a formula: Calculating value<br />';
$result = PHPExcel_Calculation::getInstance()->calculateCellValue($this,$resetLog);
// echo $this->getCoordinate().' calculation result is '.$result.'<br />';
$result = '#N/A';
throw(new Exception($this->getParent()->getTitle().'!'.$this->getCoordinate().' -> '.$ex->getMessage()));
if ($result === '#Not Yet Implemented') {
// echo 'Returning fallback value of '.$this->_calculatedValue.' for cell '.$this->getCoordinate().'<br />';
}
// echo 'Returning calculated value of '.$result.' for cell '.$this->getCoordinate().'<br />';
/**
* PHPExcel_Shared_PasswordHasher
*/
class PHPExcel_Shared_PasswordHasher
/**
* Create a password hash from a given string.
*
* @param string $pPassword Password to hash
* @return string Hashed password
*/
public static function hashPassword($pPassword = '') {
$password = 0x0000;
$i = 1; // char position
// split the plain text password in its component characters
$chars = preg_split('//', $pPassword, -1, PREG_SPLIT_NO_EMPTY);