diff --git a/Classes/PHPExcel/Reader/CSV.php b/Classes/PHPExcel/Reader/CSV.php
index d4fefd5..c8c5fbb 100644
--- a/Classes/PHPExcel/Reader/CSV.php
+++ b/Classes/PHPExcel/Reader/CSV.php
@@ -95,7 +95,8 @@ class PHPExcel_Reader_CSV extends PHPExcel_Reader_Abstract implements PHPExcel_R
/**
* Create a new PHPExcel_Reader_CSV
*/
- public function __construct() {
+ public function __construct()
+ {
$this->_readFilter = new PHPExcel_Reader_DefaultReadFilter();
}
@@ -106,7 +107,7 @@ class PHPExcel_Reader_CSV extends PHPExcel_Reader_Abstract implements PHPExcel_R
*/
protected function _isValidFormat()
{
- return TRUE;
+ return true;
}
/**
@@ -175,7 +176,7 @@ class PHPExcel_Reader_CSV extends PHPExcel_Reader_Abstract implements PHPExcel_R
// Open file
$this->_openFile($pFilename);
if (!$this->_isValidFormat()) {
- fclose ($this->_fileHandle);
+ fclose($this->_fileHandle);
throw new PHPExcel_Reader_Exception($pFilename . " is an Invalid Spreadsheet file.");
}
$fileHandle = $this->_fileHandle;
@@ -193,7 +194,7 @@ class PHPExcel_Reader_CSV extends PHPExcel_Reader_Abstract implements PHPExcel_R
$worksheetInfo[0]['totalColumns'] = 0;
// Loop through each line of the file in turn
- while (($rowData = fgetcsv($fileHandle, 0, $this->_delimiter, $this->_enclosure)) !== FALSE) {
+ while (($rowData = fgetcsv($fileHandle, 0, $this->_delimiter, $this->_enclosure)) !== false) {
$worksheetInfo[0]['totalRows']++;
$worksheetInfo[0]['lastColumnIndex'] = max($worksheetInfo[0]['lastColumnIndex'], count($rowData) - 1);
}
@@ -239,7 +240,7 @@ class PHPExcel_Reader_CSV extends PHPExcel_Reader_Abstract implements PHPExcel_R
// Open file
$this->_openFile($pFilename);
if (!$this->_isValidFormat()) {
- fclose ($this->_fileHandle);
+ fclose($this->_fileHandle);
throw new PHPExcel_Reader_Exception($pFilename . " is an Invalid Spreadsheet file.");
}
$fileHandle = $this->_fileHandle;
@@ -264,7 +265,7 @@ class PHPExcel_Reader_CSV extends PHPExcel_Reader_Abstract implements PHPExcel_R
}
// Loop through each line of the file in turn
- while (($rowData = fgetcsv($fileHandle, 0, $this->_delimiter, $this->_enclosure)) !== FALSE) {
+ while (($rowData = fgetcsv($fileHandle, 0, $this->_delimiter, $this->_enclosure)) !== false) {
$columnLetter = 'A';
foreach ($rowData as $rowDatum) {
if ($rowDatum != '' && $this->_readFilter->readCell($columnLetter, $currentRow)) {
@@ -302,7 +303,8 @@ class PHPExcel_Reader_CSV extends PHPExcel_Reader_Abstract implements PHPExcel_R
*
* @return string
*/
- public function getDelimiter() {
+ public function getDelimiter()
+ {
return $this->_delimiter;
}
@@ -312,7 +314,8 @@ class PHPExcel_Reader_CSV extends PHPExcel_Reader_Abstract implements PHPExcel_R
* @param string $pValue Delimiter, defaults to ,
* @return PHPExcel_Reader_CSV
*/
- public function setDelimiter($pValue = ',') {
+ public function setDelimiter($pValue = ',')
+ {
$this->_delimiter = $pValue;
return $this;
}
@@ -322,7 +325,8 @@ class PHPExcel_Reader_CSV extends PHPExcel_Reader_Abstract implements PHPExcel_R
*
* @return string
*/
- public function getEnclosure() {
+ public function getEnclosure()
+ {
return $this->_enclosure;
}
@@ -332,7 +336,8 @@ class PHPExcel_Reader_CSV extends PHPExcel_Reader_Abstract implements PHPExcel_R
* @param string $pValue Enclosure, defaults to "
* @return PHPExcel_Reader_CSV
*/
- public function setEnclosure($pValue = '"') {
+ public function setEnclosure($pValue = '"')
+ {
if ($pValue == '') {
$pValue = '"';
}
@@ -345,7 +350,8 @@ class PHPExcel_Reader_CSV extends PHPExcel_Reader_Abstract implements PHPExcel_R
*
* @return integer
*/
- public function getSheetIndex() {
+ public function getSheetIndex()
+ {
return $this->_sheetIndex;
}
@@ -355,7 +361,8 @@ class PHPExcel_Reader_CSV extends PHPExcel_Reader_Abstract implements PHPExcel_R
* @param integer $pValue Sheet index
* @return PHPExcel_Reader_CSV
*/
- public function setSheetIndex($pValue = 0) {
+ public function setSheetIndex($pValue = 0)
+ {
$this->_sheetIndex = $pValue;
return $this;
}
@@ -365,7 +372,7 @@ class PHPExcel_Reader_CSV extends PHPExcel_Reader_Abstract implements PHPExcel_R
*
* @param boolean $contiguous
*/
- public function setContiguous($contiguous = FALSE)
+ public function setContiguous($contiguous = false)
{
$this->_contiguous = (bool) $contiguous;
if (!$contiguous) {
@@ -380,8 +387,7 @@ class PHPExcel_Reader_CSV extends PHPExcel_Reader_Abstract implements PHPExcel_R
*
* @return boolean
*/
- public function getContiguous() {
+ public function getContiguous(){
return $this->_contiguous;
}
-
}
diff --git a/Classes/PHPExcel/Reader/DefaultReadFilter.php b/Classes/PHPExcel/Reader/DefaultReadFilter.php
index 7caf260..2e06dcb 100644
--- a/Classes/PHPExcel/Reader/DefaultReadFilter.php
+++ b/Classes/PHPExcel/Reader/DefaultReadFilter.php
@@ -52,7 +52,8 @@ class PHPExcel_Reader_DefaultReadFilter implements PHPExcel_Reader_IReadFilter
* @param $worksheetName Optional worksheet name
* @return boolean
*/
- public function readCell($column, $row, $worksheetName = '') {
+ public function readCell($column, $row, $worksheetName = '')
+ {
return true;
}
}
diff --git a/Classes/PHPExcel/Reader/Excel2003XML.php b/Classes/PHPExcel/Reader/Excel2003XML.php
index e66ee1f..29720aa 100644
--- a/Classes/PHPExcel/Reader/Excel2003XML.php
+++ b/Classes/PHPExcel/Reader/Excel2003XML.php
@@ -239,7 +239,7 @@ class PHPExcel_Reader_Excel2003XML extends PHPExcel_Reader_Abstract implements P
return $this->loadIntoExisting($pFilename, $objPHPExcel);
}
- protected static function identifyFixedStyleValue($styleList,&$styleAttributeValue)
+ protected static function identifyFixedStyleValue($styleList, &$styleAttributeValue)
{
$styleAttributeValue = strtolower($styleAttributeValue);
foreach ($styleList as $style) {
@@ -251,18 +251,18 @@ class PHPExcel_Reader_Excel2003XML extends PHPExcel_Reader_Abstract implements P
return false;
}
- /**
- * pixel units to excel width units(units of 1/256th of a character width)
- * @param pxs
- * @return
- */
- protected static function _pixel2WidthUnits($pxs)
- {
- $UNIT_OFFSET_MAP = array(0, 36, 73, 109, 146, 182, 219);
+ /**
+ * pixel units to excel width units(units of 1/256th of a character width)
+ * @param pxs
+ * @return
+ */
+ protected static function _pixel2WidthUnits($pxs)
+ {
+ $UNIT_OFFSET_MAP = array(0, 36, 73, 109, 146, 182, 219);
- $widthUnits = 256 * ($pxs / 7);
- $widthUnits += $UNIT_OFFSET_MAP[($pxs % 7)];
- return $widthUnits;
+ $widthUnits = 256 * ($pxs / 7);
+ $widthUnits += $UNIT_OFFSET_MAP[($pxs % 7)];
+ return $widthUnits;
}
/**
@@ -337,39 +337,39 @@ class PHPExcel_Reader_Excel2003XML extends PHPExcel_Reader_Abstract implements P
if (isset($xml->DocumentProperties[0])) {
foreach ($xml->DocumentProperties[0] as $propertyName => $propertyValue) {
switch ($propertyName) {
- case 'Title' :
+ case 'Title':
$docProps->setTitle(self::_convertStringEncoding($propertyValue, $this->_charSet));
break;
- case 'Subject' :
+ case 'Subject':
$docProps->setSubject(self::_convertStringEncoding($propertyValue, $this->_charSet));
break;
- case 'Author' :
+ case 'Author':
$docProps->setCreator(self::_convertStringEncoding($propertyValue, $this->_charSet));
break;
- case 'Created' :
+ case 'Created':
$creationDate = strtotime($propertyValue);
$docProps->setCreated($creationDate);
break;
- case 'LastAuthor' :
+ case 'LastAuthor':
$docProps->setLastModifiedBy(self::_convertStringEncoding($propertyValue, $this->_charSet));
break;
- case 'LastSaved' :
+ case 'LastSaved':
$lastSaveDate = strtotime($propertyValue);
$docProps->setModified($lastSaveDate);
break;
- case 'Company' :
+ case 'Company':
$docProps->setCompany(self::_convertStringEncoding($propertyValue, $this->_charSet));
break;
- case 'Category' :
+ case 'Category':
$docProps->setCategory(self::_convertStringEncoding($propertyValue, $this->_charSet));
break;
- case 'Manager' :
+ case 'Manager':
$docProps->setManager(self::_convertStringEncoding($propertyValue, $this->_charSet));
break;
- case 'Keywords' :
+ case 'Keywords':
$docProps->setKeywords(self::_convertStringEncoding($propertyValue, $this->_charSet));
break;
- case 'Description' :
+ case 'Description':
$docProps->setDescription(self::_convertStringEncoding($propertyValue, $this->_charSet));
break;
}
@@ -378,26 +378,26 @@ class PHPExcel_Reader_Excel2003XML extends PHPExcel_Reader_Abstract implements P
if (isset($xml->CustomDocumentProperties)) {
foreach ($xml->CustomDocumentProperties[0] as $propertyName => $propertyValue) {
$propertyAttributes = $propertyValue->attributes($namespaces['dt']);
- $propertyName = preg_replace_callback('/_x([0-9a-z]{4})_/','PHPExcel_Reader_Excel2003XML::_hex2str', $propertyName);
+ $propertyName = preg_replace_callback('/_x([0-9a-z]{4})_/', 'PHPExcel_Reader_Excel2003XML::_hex2str', $propertyName);
$propertyType = PHPExcel_DocumentProperties::PROPERTY_TYPE_UNKNOWN;
switch ((string) $propertyAttributes) {
- case 'string' :
+ case 'string':
$propertyType = PHPExcel_DocumentProperties::PROPERTY_TYPE_STRING;
$propertyValue = trim($propertyValue);
break;
- case 'boolean' :
+ case 'boolean':
$propertyType = PHPExcel_DocumentProperties::PROPERTY_TYPE_BOOLEAN;
$propertyValue = (bool) $propertyValue;
break;
- case 'integer' :
+ case 'integer':
$propertyType = PHPExcel_DocumentProperties::PROPERTY_TYPE_INTEGER;
$propertyValue = intval($propertyValue);
break;
- case 'float' :
+ case 'float':
$propertyType = PHPExcel_DocumentProperties::PROPERTY_TYPE_FLOAT;
$propertyValue = floatval($propertyValue);
break;
- case 'dateTime.tz' :
+ case 'dateTime.tz':
$propertyType = PHPExcel_DocumentProperties::PROPERTY_TYPE_DATE;
$propertyValue = strtotime(trim($propertyValue));
break;
@@ -419,46 +419,46 @@ class PHPExcel_Reader_Excel2003XML extends PHPExcel_Reader_Abstract implements P
$styleAttributes = $styleData->attributes($namespaces['ss']);
// echo $styleType.'
';
switch ($styleType) {
- case 'Alignment' :
+ case 'Alignment':
foreach ($styleAttributes as $styleAttributeKey => $styleAttributeValue) {
// echo $styleAttributeKey.' = '.$styleAttributeValue.'
';
$styleAttributeValue = (string) $styleAttributeValue;
switch ($styleAttributeKey) {
- case 'Vertical' :
+ case 'Vertical':
if (self::identifyFixedStyleValue($verticalAlignmentStyles, $styleAttributeValue)) {
$this->_styles[$styleID]['alignment']['vertical'] = $styleAttributeValue;
}
break;
- case 'Horizontal' :
+ case 'Horizontal':
if (self::identifyFixedStyleValue($horizontalAlignmentStyles, $styleAttributeValue)) {
$this->_styles[$styleID]['alignment']['horizontal'] = $styleAttributeValue;
}
break;
- case 'WrapText' :
+ case 'WrapText':
$this->_styles[$styleID]['alignment']['wrap'] = true;
break;
}
}
break;
- case 'Borders' :
+ case 'Borders':
foreach ($styleData->Border as $borderStyle) {
$borderAttributes = $borderStyle->attributes($namespaces['ss']);
$thisBorder = array();
foreach ($borderAttributes as $borderStyleKey => $borderStyleValue) {
// echo $borderStyleKey.' = '.$borderStyleValue.'
';
switch ($borderStyleKey) {
- case 'LineStyle' :
+ case 'LineStyle':
$thisBorder['style'] = PHPExcel_Style_Border::BORDER_MEDIUM;
// $thisBorder['style'] = $borderStyleValue;
break;
- case 'Weight' :
+ case 'Weight':
// $thisBorder['style'] = $borderStyleValue;
break;
- case 'Position' :
+ case 'Position':
$borderPosition = strtolower($borderStyleValue);
break;
- case 'Color' :
- $borderColour = substr($borderStyleValue,1);
+ case 'Color':
+ $borderColour = substr($borderStyleValue, 1);
$thisBorder['color']['rgb'] = $borderColour;
break;
}
@@ -470,27 +470,27 @@ class PHPExcel_Reader_Excel2003XML extends PHPExcel_Reader_Abstract implements P
}
}
break;
- case 'Font' :
+ case 'Font':
foreach ($styleAttributes as $styleAttributeKey => $styleAttributeValue) {
// echo $styleAttributeKey.' = '.$styleAttributeValue.'
';
$styleAttributeValue = (string) $styleAttributeValue;
switch ($styleAttributeKey) {
- case 'FontName' :
+ case 'FontName':
$this->_styles[$styleID]['font']['name'] = $styleAttributeValue;
break;
- case 'Size' :
+ case 'Size':
$this->_styles[$styleID]['font']['size'] = $styleAttributeValue;
break;
- case 'Color' :
- $this->_styles[$styleID]['font']['color']['rgb'] = substr($styleAttributeValue,1);
+ case 'Color':
+ $this->_styles[$styleID]['font']['color']['rgb'] = substr($styleAttributeValue, 1);
break;
- case 'Bold' :
+ case 'Bold':
$this->_styles[$styleID]['font']['bold'] = true;
break;
- case 'Italic' :
+ case 'Italic':
$this->_styles[$styleID]['font']['italic'] = true;
break;
- case 'Underline' :
+ case 'Underline':
if (self::identifyFixedStyleValue($underlineStyles, $styleAttributeValue)) {
$this->_styles[$styleID]['font']['underline'] = $styleAttributeValue;
}
@@ -498,22 +498,22 @@ class PHPExcel_Reader_Excel2003XML extends PHPExcel_Reader_Abstract implements P
}
}
break;
- case 'Interior' :
+ case 'Interior':
foreach ($styleAttributes as $styleAttributeKey => $styleAttributeValue) {
// echo $styleAttributeKey.' = '.$styleAttributeValue.'
';
switch ($styleAttributeKey) {
- case 'Color' :
- $this->_styles[$styleID]['fill']['color']['rgb'] = substr($styleAttributeValue,1);
+ case 'Color':
+ $this->_styles[$styleID]['fill']['color']['rgb'] = substr($styleAttributeValue, 1);
break;
}
}
break;
- case 'NumberFormat' :
+ case 'NumberFormat':
foreach ($styleAttributes as $styleAttributeKey => $styleAttributeValue) {
// echo $styleAttributeKey.' = '.$styleAttributeValue.'
';
$styleAttributeValue = str_replace($fromFormats, $toFormats, $styleAttributeValue);
switch ($styleAttributeValue) {
- case 'Short Date' :
+ case 'Short Date':
$styleAttributeValue = 'dd/mm/yyyy';
break;
}
@@ -522,7 +522,7 @@ class PHPExcel_Reader_Excel2003XML extends PHPExcel_Reader_Abstract implements P
}
}
break;
- case 'Protection' :
+ case 'Protection':
foreach ($styleAttributes as $styleAttributeKey => $styleAttributeValue) {
// echo $styleAttributeKey.' = '.$styleAttributeValue.'
';
}
@@ -555,7 +555,7 @@ class PHPExcel_Reader_Excel2003XML extends PHPExcel_Reader_Abstract implements P
// Use false for $updateFormulaCellReferences to prevent adjustment of worksheet references in
// formula cells... during the load, all formulae should be correct, and we're simply bringing
// the worksheet name in line with the formula, not the reverse
- $objPHPExcel->getActiveSheet()->setTitle($worksheetName,false);
+ $objPHPExcel->getActiveSheet()->setTitle($worksheetName, false);
}
$columnID = 'A';
@@ -640,26 +640,26 @@ class PHPExcel_Reader_Excel2003XML extends PHPExcel_Reader_Abstract implements P
const TYPE_INLINE = 'inlineStr';
const TYPE_ERROR = 'e';
*/
- case 'String' :
+ case 'String':
$cellValue = self::_convertStringEncoding($cellValue, $this->_charSet);
$type = PHPExcel_Cell_DataType::TYPE_STRING;
break;
- case 'Number' :
+ case 'Number':
$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;
$cellValue = (float) $cellValue;
if (floor($cellValue) == $cellValue) {
$cellValue = (integer) $cellValue;
}
break;
- case 'Boolean' :
+ case 'Boolean':
$type = PHPExcel_Cell_DataType::TYPE_BOOL;
$cellValue = ($cellValue != 0);
break;
- case 'DateTime' :
+ case 'DateTime':
$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;
$cellValue = PHPExcel_Shared_Date::PHPToExcel(strtotime($cellValue));
break;
- case 'Error' :
+ case 'Error':
$type = PHPExcel_Cell_DataType::TYPE_ERROR;
break;
}
@@ -669,15 +669,15 @@ class PHPExcel_Reader_Excel2003XML extends PHPExcel_Reader_Abstract implements P
// echo 'FORMULA
';
$type = PHPExcel_Cell_DataType::TYPE_FORMULA;
$columnNumber = PHPExcel_Cell::columnIndexFromString($columnID);
- if (substr($cellDataFormula,0,3) == 'of:') {
- $cellDataFormula = substr($cellDataFormula,3);
+ if (substr($cellDataFormula, 0, 3) == 'of:') {
+ $cellDataFormula = substr($cellDataFormula, 3);
// echo 'Before: ', $cellDataFormula,'
';
$temp = explode('"', $cellDataFormula);
$key = false;
foreach ($temp as &$value) {
// Only replace in alternate array entries (i.e. non-quoted blocks)
if ($key = !$key) {
- $value = str_replace(array('[.','.',']'),'', $value);
+ $value = str_replace(array('[.', '.', ']'), '', $value);
}
}
} else {
@@ -688,7 +688,7 @@ class PHPExcel_Reader_Excel2003XML extends PHPExcel_Reader_Abstract implements P
foreach ($temp as &$value) {
// Only replace in alternate array entries (i.e. non-quoted blocks)
if ($key = !$key) {
- preg_match_all('/(R(\[?-?\d*\]?))(C(\[?-?\d*\]?))/', $value, $cellReferences,PREG_SET_ORDER+PREG_OFFSET_CAPTURE);
+ preg_match_all('/(R(\[?-?\d*\]?))(C(\[?-?\d*\]?))/', $value, $cellReferences, PREG_SET_ORDER + PREG_OFFSET_CAPTURE);
// Reverse the matches array, otherwise all our offsets will become incorrect if we modify our way
// through the formula from left to right. Reversing means that we work right to left.through
// the formula
@@ -703,7 +703,7 @@ class PHPExcel_Reader_Excel2003XML extends PHPExcel_Reader_Abstract implements P
}
// Bracketed R references are relative to the current row
if ($rowReference{0} == '[') {
- $rowReference = $rowID + trim($rowReference,'[]');
+ $rowReference = $rowID + trim($rowReference, '[]');
}
$columnReference = $cellReference[4][0];
// Empty C reference is the current column
@@ -712,10 +712,10 @@ class PHPExcel_Reader_Excel2003XML extends PHPExcel_Reader_Abstract implements P
}
// Bracketed C references are relative to the current column
if ($columnReference{0} == '[') {
- $columnReference = $columnNumber + trim($columnReference,'[]');
+ $columnReference = $columnNumber + trim($columnReference, '[]');
}
$A1CellReference = PHPExcel_Cell::stringFromColumnIndex($columnReference-1).$rowReference;
- $value = substr_replace($value, $A1CellReference, $cellReference[0][1],strlen($cellReference[0][0]));
+ $value = substr_replace($value, $A1CellReference, $cellReference[0][1], strlen($cellReference[0][0]));
}
}
}
@@ -749,7 +749,7 @@ class PHPExcel_Reader_Excel2003XML extends PHPExcel_Reader_Abstract implements P
// echo $annotation,'
';
$annotation = strip_tags($node);
// echo 'Annotation: ', $annotation,'
';
- $objPHPExcel->getActiveSheet()->getComment($columnID.$rowID)->setAuthor(self::_convertStringEncoding($author , $this->_charSet))->setText($this->_parseRichText($annotation) );
+ $objPHPExcel->getActiveSheet()->getComment($columnID.$rowID)->setAuthor(self::_convertStringEncoding($author, $this->_charSet))->setText($this->_parseRichText($annotation));
}
if (($cellIsSet) && (isset($cell_ss['StyleID']))) {
diff --git a/Classes/PHPExcel/Reader/Excel2007.php b/Classes/PHPExcel/Reader/Excel2007.php
index 9e62a85..f59d310 100644
--- a/Classes/PHPExcel/Reader/Excel2007.php
+++ b/Classes/PHPExcel/Reader/Excel2007.php
@@ -49,25 +49,24 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
*
* @var PHPExcel_ReferenceHelper
*/
- private $_referenceHelper = NULL;
+ private $_referenceHelper = null;
/**
* PHPExcel_Reader_Excel2007_Theme instance
*
* @var PHPExcel_Reader_Excel2007_Theme
*/
- private static $_theme = NULL;
-
+ private static $_theme = null;
/**
* Create a new PHPExcel_Reader_Excel2007 instance
*/
- public function __construct() {
+ public function __construct()
+ {
$this->_readFilter = new PHPExcel_Reader_DefaultReadFilter();
$this->_referenceHelper = PHPExcel_ReferenceHelper::getInstance();
}
-
/**
* Can the current PHPExcel_Reader_IReader read the file?
*
@@ -85,7 +84,7 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
$zipClass = PHPExcel_Settings::getZipClass();
// Check if zip class exists
-// if (!class_exists($zipClass, FALSE)) {
+// if (!class_exists($zipClass, false)) {
// throw new PHPExcel_Reader_Exception($zipClass . " library is not enabled");
// }
@@ -240,39 +239,39 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
return $worksheetInfo;
}
-
- private static function _castToBool($c) {
+ private static function _castToBool($c)
+ {
// echo 'Initial Cast to Boolean', PHP_EOL;
- $value = isset($c->v) ? (string) $c->v : NULL;
+ $value = isset($c->v) ? (string) $c->v : null;
if ($value == '0') {
- return FALSE;
+ return false;
} elseif ($value == '1') {
- return TRUE;
+ return true;
} else {
return (bool)$c->v;
}
return $value;
} // function _castToBool()
-
- private static function _castToError($c) {
+ private static function _castToError($c)
+ {
// echo 'Initial Cast to Error', PHP_EOL;
- return isset($c->v) ? (string) $c->v : NULL;
+ return isset($c->v) ? (string) $c->v : null;
} // function _castToError()
-
- private static function _castToString($c) {
+ private static function _castToString($c)
+ {
// echo 'Initial Cast to String, PHP_EOL;
- return isset($c->v) ? (string) $c->v : NULL;
+ return isset($c->v) ? (string) $c->v : null;
} // function _castToString()
-
- private function _castToFormula($c, $r,&$cellDataType,&$value,&$calculatedValue,&$sharedFormulas, $castBaseType) {
+ private function _castToFormula($c, $r,&$cellDataType,&$value,&$calculatedValue,&$sharedFormulas, $castBaseType)
+ {
// echo 'Formula', PHP_EOL;
// echo '$c->f is ', $c->f, PHP_EOL;
- $cellDataType = 'f';
- $value = "={$c->f}";
- $calculatedValue = self::$castBaseType($c);
+ $cellDataType = 'f';
+ $value = "={$c->f}";
+ $calculatedValue = self::$castBaseType($c);
// Shared formula?
if (isset($c->f['t']) && strtolower((string)$c->f['t']) == 'shared') {
@@ -287,9 +286,7 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
// echo 'SETTING NEW SHARED FORMULA', PHP_EOL;
// echo 'Master is ', $r, PHP_EOL;
// echo 'Formula is ', $value, PHP_EOL;
- $sharedFormulas[$instance] = array( 'master' => $r,
- 'formula' => $value
- );
+ $sharedFormulas[$instance] = array('master' => $r, 'formula' => $value);
// echo 'New Shared Formula Array:', PHP_EOL;
// print_r($sharedFormulas);
} else {
@@ -303,11 +300,7 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
$difference[0] = PHPExcel_Cell::columnIndexFromString($current[0]) - PHPExcel_Cell::columnIndexFromString($master[0]);
$difference[1] = $current[1] - $master[1];
- $value = $this->_referenceHelper->updateFormulaReferences( $sharedFormulas[$instance]['formula'],
- 'A1',
- $difference[0],
- $difference[1]
- );
+ $value = $this->_referenceHelper->updateFormulaReferences($sharedFormulas[$instance]['formula'], 'A1', $difference[0], $difference[1]);
// echo 'Adjusted Formula is ', $value, PHP_EOL;
}
}
@@ -317,16 +310,14 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
public function _getFromZipArchive($archive, $fileName = '')
{
// Root-relative paths
- if (strpos($fileName, '//') !== false)
- {
+ if (strpos($fileName, '//') !== false) {
$fileName = substr($fileName, strpos($fileName, '//') + 1);
}
$fileName = PHPExcel_Shared_File::realpath($fileName);
// Apache POI fixes
$contents = $archive->getFromName($fileName);
- if ($contents === false)
- {
+ if ($contents === false) {
$contents = $archive->getFromName(substr($fileName, 1));
}
@@ -366,7 +357,7 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
foreach ($wbRels->Relationship as $rel) {
switch ($rel["Type"]) {
case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme":
- $themeOrderArray = array('lt1','dk1','lt2','dk2');
+ $themeOrderArray = array('lt1', 'dk1', 'lt2', 'dk2');
$themeOrderAdditional = count($themeOrderArray);
$xmlTheme = simplexml_load_string($this->securityScan($this->_getFromZipArchive($zip, "xl/{$rel['Target']}")), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions());
@@ -419,19 +410,19 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
$docProps->setKeywords((string) self::array_item($xmlCore->xpath("cp:keywords")));
$docProps->setCategory((string) self::array_item($xmlCore->xpath("cp:category")));
}
- break;
-
+ break;
case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties":
$xmlCore = simplexml_load_string($this->securityScan($this->_getFromZipArchive($zip, "{$rel['Target']}")), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions());
if (is_object($xmlCore)) {
$docProps = $excel->getProperties();
- if (isset($xmlCore->Company))
+ if (isset($xmlCore->Company)) {
$docProps->setCompany((string) $xmlCore->Company);
- if (isset($xmlCore->Manager))
+ }
+ if (isset($xmlCore->Manager)) {
$docProps->setManager((string) $xmlCore->Manager);
+ }
}
- break;
-
+ break;
case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties":
$xmlCore = simplexml_load_string($this->securityScan($this->_getFromZipArchive($zip, "{$rel['Target']}")), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions());
if (is_object($xmlCore)) {
@@ -449,14 +440,14 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
}
}
}
- break;
+ break;
//Ribbon
case "http://schemas.microsoft.com/office/2006/relationships/ui/extensibility":
$customUI = $rel['Target'];
if (!is_null($customUI)) {
$this->_readRibbon($excel, $customUI, $zip);
}
- break;
+ break;
case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument":
$dir = dirname($rel["Target"]);
$relsWorkbook = simplexml_load_string($this->securityScan($this->_getFromZipArchive($zip, "$dir/_rels/" . basename($rel["Target"]) . ".rels")), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); //~ http://schemas.openxmlformats.org/package/2006/relationships");
@@ -468,7 +459,7 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
if (isset($xmlStrings) && isset($xmlStrings->si)) {
foreach ($xmlStrings->si as $val) {
if (isset($val->t)) {
- $sharedStrings[] = PHPExcel_Shared_String::ControlCharacterOOXML2PHP( (string) $val->t );
+ $sharedStrings[] = PHPExcel_Shared_String::ControlCharacterOOXML2PHP((string) $val->t);
} elseif (isset($val->r)) {
$sharedStrings[] = $this->_parseRichText($val);
}
@@ -476,7 +467,7 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
}
$worksheets = array();
- $macros = $customUI = NULL;
+ $macros = $customUI = null;
foreach ($relsWorkbook->Relationship as $ele) {
switch ($ele['Type']) {
case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet":
@@ -496,8 +487,9 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
$excel->setHasMacros(true);
//short-circuit : not reading vbaProject.bin.rel to get Signature =>allways vbaProjectSignature.bin in 'xl' dir
$Certificate = $this->_getFromZipArchive($zip, 'xl/vbaProjectSignature.bin');
- if ($Certificate !== false)
+ if ($Certificate !== false) {
$excel->setMacrosCertificate($Certificate);
+ }
}
}
$styles = array();
@@ -508,7 +500,7 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
if ($xmlStyles && $xmlStyles->numFmts[0]) {
$numFmts = $xmlStyles->numFmts[0];
}
- if (isset($numFmts) && ($numFmts !== NULL)) {
+ if (isset($numFmts) && ($numFmts !== null)) {
$numFmts->registerXPathNamespace("sml", "http://schemas.openxmlformats.org/spreadsheetml/2006/main");
}
if (!$this->_readDataOnly && $xmlStyles) {
@@ -586,7 +578,7 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
// Conditional Styles
if ($xmlStyles->dxfs) {
foreach ($xmlStyles->dxfs->dxf as $dxf) {
- $style = new PHPExcel_Style(FALSE, TRUE);
+ $style = new PHPExcel_Style(false, true);
self::_readStyle($style, $dxf);
$dxfs[] = $style;
}
@@ -624,7 +616,6 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
$countSkippedSheets = 0; // keep track of number of skipped sheets
$mapSheetId = array(); // mapping of sheet ids from old to new
-
$charts = $chartDetails = array();
if ($xmlWorkbook->sheets) {
@@ -655,37 +646,31 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
$sharedFormulas = array();
if (isset($eleSheet["state"]) && (string) $eleSheet["state"] != '') {
- $docSheet->setSheetState( (string) $eleSheet["state"] );
+ $docSheet->setSheetState((string) $eleSheet["state"]);
}
if (isset($xmlSheet->sheetViews) && isset($xmlSheet->sheetViews->sheetView)) {
if (isset($xmlSheet->sheetViews->sheetView['zoomScale'])) {
- $docSheet->getSheetView()->setZoomScale( intval($xmlSheet->sheetViews->sheetView['zoomScale']) );
+ $docSheet->getSheetView()->setZoomScale(intval($xmlSheet->sheetViews->sheetView['zoomScale']));
}
-
if (isset($xmlSheet->sheetViews->sheetView['zoomScaleNormal'])) {
- $docSheet->getSheetView()->setZoomScaleNormal( intval($xmlSheet->sheetViews->sheetView['zoomScaleNormal']) );
+ $docSheet->getSheetView()->setZoomScaleNormal(intval($xmlSheet->sheetViews->sheetView['zoomScaleNormal']));
}
-
if (isset($xmlSheet->sheetViews->sheetView['view'])) {
$docSheet->getSheetView()->setView((string) $xmlSheet->sheetViews->sheetView['view']);
}
-
if (isset($xmlSheet->sheetViews->sheetView['showGridLines'])) {
$docSheet->setShowGridLines(self::boolean((string)$xmlSheet->sheetViews->sheetView['showGridLines']));
}
-
if (isset($xmlSheet->sheetViews->sheetView['showRowColHeaders'])) {
$docSheet->setShowRowColHeaders(self::boolean((string)$xmlSheet->sheetViews->sheetView['showRowColHeaders']));
}
-
if (isset($xmlSheet->sheetViews->sheetView['rightToLeft'])) {
$docSheet->setRightToLeft(self::boolean((string)$xmlSheet->sheetViews->sheetView['rightToLeft']));
}
-
if (isset($xmlSheet->sheetViews->sheetView->pane)) {
if (isset($xmlSheet->sheetViews->sheetView->pane['topLeftCell'])) {
- $docSheet->freezePane( (string)$xmlSheet->sheetViews->sheetView->pane['topLeftCell'] );
+ $docSheet->freezePane((string)$xmlSheet->sheetViews->sheetView->pane['topLeftCell']);
} else {
$xSplit = 0;
$ySplit = 0;
@@ -710,12 +695,11 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
$docSheet->setSelectedCells($sqref);
}
}
-
}
if (isset($xmlSheet->sheetPr) && isset($xmlSheet->sheetPr->tabColor)) {
if (isset($xmlSheet->sheetPr->tabColor['rgb'])) {
- $docSheet->getTabColor()->setARGB( (string)$xmlSheet->sheetPr->tabColor['rgb'] );
+ $docSheet->getTabColor()->setARGB((string)$xmlSheet->sheetPr->tabColor['rgb']);
}
}
if (isset($xmlSheet->sheetPr) && isset($xmlSheet->sheetPr['codeName'])) {
@@ -724,25 +708,25 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
if (isset($xmlSheet->sheetPr) && isset($xmlSheet->sheetPr->outlinePr)) {
if (isset($xmlSheet->sheetPr->outlinePr['summaryRight']) &&
!self::boolean((string) $xmlSheet->sheetPr->outlinePr['summaryRight'])) {
- $docSheet->setShowSummaryRight(FALSE);
+ $docSheet->setShowSummaryRight(false);
} else {
- $docSheet->setShowSummaryRight(TRUE);
+ $docSheet->setShowSummaryRight(true);
}
if (isset($xmlSheet->sheetPr->outlinePr['summaryBelow']) &&
!self::boolean((string) $xmlSheet->sheetPr->outlinePr['summaryBelow'])) {
- $docSheet->setShowSummaryBelow(FALSE);
+ $docSheet->setShowSummaryBelow(false);
} else {
- $docSheet->setShowSummaryBelow(TRUE);
+ $docSheet->setShowSummaryBelow(true);
}
}
if (isset($xmlSheet->sheetPr) && isset($xmlSheet->sheetPr->pageSetUpPr)) {
if (isset($xmlSheet->sheetPr->pageSetUpPr['fitToPage']) &&
!self::boolean((string) $xmlSheet->sheetPr->pageSetUpPr['fitToPage'])) {
- $docSheet->getPageSetup()->setFitToPage(FALSE);
+ $docSheet->getPageSetup()->setFitToPage(false);
} else {
- $docSheet->getPageSetup()->setFitToPage(TRUE);
+ $docSheet->getPageSetup()->setFitToPage(true);
}
}
@@ -750,10 +734,10 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
if (isset($xmlSheet->sheetFormatPr['customHeight']) &&
self::boolean((string) $xmlSheet->sheetFormatPr['customHeight']) &&
isset($xmlSheet->sheetFormatPr['defaultRowHeight'])) {
- $docSheet->getDefaultRowDimension()->setRowHeight( (float)$xmlSheet->sheetFormatPr['defaultRowHeight'] );
+ $docSheet->getDefaultRowDimension()->setRowHeight((float)$xmlSheet->sheetFormatPr['defaultRowHeight']);
}
if (isset($xmlSheet->sheetFormatPr['defaultColWidth'])) {
- $docSheet->getDefaultColumnDimension()->setWidth( (float)$xmlSheet->sheetFormatPr['defaultColWidth'] );
+ $docSheet->getDefaultColumnDimension()->setWidth((float)$xmlSheet->sheetFormatPr['defaultColWidth']);
}
if (isset($xmlSheet->sheetFormatPr['zeroHeight']) &&
((string)$xmlSheet->sheetFormatPr['zeroHeight'] == '1')) {
@@ -768,14 +752,14 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
$docSheet->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($i))->setXfIndex(intval($col["style"]));
}
if (self::boolean($col["bestFit"])) {
- //$docSheet->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($i))->setAutoSize(TRUE);
+ //$docSheet->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($i))->setAutoSize(true);
}
if (self::boolean($col["hidden"])) {
- // echo PHPExcel_Cell::stringFromColumnIndex($i),': HIDDEN COLUMN',PHP_EOL;
- $docSheet->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($i))->setVisible(FALSE);
+ // echo PHPExcel_Cell::stringFromColumnIndex($i), ': HIDDEN COLUMN',PHP_EOL;
+ $docSheet->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($i))->setVisible(false);
}
if (self::boolean($col["collapsed"])) {
- $docSheet->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($i))->setCollapsed(TRUE);
+ $docSheet->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($i))->setCollapsed(true);
}
if ($col["outlineLevel"] > 0) {
$docSheet->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($i))->setOutlineLevel(intval($col["outlineLevel"]));
@@ -791,18 +775,16 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
if (isset($xmlSheet->printOptions) && !$this->_readDataOnly) {
if (self::boolean((string) $xmlSheet->printOptions['gridLinesSet'])) {
- $docSheet->setShowGridlines(TRUE);
+ $docSheet->setShowGridlines(true);
}
-
if (self::boolean((string) $xmlSheet->printOptions['gridLines'])) {
- $docSheet->setPrintGridlines(TRUE);
+ $docSheet->setPrintGridlines(true);
}
-
if (self::boolean((string) $xmlSheet->printOptions['horizontalCentered'])) {
- $docSheet->getPageSetup()->setHorizontalCentered(TRUE);
+ $docSheet->getPageSetup()->setHorizontalCentered(true);
}
if (self::boolean((string) $xmlSheet->printOptions['verticalCentered'])) {
- $docSheet->getPageSetup()->setVerticalCentered(TRUE);
+ $docSheet->getPageSetup()->setVerticalCentered(true);
}
}
@@ -812,10 +794,10 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
$docSheet->getRowDimension(intval($row["r"]))->setRowHeight(floatval($row["ht"]));
}
if (self::boolean($row["hidden"]) && !$this->_readDataOnly) {
- $docSheet->getRowDimension(intval($row["r"]))->setVisible(FALSE);
+ $docSheet->getRowDimension(intval($row["r"]))->setVisible(false);
}
if (self::boolean($row["collapsed"])) {
- $docSheet->getRowDimension(intval($row["r"]))->setCollapsed(TRUE);
+ $docSheet->getRowDimension(intval($row["r"]))->setCollapsed(true);
}
if ($row["outlineLevel"] > 0) {
$docSheet->getRowDimension(intval($row["r"]))->setOutlineLevel(intval($row["outlineLevel"]));
@@ -831,7 +813,7 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
$calculatedValue = null;
// Read cell?
- if ($this->getReadFilter() !== NULL) {
+ if ($this->getReadFilter() !== null) {
$coordinates = PHPExcel_Cell::coordinateFromString($r);
if (!$this->getReadFilter()->readCell($coordinates[0], $coordinates[1], $docSheet->getTitle())) {
@@ -857,7 +839,6 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
} else {
$value = '';
}
-
break;
case "b":
// echo 'Boolean', PHP_EOL;
@@ -865,7 +846,7 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
$value = self::_castToBool($c);
} else {
// Formula
- $this->_castToFormula($c, $r, $cellDataType, $value, $calculatedValue, $sharedFormulas,'_castToBool');
+ $this->_castToFormula($c, $r, $cellDataType, $value, $calculatedValue, $sharedFormulas, '_castToBool');
if (isset($c->f['t'])) {
$att = array();
$att = $c->f;
@@ -877,7 +858,6 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
case "inlineStr":
// echo 'Inline String', PHP_EOL;
$value = $this->_parseRichText($c->is);
-
break;
case "e":
// echo 'Error', PHP_EOL;
@@ -885,12 +865,10 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
$value = self::_castToError($c);
} else {
// Formula
- $this->_castToFormula($c, $r, $cellDataType, $value, $calculatedValue, $sharedFormulas,'_castToError');
+ $this->_castToFormula($c, $r, $cellDataType, $value, $calculatedValue, $sharedFormulas, '_castToError');
// echo '$calculatedValue = ', $calculatedValue, PHP_EOL;
}
-
break;
-
default:
// echo 'Default', PHP_EOL;
if (!isset($c->f)) {
@@ -899,10 +877,9 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
} else {
// echo 'Treat as Formula', PHP_EOL;
// Formula
- $this->_castToFormula($c, $r, $cellDataType, $value, $calculatedValue, $sharedFormulas,'_castToString');
+ $this->_castToFormula($c, $r, $cellDataType, $value, $calculatedValue, $sharedFormulas, '_castToString');
// echo '$calculatedValue = ', $calculatedValue, PHP_EOL;
}
-
break;
}
// echo 'Value is ', $value, PHP_EOL;
@@ -926,7 +903,7 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
} else {
$cell->setValue($value);
}
- if ($calculatedValue !== NULL) {
+ if ($calculatedValue !== null) {
$cell->setCalculatedValue($calculatedValue);
}
@@ -997,7 +974,7 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
}
if (!$this->_readDataOnly && $xmlSheet && $xmlSheet->sheetProtection) {
- $docSheet->getProtection()->setPassword((string) $xmlSheet->sheetProtection["password"], TRUE);
+ $docSheet->getProtection()->setPassword((string) $xmlSheet->sheetProtection["password"], true);
if ($xmlSheet->protectedRanges->protectedRange) {
foreach ($xmlSheet->protectedRanges->protectedRange as $protectedRange) {
$docSheet->protectCells((string) $protectedRange["sqref"], (string) $protectedRange["password"], true);
@@ -1019,7 +996,7 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
$filters = $filterColumn->filters;
if ((isset($filters["blank"])) && ($filters["blank"] == 1)) {
$column->createRule()->setRule(
- NULL, // Operator is undefined, but always treated as EQUAL
+ null, // Operator is undefined, but always treated as EQUAL
''
)
->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_FILTER);
@@ -1028,7 +1005,7 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
// Entries can be either filter elements
foreach ($filters->filter as $filterRule) {
$column->createRule()->setRule(
- NULL, // Operator is undefined, but always treated as EQUAL
+ null, // Operator is undefined, but always treated as EQUAL
(string) $filterRule["val"]
)
->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_FILTER);
@@ -1036,7 +1013,7 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
// Or Date Group elements
foreach ($filters->dateGroupItem as $dateGroupItem) {
$column->createRule()->setRule(
- NULL, // Operator is undefined, but always treated as EQUAL
+ null, // Operator is undefined, but always treated as EQUAL
array(
'year' => (string) $dateGroupItem["year"],
'month' => (string) $dateGroupItem["month"],
@@ -1073,7 +1050,7 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
// We should only ever have one dynamic filter
foreach ($filterColumn->dynamicFilter as $filterRule) {
$column->createRule()->setRule(
- NULL, // Operator is undefined, but always treated as EQUAL
+ null, // Operator is undefined, but always treated as EQUAL
(string) $filterRule["val"],
(string) $filterRule["type"]
)
@@ -1112,7 +1089,7 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
if ($xmlSheet && $xmlSheet->mergeCells && $xmlSheet->mergeCells->mergeCell && !$this->_readDataOnly) {
foreach ($xmlSheet->mergeCells->mergeCell as $mergeCell) {
$mergeRef = (string) $mergeCell["ref"];
- if (strpos($mergeRef,':') !== FALSE) {
+ if (strpos($mergeRef, ':') !== false) {
$docSheet->mergeCells((string) $mergeCell["ref"]);
}
}
@@ -1138,13 +1115,13 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
$docPageSetup->setPaperSize(intval($xmlSheet->pageSetup["paperSize"]));
}
if (isset($xmlSheet->pageSetup["scale"])) {
- $docPageSetup->setScale(intval($xmlSheet->pageSetup["scale"]), FALSE);
+ $docPageSetup->setScale(intval($xmlSheet->pageSetup["scale"]), false);
}
if (isset($xmlSheet->pageSetup["fitToHeight"]) && intval($xmlSheet->pageSetup["fitToHeight"]) >= 0) {
- $docPageSetup->setFitToHeight(intval($xmlSheet->pageSetup["fitToHeight"]), FALSE);
+ $docPageSetup->setFitToHeight(intval($xmlSheet->pageSetup["fitToHeight"]), false);
}
if (isset($xmlSheet->pageSetup["fitToWidth"]) && intval($xmlSheet->pageSetup["fitToWidth"]) >= 0) {
- $docPageSetup->setFitToWidth(intval($xmlSheet->pageSetup["fitToWidth"]), FALSE);
+ $docPageSetup->setFitToWidth(intval($xmlSheet->pageSetup["fitToWidth"]), false);
}
if (isset($xmlSheet->pageSetup["firstPageNumber"]) && isset($xmlSheet->pageSetup["useFirstPageNumber"]) &&
self::boolean((string) $xmlSheet->pageSetup["useFirstPageNumber"])) {
@@ -1157,27 +1134,27 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
if (isset($xmlSheet->headerFooter["differentOddEven"]) &&
self::boolean((string)$xmlSheet->headerFooter["differentOddEven"])) {
- $docHeaderFooter->setDifferentOddEven(TRUE);
+ $docHeaderFooter->setDifferentOddEven(true);
} else {
- $docHeaderFooter->setDifferentOddEven(FALSE);
+ $docHeaderFooter->setDifferentOddEven(false);
}
if (isset($xmlSheet->headerFooter["differentFirst"]) &&
self::boolean((string)$xmlSheet->headerFooter["differentFirst"])) {
- $docHeaderFooter->setDifferentFirst(TRUE);
+ $docHeaderFooter->setDifferentFirst(true);
} else {
- $docHeaderFooter->setDifferentFirst(FALSE);
+ $docHeaderFooter->setDifferentFirst(false);
}
if (isset($xmlSheet->headerFooter["scaleWithDoc"]) &&
!self::boolean((string)$xmlSheet->headerFooter["scaleWithDoc"])) {
- $docHeaderFooter->setScaleWithDocument(FALSE);
+ $docHeaderFooter->setScaleWithDocument(false);
} else {
- $docHeaderFooter->setScaleWithDocument(TRUE);
+ $docHeaderFooter->setScaleWithDocument(true);
}
if (isset($xmlSheet->headerFooter["alignWithMargins"]) &&
!self::boolean((string)$xmlSheet->headerFooter["alignWithMargins"])) {
- $docHeaderFooter->setAlignWithMargins(FALSE);
+ $docHeaderFooter->setAlignWithMargins(false);
} else {
- $docHeaderFooter->setAlignWithMargins(TRUE);
+ $docHeaderFooter->setAlignWithMargins(true);
}
$docHeaderFooter->setOddHeader((string) $xmlSheet->headerFooter->oddHeader);
@@ -1254,7 +1231,7 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
$linkRel = $hyperlink->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships');
foreach (PHPExcel_Cell::extractAllCellReferencesInRange($hyperlink['ref']) as $cellReference) {
- $cell = $docSheet->getCell( $cellReference );
+ $cell = $docSheet->getCell($cellReference);
if (isset($linkRel['id'])) {
$hyperlinkUrl = $hyperlinks[ (string)$linkRel['id'] ];
if (isset($hyperlink['location'])) {
@@ -1262,12 +1239,12 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
}
$cell->getHyperlink()->setUrl($hyperlinkUrl);
} elseif (isset($hyperlink['location'])) {
- $cell->getHyperlink()->setUrl( 'sheet://' . (string)$hyperlink['location'] );
+ $cell->getHyperlink()->setUrl('sheet://' . (string)$hyperlink['location']);
}
// Tooltip
if (isset($hyperlink['tooltip'])) {
- $cell->getHyperlink()->setTooltip( (string)$hyperlink['tooltip'] );
+ $cell->getHyperlink()->setTooltip((string)$hyperlink['tooltip']);
}
}
}
@@ -1308,8 +1285,8 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
// Loop through contents
foreach ($commentsFile->commentList->comment as $comment) {
if (!empty($comment['authorId']))
- $docSheet->getComment( (string)$comment['ref'] )->setAuthor( $authors[(string)$comment['authorId']] );
- $docSheet->getComment( (string)$comment['ref'] )->setText( $this->_parseRichText($comment->text) );
+ $docSheet->getComment((string)$comment['ref'])->setAuthor($authors[(string)$comment['authorId']]);
+ $docSheet->getComment((string)$comment['ref'])->setText($this->_parseRichText($comment->text));
}
}
@@ -1326,7 +1303,7 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
if (isset($shape['style'])) {
$style = (string)$shape['style'];
- $fillColor = strtoupper( substr( (string)$shape['fillcolor'], 1 ) );
+ $fillColor = strtoupper(substr((string)$shape['fillcolor'], 1));
$column = null;
$row = null;
@@ -1334,31 +1311,44 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
if (is_array($clientData) && !empty($clientData)) {
$clientData = $clientData[0];
- if ( isset($clientData['ObjectType']) && (string)$clientData['ObjectType'] == 'Note' ) {
+ if (isset($clientData['ObjectType']) && (string)$clientData['ObjectType'] == 'Note') {
$temp = $clientData->xpath('.//x:Row');
- if (is_array($temp)) $row = $temp[0];
+ if (is_array($temp)) {
+ $row = $temp[0];
+ }
$temp = $clientData->xpath('.//x:Column');
- if (is_array($temp)) $column = $temp[0];
+ if (is_array($temp)) {
+ $column = $temp[0];
+ }
}
}
- if (($column !== NULL) && ($row !== NULL)) {
+ if (($column !== null) && ($row !== null)) {
// Set comment properties
$comment = $docSheet->getCommentByColumnAndRow((string) $column, $row + 1);
- $comment->getFillColor()->setRGB( $fillColor );
+ $comment->getFillColor()->setRGB($fillColor);
// Parse style
$styleArray = explode(';', str_replace(' ', '', $style));
foreach ($styleArray as $stylePair) {
$stylePair = explode(':', $stylePair);
- if ($stylePair[0] == 'margin-left') $comment->setMarginLeft($stylePair[1]);
- if ($stylePair[0] == 'margin-top') $comment->setMarginTop($stylePair[1]);
- if ($stylePair[0] == 'width') $comment->setWidth($stylePair[1]);
- if ($stylePair[0] == 'height') $comment->setHeight($stylePair[1]);
- if ($stylePair[0] == 'visibility') $comment->setVisible( $stylePair[1] == 'visible' );
-
+ if ($stylePair[0] == 'margin-left') {
+ $comment->setMarginLeft($stylePair[1]);
+ }
+ if ($stylePair[0] == 'margin-top') {
+ $comment->setMarginTop($stylePair[1]);
+ }
+ if ($stylePair[0] == 'width') {
+ $comment->setWidth($stylePair[1]);
+ }
+ if ($stylePair[0] == 'height') {
+ $comment->setHeight($stylePair[1]);
+ }
+ if ($stylePair[0] == 'visibility') {
+ $comment->setVisible($stylePair[1] == 'visible');
+ }
}
}
}
@@ -1400,11 +1390,11 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
$imageData = $imageData[$idx];
$imageData = $imageData->attributes('urn:schemas-microsoft-com:office:office');
- $style = self::toCSSArray( (string)$shape['style'] );
+ $style = self::toCSSArray((string)$shape['style']);
$hfImages[ (string)$shape['id'] ] = new PHPExcel_Worksheet_HeaderFooterDrawing();
if (isset($imageData['title'])) {
- $hfImages[ (string)$shape['id'] ]->setName( (string)$imageData['title'] );
+ $hfImages[ (string)$shape['id'] ]->setName((string)$imageData['title']);
}
$hfImages[ (string)$shape['id'] ]->setPath("zip://".PHPExcel_Shared_File::realpath($pFilename)."#" . $drawings[(string)$imageData['relid']], false);
@@ -1446,9 +1436,10 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
$images[(string) $ele["Id"]] = self::dir_add($fileDrawing, $ele["Target"]);
} elseif ($ele["Type"] == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart") {
if ($this->_includeCharts) {
- $charts[self::dir_add($fileDrawing, $ele["Target"])] = array('id' => (string) $ele["Id"],
- 'sheet' => $docSheet->getTitle()
- );
+ $charts[self::dir_add($fileDrawing, $ele["Target"])] = array(
+ 'id' => (string) $ele["Id"],
+ 'sheet' => $docSheet->getTitle()
+ );
}
}
}
@@ -1537,19 +1528,18 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
$chartRef = $graphic->graphicData->children("http://schemas.openxmlformats.org/drawingml/2006/chart")->chart;
$thisChart = (string) $chartRef->attributes("http://schemas.openxmlformats.org/officeDocument/2006/relationships");
- $chartDetails[$docSheet->getTitle().'!'.$thisChart] =
- array( 'fromCoordinate' => $fromCoordinate,
- 'fromOffsetX' => $fromOffsetX,
- 'fromOffsetY' => $fromOffsetY,
- 'toCoordinate' => $toCoordinate,
- 'toOffsetX' => $toOffsetX,
- 'toOffsetY' => $toOffsetY,
- 'worksheetTitle' => $docSheet->getTitle()
- );
+ $chartDetails[$docSheet->getTitle().'!'.$thisChart] = array(
+ 'fromCoordinate' => $fromCoordinate,
+ 'fromOffsetX' => $fromOffsetX,
+ 'fromOffsetY' => $fromOffsetY,
+ 'toCoordinate' => $toCoordinate,
+ 'toOffsetX' => $toOffsetX,
+ 'toOffsetY' => $toOffsetY,
+ 'worksheetTitle' => $docSheet->getTitle()
+ );
}
}
}
-
}
}
}
@@ -1560,14 +1550,14 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
// Extract range
$extractedRange = (string)$definedName;
$extractedRange = preg_replace('/\'(\w+)\'\!/', '', $extractedRange);
- if (($spos = strpos($extractedRange,'!')) !== false) {
+ if (($spos = strpos($extractedRange, '!')) !== false) {
$extractedRange = substr($extractedRange,0, $spos).str_replace('$', '', substr($extractedRange, $spos));
} else {
$extractedRange = str_replace('$', '', $extractedRange);
}
// Valid range?
- if (stripos((string)$definedName, '#REF!') !== FALSE || $extractedRange == '') {
+ if (stripos((string)$definedName, '#REF!') !== false || $extractedRange == '') {
continue;
}
@@ -1575,7 +1565,6 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
if ((string)$definedName['localSheetId'] != '' && (string)$definedName['localSheetId'] == $sheetId) {
// Switch on type
switch ((string)$definedName['name']) {
-
case '_xlnm._FilterDatabase':
if ((string)$definedName['hidden'] !== '1') {
$extractedRange = explode(',', $extractedRange);
@@ -1587,7 +1576,6 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
}
}
break;
-
case '_xlnm.Print_Titles':
// Split $extractedRange
$extractedRange = explode(',', $extractedRange);
@@ -1607,14 +1595,13 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
}
}
break;
-
case '_xlnm.Print_Area':
$rangeSets = explode(',', $extractedRange); // FIXME: what if sheetname contains comma?
$newRangeSets = array();
foreach ($rangeSets as $rangeSet) {
$range = explode('!', $rangeSet); // FIXME: what if sheetname contains exclamation mark?
$rangeSet = isset($range[1]) ? $range[1] : $range[0];
- if (strpos($rangeSet, ':') === FALSE) {
+ if (strpos($rangeSet, ':') === false) {
$rangeSet = $rangeSet . ':' . $rangeSet;
}
$newRangeSets[] = str_replace('$', '', $rangeSet);
@@ -1639,7 +1626,7 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
// Extract range
$extractedRange = (string)$definedName;
$extractedRange = preg_replace('/\'(\w+)\'\!/', '', $extractedRange);
- if (($spos = strpos($extractedRange,'!')) !== false) {
+ if (($spos = strpos($extractedRange, '!')) !== false) {
$extractedRange = substr($extractedRange,0, $spos).str_replace('$', '', substr($extractedRange, $spos));
} else {
$extractedRange = str_replace('$', '', $extractedRange);
@@ -1655,12 +1642,10 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
// Local defined name
// Switch on type
switch ((string)$definedName['name']) {
-
case '_xlnm._FilterDatabase':
case '_xlnm.Print_Titles':
case '_xlnm.Print_Area':
break;
-
default:
if ($mapSheetId[(integer) $definedName['localSheetId']] !== null) {
$range = explode('!', (string)$definedName);
@@ -1670,7 +1655,7 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
if ($worksheet = $docSheet->getParent()->getSheetByName($range[0])) {
$extractedRange = str_replace('$', '', $range[1]);
$scope = $docSheet->getParent()->getSheet($mapSheetId[(integer) $definedName['localSheetId']]);
- $excel->addNamedRange( new PHPExcel_NamedRange((string)$definedName['name'], $worksheet, $extractedRange, true, $scope) );
+ $excel->addNamedRange(new PHPExcel_NamedRange((string)$definedName['name'], $worksheet, $extractedRange, true, $scope));
}
}
}
@@ -1680,9 +1665,9 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
// "Global" definedNames
$locatedSheet = null;
$extractedSheetName = '';
- if (strpos( (string)$definedName, '!' ) !== false) {
+ if (strpos((string)$definedName, '!') !== false) {
// Extract sheet name
- $extractedSheetName = PHPExcel_Worksheet::extractSheetTitle( (string)$definedName, true );
+ $extractedSheetName = PHPExcel_Worksheet::extractSheetTitle((string)$definedName, true);
$extractedSheetName = $extractedSheetName[0];
// Locate sheet
@@ -1693,8 +1678,8 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
$extractedRange = isset($range[1]) ? $range[1] : $range[0];
}
- if ($locatedSheet !== NULL) {
- $excel->addNamedRange( new PHPExcel_NamedRange((string)$definedName['name'], $locatedSheet, $extractedRange, false) );
+ if ($locatedSheet !== null) {
+ $excel->addNamedRange(new PHPExcel_NamedRange((string)$definedName['name'], $locatedSheet, $extractedRange, false));
}
}
}
@@ -1717,39 +1702,31 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
}
break;
}
-
}
-
if (!$this->_readDataOnly) {
$contentTypes = simplexml_load_string($this->securityScan($this->_getFromZipArchive($zip, "[Content_Types].xml")), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions());
foreach ($contentTypes->Override as $contentType) {
switch ($contentType["ContentType"]) {
case "application/vnd.openxmlformats-officedocument.drawingml.chart+xml":
if ($this->_includeCharts) {
- $chartEntryRef = ltrim($contentType['PartName'],'/');
+ $chartEntryRef = ltrim($contentType['PartName'], '/');
$chartElements = simplexml_load_string($this->securityScan($this->_getFromZipArchive($zip, $chartEntryRef)), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions());
- $objChart = PHPExcel_Reader_Excel2007_Chart::readChart($chartElements,basename($chartEntryRef,'.xml'));
+ $objChart = PHPExcel_Reader_Excel2007_Chart::readChart($chartElements,basename($chartEntryRef, '.xml'));
-// echo 'Chart ', $chartEntryRef,'
';
+// echo 'Chart ', $chartEntryRef, '
';
// var_dump($charts[$chartEntryRef]);
//
if (isset($charts[$chartEntryRef])) {
$chartPositionRef = $charts[$chartEntryRef]['sheet'].'!'.$charts[$chartEntryRef]['id'];
-// echo 'Position Ref ', $chartPositionRef,'
';
+// echo 'Position Ref ', $chartPositionRef, '
';
if (isset($chartDetails[$chartPositionRef])) {
// var_dump($chartDetails[$chartPositionRef]);
$excel->getSheetByName($charts[$chartEntryRef]['sheet'])->addChart($objChart);
$objChart->setWorksheet($excel->getSheetByName($charts[$chartEntryRef]['sheet']));
- $objChart->setTopLeftPosition( $chartDetails[$chartPositionRef]['fromCoordinate'],
- $chartDetails[$chartPositionRef]['fromOffsetX'],
- $chartDetails[$chartPositionRef]['fromOffsetY']
- );
- $objChart->setBottomRightPosition( $chartDetails[$chartPositionRef]['toCoordinate'],
- $chartDetails[$chartPositionRef]['toOffsetX'],
- $chartDetails[$chartPositionRef]['toOffsetY']
- );
+ $objChart->setTopLeftPosition($chartDetails[$chartPositionRef]['fromCoordinate'], $chartDetails[$chartPositionRef]['fromOffsetX'], $chartDetails[$chartPositionRef]['fromOffsetY']);
+ $objChart->setBottomRightPosition($chartDetails[$chartPositionRef]['toCoordinate'], $chartDetails[$chartPositionRef]['toOffsetX'], $chartDetails[$chartPositionRef]['toOffsetY']);
}
}
}
@@ -1762,14 +1739,14 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
return $excel;
}
-
- private static function _readColor($color, $background=FALSE) {
+ private static function _readColor($color, $background = false)
+ {
if (isset($color["rgb"])) {
return (string)$color["rgb"];
} else if (isset($color["indexed"])) {
return PHPExcel_Style_Color::indexedColor($color["indexed"]-7, $background)->getARGB();
} else if (isset($color["theme"])) {
- if (self::$_theme !== NULL) {
+ if (self::$_theme !== null) {
$returnColour = self::$_theme->getColourByIndex((int)$color["theme"]);
if (isset($color["tint"])) {
$tintAdjust = (float) $color["tint"];
@@ -1785,8 +1762,8 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
return 'FF000000';
}
-
- private static function _readStyle($docStyle, $style) {
+ private static function _readStyle($docStyle, $style)
+ {
// format code
// if (isset($style->numFmt)) {
// if (isset($style->numFmt['formatCode'])) {
@@ -1837,8 +1814,8 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
}
$docStyle->getFill()->setRotation(floatval($gradientFill["degree"]));
$gradientFill->registerXPathNamespace("sml", "http://schemas.openxmlformats.org/spreadsheetml/2006/main");
- $docStyle->getFill()->getStartColor()->setARGB(self::_readColor( self::array_item($gradientFill->xpath("sml:stop[@position=0]"))->color) );
- $docStyle->getFill()->getEndColor()->setARGB(self::_readColor( self::array_item($gradientFill->xpath("sml:stop[@position=1]"))->color) );
+ $docStyle->getFill()->getStartColor()->setARGB(self::_readColor(self::array_item($gradientFill->xpath("sml:stop[@position=0]"))->color));
+ $docStyle->getFill()->getEndColor()->setARGB(self::_readColor(self::array_item($gradientFill->xpath("sml:stop[@position=1]"))->color));
} elseif ($style->fill->patternFill) {
$patternType = (string)$style->fill->patternFill["patternType"] != '' ? (string)$style->fill->patternFill["patternType"] : 'solid';
$docStyle->getFill()->setFillType($patternType);
@@ -1888,8 +1865,8 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
$docStyle->getAlignment()->setTextRotation(intval($textRotation));
$docStyle->getAlignment()->setWrapText(self::boolean((string) $style->alignment["wrapText"]));
$docStyle->getAlignment()->setShrinkToFit(self::boolean((string) $style->alignment["shrinkToFit"]));
- $docStyle->getAlignment()->setIndent( intval((string)$style->alignment["indent"]) > 0 ? intval((string)$style->alignment["indent"]) : 0 );
- $docStyle->getAlignment()->setReadorder( intval((string)$style->alignment["readingOrder"]) > 0 ? intval((string)$style->alignment["readingOrder"]) : 0 );
+ $docStyle->getAlignment()->setIndent(intval((string)$style->alignment["indent"]) > 0 ? intval((string)$style->alignment["indent"]) : 0);
+ $docStyle->getAlignment()->setReadorder(intval((string)$style->alignment["readingOrder"]) > 0 ? intval((string)$style->alignment["readingOrder"]) : 0);
}
// protection
@@ -1917,8 +1894,8 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
}
}
-
- private static function _readBorder($docBorder, $eleBorder) {
+ private static function _readBorder($docBorder, $eleBorder)
+ {
if (isset($eleBorder["style"])) {
$docBorder->setBorderStyle((string) $eleBorder["style"]);
}
@@ -1927,66 +1904,59 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
}
}
-
- private function _parseRichText($is = null) {
+ private function _parseRichText($is = null)
+ {
$value = new PHPExcel_RichText();
if (isset($is->t)) {
- $value->createText( PHPExcel_Shared_String::ControlCharacterOOXML2PHP( (string) $is->t ) );
+ $value->createText(PHPExcel_Shared_String::ControlCharacterOOXML2PHP((string) $is->t));
} else {
if (is_object($is->r)) {
- foreach ($is->r as $run) {
- if (!isset($run->rPr)) {
- $objText = $value->createText( PHPExcel_Shared_String::ControlCharacterOOXML2PHP( (string) $run->t ) );
+ foreach ($is->r as $run) {
+ if (!isset($run->rPr)) {
+ $objText = $value->createText(PHPExcel_Shared_String::ControlCharacterOOXML2PHP((string) $run->t));
- } else {
- $objText = $value->createTextRun( PHPExcel_Shared_String::ControlCharacterOOXML2PHP( (string) $run->t ) );
+ } else {
+ $objText = $value->createTextRun(PHPExcel_Shared_String::ControlCharacterOOXML2PHP((string) $run->t));
- if (isset($run->rPr->rFont["val"])) {
- $objText->getFont()->setName((string) $run->rPr->rFont["val"]);
- }
-
- if (isset($run->rPr->sz["val"])) {
- $objText->getFont()->setSize((string) $run->rPr->sz["val"]);
- }
-
- if (isset($run->rPr->color)) {
- $objText->getFont()->setColor( new PHPExcel_Style_Color( self::_readColor($run->rPr->color) ) );
- }
-
- if ((isset($run->rPr->b["val"]) && self::boolean((string) $run->rPr->b["val"])) ||
- (isset($run->rPr->b) && !isset($run->rPr->b["val"]))) {
- $objText->getFont()->setBold(TRUE);
- }
-
- if ((isset($run->rPr->i["val"]) && self::boolean((string) $run->rPr->i["val"])) ||
- (isset($run->rPr->i) && !isset($run->rPr->i["val"]))) {
- $objText->getFont()->setItalic(TRUE);
- }
-
- if (isset($run->rPr->vertAlign) && isset($run->rPr->vertAlign["val"])) {
- $vertAlign = strtolower((string)$run->rPr->vertAlign["val"]);
- if ($vertAlign == 'superscript') {
- $objText->getFont()->setSuperScript(TRUE);
+ if (isset($run->rPr->rFont["val"])) {
+ $objText->getFont()->setName((string) $run->rPr->rFont["val"]);
}
- if ($vertAlign == 'subscript') {
- $objText->getFont()->setSubScript(TRUE);
+ if (isset($run->rPr->sz["val"])) {
+ $objText->getFont()->setSize((string) $run->rPr->sz["val"]);
+ }
+ if (isset($run->rPr->color)) {
+ $objText->getFont()->setColor(new PHPExcel_Style_Color(self::_readColor($run->rPr->color)));
+ }
+ if ((isset($run->rPr->b["val"]) && self::boolean((string) $run->rPr->b["val"])) ||
+ (isset($run->rPr->b) && !isset($run->rPr->b["val"]))) {
+ $objText->getFont()->setBold(true);
+ }
+ if ((isset($run->rPr->i["val"]) && self::boolean((string) $run->rPr->i["val"])) ||
+ (isset($run->rPr->i) && !isset($run->rPr->i["val"]))) {
+ $objText->getFont()->setItalic(true);
+ }
+ if (isset($run->rPr->vertAlign) && isset($run->rPr->vertAlign["val"])) {
+ $vertAlign = strtolower((string)$run->rPr->vertAlign["val"]);
+ if ($vertAlign == 'superscript') {
+ $objText->getFont()->setSuperScript(true);
+ }
+ if ($vertAlign == 'subscript') {
+ $objText->getFont()->setSubScript(true);
+ }
+ }
+ if (isset($run->rPr->u) && !isset($run->rPr->u["val"])) {
+ $objText->getFont()->setUnderline(PHPExcel_Style_Font::UNDERLINE_SINGLE);
+ } else if (isset($run->rPr->u) && isset($run->rPr->u["val"])) {
+ $objText->getFont()->setUnderline((string)$run->rPr->u["val"]);
+ }
+ if ((isset($run->rPr->strike["val"]) && self::boolean((string) $run->rPr->strike["val"])) ||
+ (isset($run->rPr->strike) && !isset($run->rPr->strike["val"]))) {
+ $objText->getFont()->setStrikethrough(true);
}
- }
-
- if (isset($run->rPr->u) && !isset($run->rPr->u["val"])) {
- $objText->getFont()->setUnderline(PHPExcel_Style_Font::UNDERLINE_SINGLE);
- } else if (isset($run->rPr->u) && isset($run->rPr->u["val"])) {
- $objText->getFont()->setUnderline((string)$run->rPr->u["val"]);
- }
-
- if ((isset($run->rPr->strike["val"]) && self::boolean((string) $run->rPr->strike["val"])) ||
- (isset($run->rPr->strike) && !isset($run->rPr->strike["val"]))) {
- $objText->getFont()->setStrikethrough(TRUE);
}
}
}
- }
}
return $value;
@@ -2022,25 +1992,26 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
if (count($customUIImagesNames) > 0 && count($customUIImagesBinaries) > 0) {
$excel->setRibbonBinObjects($customUIImagesNames, $customUIImagesBinaries);
} else {
- $excel->setRibbonBinObjects(NULL);
+ $excel->setRibbonBinObjects(null);
}
} else {
- $excel->setRibbonXMLData(NULL);
- $excel->setRibbonBinObjects(NULL);
+ $excel->setRibbonXMLData(null);
+ $excel->setRibbonBinObjects(null);
}
}
- private static function array_item($array, $key = 0) {
+ private static function array_item($array, $key = 0)
+ {
return (isset($array[$key]) ? $array[$key] : null);
}
-
- private static function dir_add($base, $add) {
+ private static function dir_add($base, $add)
+ {
return preg_replace('~[^/]+/\.\./~', '', dirname($base) . "/$add");
}
-
- private static function toCSSArray($style) {
+ private static function toCSSArray($style)
+ {
$style = str_replace(array("\r","\n"), "", $style);
$temp = explode(';', $style);
@@ -2070,7 +2041,7 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
return $style;
}
- private static function boolean($value = NULL)
+ private static function boolean($value = null)
{
if (is_object($value)) {
$value = (string) $value;
diff --git a/Classes/PHPExcel/Reader/Excel5.php b/Classes/PHPExcel/Reader/Excel5.php
index 9b27b96..15fa11b 100644
--- a/Classes/PHPExcel/Reader/Excel5.php
+++ b/Classes/PHPExcel/Reader/Excel5.php
@@ -78,94 +78,94 @@ if (!defined('PHPEXCEL_ROOT')) {
class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExcel_Reader_IReader
{
// ParseXL definitions
- const XLS_BIFF8 = 0x0600;
- const XLS_BIFF7 = 0x0500;
- const XLS_WorkbookGlobals = 0x0005;
- const XLS_Worksheet = 0x0010;
+ const XLS_BIFF8 = 0x0600;
+ const XLS_BIFF7 = 0x0500;
+ const XLS_WorkbookGlobals = 0x0005;
+ const XLS_Worksheet = 0x0010;
// record identifiers
- const XLS_Type_FORMULA = 0x0006;
- const XLS_Type_EOF = 0x000a;
- const XLS_Type_PROTECT = 0x0012;
+ const XLS_Type_FORMULA = 0x0006;
+ const XLS_Type_EOF = 0x000a;
+ const XLS_Type_PROTECT = 0x0012;
const XLS_Type_OBJECTPROTECT = 0x0063;
- const XLS_Type_SCENPROTECT = 0x00dd;
- const XLS_Type_PASSWORD = 0x0013;
- const XLS_Type_HEADER = 0x0014;
- const XLS_Type_FOOTER = 0x0015;
- const XLS_Type_EXTERNSHEET = 0x0017;
- const XLS_Type_DEFINEDNAME = 0x0018;
- const XLS_Type_VERTICALPAGEBREAKS = 0x001a;
- const XLS_Type_HORIZONTALPAGEBREAKS = 0x001b;
- const XLS_Type_NOTE = 0x001c;
+ const XLS_Type_SCENPROTECT = 0x00dd;
+ const XLS_Type_PASSWORD = 0x0013;
+ const XLS_Type_HEADER = 0x0014;
+ const XLS_Type_FOOTER = 0x0015;
+ const XLS_Type_EXTERNSHEET = 0x0017;
+ const XLS_Type_DEFINEDNAME = 0x0018;
+ const XLS_Type_VERTICALPAGEBREAKS = 0x001a;
+ const XLS_Type_HORIZONTALPAGEBREAKS = 0x001b;
+ const XLS_Type_NOTE = 0x001c;
const XLS_Type_SELECTION = 0x001d;
- const XLS_Type_DATEMODE = 0x0022;
- const XLS_Type_EXTERNNAME = 0x0023;
- const XLS_Type_LEFTMARGIN = 0x0026;
- const XLS_Type_RIGHTMARGIN = 0x0027;
+ const XLS_Type_DATEMODE = 0x0022;
+ const XLS_Type_EXTERNNAME = 0x0023;
+ const XLS_Type_LEFTMARGIN = 0x0026;
+ const XLS_Type_RIGHTMARGIN = 0x0027;
const XLS_Type_TOPMARGIN = 0x0028;
- const XLS_Type_BOTTOMMARGIN = 0x0029;
- const XLS_Type_PRINTGRIDLINES = 0x002b;
- const XLS_Type_FILEPASS = 0x002f;
- const XLS_Type_FONT = 0x0031;
- const XLS_Type_CONTINUE = 0x003c;
- const XLS_Type_PANE = 0x0041;
- const XLS_Type_CODEPAGE = 0x0042;
- const XLS_Type_DEFCOLWIDTH = 0x0055;
- const XLS_Type_OBJ = 0x005d;
- const XLS_Type_COLINFO = 0x007d;
- const XLS_Type_IMDATA = 0x007f;
- const XLS_Type_SHEETPR = 0x0081;
- const XLS_Type_HCENTER = 0x0083;
- const XLS_Type_VCENTER = 0x0084;
+ const XLS_Type_BOTTOMMARGIN = 0x0029;
+ const XLS_Type_PRINTGRIDLINES = 0x002b;
+ const XLS_Type_FILEPASS = 0x002f;
+ const XLS_Type_FONT = 0x0031;
+ const XLS_Type_CONTINUE = 0x003c;
+ const XLS_Type_PANE = 0x0041;
+ const XLS_Type_CODEPAGE = 0x0042;
+ const XLS_Type_DEFCOLWIDTH = 0x0055;
+ const XLS_Type_OBJ = 0x005d;
+ const XLS_Type_COLINFO = 0x007d;
+ const XLS_Type_IMDATA = 0x007f;
+ const XLS_Type_SHEETPR = 0x0081;
+ const XLS_Type_HCENTER = 0x0083;
+ const XLS_Type_VCENTER = 0x0084;
const XLS_Type_SHEET = 0x0085;
- const XLS_Type_PALETTE = 0x0092;
- const XLS_Type_SCL = 0x00a0;
+ const XLS_Type_PALETTE = 0x0092;
+ const XLS_Type_SCL = 0x00a0;
const XLS_Type_PAGESETUP = 0x00a1;
const XLS_Type_MULRK = 0x00bd;
- const XLS_Type_MULBLANK = 0x00be;
- const XLS_Type_DBCELL = 0x00d7;
- const XLS_Type_XF = 0x00e0;
- const XLS_Type_MERGEDCELLS = 0x00e5;
- const XLS_Type_MSODRAWINGGROUP = 0x00eb;
- const XLS_Type_MSODRAWING = 0x00ec;
- const XLS_Type_SST = 0x00fc;
- const XLS_Type_LABELSST = 0x00fd;
- const XLS_Type_EXTSST = 0x00ff;
- const XLS_Type_EXTERNALBOOK = 0x01ae;
- const XLS_Type_DATAVALIDATIONS = 0x01b2;
- const XLS_Type_TXO = 0x01b6;
+ const XLS_Type_MULBLANK = 0x00be;
+ const XLS_Type_DBCELL = 0x00d7;
+ const XLS_Type_XF = 0x00e0;
+ const XLS_Type_MERGEDCELLS = 0x00e5;
+ const XLS_Type_MSODRAWINGGROUP = 0x00eb;
+ const XLS_Type_MSODRAWING = 0x00ec;
+ const XLS_Type_SST = 0x00fc;
+ const XLS_Type_LABELSST = 0x00fd;
+ const XLS_Type_EXTSST = 0x00ff;
+ const XLS_Type_EXTERNALBOOK = 0x01ae;
+ const XLS_Type_DATAVALIDATIONS = 0x01b2;
+ const XLS_Type_TXO = 0x01b6;
const XLS_Type_HYPERLINK = 0x01b8;
- const XLS_Type_DATAVALIDATION = 0x01be;
+ const XLS_Type_DATAVALIDATION = 0x01be;
const XLS_Type_DIMENSION = 0x0200;
const XLS_Type_BLANK = 0x0201;
- const XLS_Type_NUMBER = 0x0203;
+ const XLS_Type_NUMBER = 0x0203;
const XLS_Type_LABEL = 0x0204;
- const XLS_Type_BOOLERR = 0x0205;
- const XLS_Type_STRING = 0x0207;
- const XLS_Type_ROW = 0x0208;
+ const XLS_Type_BOOLERR = 0x0205;
+ const XLS_Type_STRING = 0x0207;
+ const XLS_Type_ROW = 0x0208;
const XLS_Type_INDEX = 0x020b;
const XLS_Type_ARRAY = 0x0221;
const XLS_Type_DEFAULTROWHEIGHT = 0x0225;
- const XLS_Type_WINDOW2 = 0x023e;
- const XLS_Type_RK = 0x027e;
+ const XLS_Type_WINDOW2 = 0x023e;
+ const XLS_Type_RK = 0x027e;
const XLS_Type_STYLE = 0x0293;
- const XLS_Type_FORMAT = 0x041e;
- const XLS_Type_SHAREDFMLA = 0x04bc;
- const XLS_Type_BOF = 0x0809;
- const XLS_Type_SHEETPROTECTION = 0x0867;
- const XLS_Type_RANGEPROTECTION = 0x0868;
- const XLS_Type_SHEETLAYOUT = 0x0862;
+ const XLS_Type_FORMAT = 0x041e;
+ const XLS_Type_SHAREDFMLA = 0x04bc;
+ const XLS_Type_BOF = 0x0809;
+ const XLS_Type_SHEETPROTECTION = 0x0867;
+ const XLS_Type_RANGEPROTECTION = 0x0868;
+ const XLS_Type_SHEETLAYOUT = 0x0862;
const XLS_Type_XFEXT = 0x087d;
- const XLS_Type_PAGELAYOUTVIEW = 0x088b;
- const XLS_Type_UNKNOWN = 0xffff;
+ const XLS_Type_PAGELAYOUTVIEW = 0x088b;
+ const XLS_Type_UNKNOWN = 0xffff;
// Encryption type
- const MS_BIFF_CRYPTO_NONE = 0;
- const MS_BIFF_CRYPTO_XOR = 1;
- const MS_BIFF_CRYPTO_RC4 = 2;
+ const MS_BIFF_CRYPTO_NONE = 0;
+ const MS_BIFF_CRYPTO_XOR = 1;
+ const MS_BIFF_CRYPTO_RC4 = 2;
// Size of stream blocks when using RC4 encryption
- const REKEY_BLOCK = 0x400;
+ const REKEY_BLOCK = 0x400;
/**
* Summary Information stream data.
@@ -389,7 +389,7 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
/**
* The type of encryption in use
*
- * @var int
+ * @var int
*/
private $_encryption = 0;
@@ -424,11 +424,11 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
/**
* Create a new PHPExcel_Reader_Excel5 instance
*/
- public function __construct() {
+ public function __construct()
+ {
$this->_readFilter = new PHPExcel_Reader_DefaultReadFilter();
}
-
/**
* Can the current PHPExcel_Reader_IReader read the file?
*
@@ -455,7 +455,6 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
}
}
-
/**
* Reads names of the worksheets from a file, without parsing the whole file to a PHPExcel object
*
@@ -485,10 +484,18 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
$code = self::_GetInt2d($this->_data, $this->_pos);
switch ($code) {
- case self::XLS_Type_BOF: $this->_readBof(); break;
- case self::XLS_Type_SHEET: $this->_readSheet(); break;
- case self::XLS_Type_EOF: $this->_readDefault(); break 2;
- default: $this->_readDefault(); break;
+ case self::XLS_Type_BOF:
+ $this->_readBof();
+ break;
+ case self::XLS_Type_SHEET:
+ $this->_readSheet();
+ break;
+ case self::XLS_Type_EOF:
+ $this->_readDefault();
+ break 2;
+ default:
+ $this->_readDefault();
+ break;
}
}
@@ -535,10 +542,18 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
$code = self::_GetInt2d($this->_data, $this->_pos);
switch ($code) {
- case self::XLS_Type_BOF: $this->_readBof(); break;
- case self::XLS_Type_SHEET: $this->_readSheet(); break;
- case self::XLS_Type_EOF: $this->_readDefault(); break 2;
- default: $this->_readDefault(); break;
+ case self::XLS_Type_BOF:
+ $this->_readBof();
+ break;
+ case self::XLS_Type_SHEET:
+ $this->_readSheet();
+ break;
+ case self::XLS_Type_EOF:
+ $this->_readDefault();
+ break 2;
+ default:
+ $this->_readDefault();
+ break;
}
}
@@ -583,9 +598,15 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
$tmpInfo['totalRows'] = max($tmpInfo['totalRows'], $rowIndex);
$tmpInfo['lastColumnIndex'] = max($tmpInfo['lastColumnIndex'], $columnIndex);
break;
- case self::XLS_Type_BOF: $this->_readBof(); break;
- case self::XLS_Type_EOF: $this->_readDefault(); break 2;
- default: $this->_readDefault(); break;
+ case self::XLS_Type_BOF:
+ $this->_readBof();
+ break;
+ case self::XLS_Type_EOF:
+ $this->_readDefault();
+ break 2;
+ default:
+ $this->_readDefault();
+ break;
}
}
@@ -629,45 +650,83 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
$this->_dataSize = strlen($this->_data);
// initialize
- $this->_pos = 0;
+ $this->_pos = 0;
$this->_codepage = 'CP1252';
- $this->_formats = array();
+ $this->_formats = array();
$this->_objFonts = array();
- $this->_palette = array();
- $this->_sheets = array();
- $this->_externalBooks = array();
- $this->_ref = array();
- $this->_definedname = array();
- $this->_sst = array();
+ $this->_palette = array();
+ $this->_sheets = array();
+ $this->_externalBooks = array();
+ $this->_ref = array();
+ $this->_definedname = array();
+ $this->_sst = array();
$this->_drawingGroupData = '';
- $this->_xfIndex = '';
- $this->_mapCellXfIndex = array();
- $this->_mapCellStyleXfIndex = array();
+ $this->_xfIndex = '';
+ $this->_mapCellXfIndex = array();
+ $this->_mapCellStyleXfIndex = array();
// Parse Workbook Global Substream
while ($this->_pos < $this->_dataSize) {
$code = self::_GetInt2d($this->_data, $this->_pos);
switch ($code) {
- case self::XLS_Type_BOF: $this->_readBof(); break;
- case self::XLS_Type_FILEPASS: $this->_readFilepass(); break;
- case self::XLS_Type_CODEPAGE: $this->_readCodepage(); break;
- case self::XLS_Type_DATEMODE: $this->_readDateMode(); break;
- case self::XLS_Type_FONT: $this->_readFont(); break;
- case self::XLS_Type_FORMAT: $this->_readFormat(); break;
- case self::XLS_Type_XF: $this->_readXf(); break;
- case self::XLS_Type_XFEXT: $this->_readXfExt(); break;
- case self::XLS_Type_STYLE: $this->_readStyle(); break;
- case self::XLS_Type_PALETTE: $this->_readPalette(); break;
- case self::XLS_Type_SHEET: $this->_readSheet(); break;
- case self::XLS_Type_EXTERNALBOOK: $this->_readExternalBook(); break;
- case self::XLS_Type_EXTERNNAME: $this->_readExternName(); break;
- case self::XLS_Type_EXTERNSHEET: $this->_readExternSheet(); break;
- case self::XLS_Type_DEFINEDNAME: $this->_readDefinedName(); break;
- case self::XLS_Type_MSODRAWINGGROUP: $this->_readMsoDrawingGroup(); break;
- case self::XLS_Type_SST: $this->_readSst(); break;
- case self::XLS_Type_EOF: $this->_readDefault(); break 2;
- default: $this->_readDefault(); break;
+ case self::XLS_Type_BOF:
+ $this->_readBof();
+ break;
+ case self::XLS_Type_FILEPASS:
+ $this->_readFilepass();
+ break;
+ case self::XLS_Type_CODEPAGE:
+ $this->_readCodepage();
+ break;
+ case self::XLS_Type_DATEMODE:
+ $this->_readDateMode();
+ break;
+ case self::XLS_Type_FONT:
+ $this->_readFont();
+ break;
+ case self::XLS_Type_FORMAT:
+ $this->_readFormat();
+ break;
+ case self::XLS_Type_XF:
+ $this->_readXf();
+ break;
+ case self::XLS_Type_XFEXT:
+ $this->_readXfExt();
+ break;
+ case self::XLS_Type_STYLE:
+ $this->_readStyle();
+ break;
+ case self::XLS_Type_PALETTE:
+ $this->_readPalette();
+ break;
+ case self::XLS_Type_SHEET:
+ $this->_readSheet();
+ break;
+ case self::XLS_Type_EXTERNALBOOK:
+ $this->_readExternalBook();
+ break;
+ case self::XLS_Type_EXTERNNAME:
+ $this->_readExternName();
+ break;
+ case self::XLS_Type_EXTERNSHEET:
+ $this->_readExternSheet();
+ break;
+ case self::XLS_Type_DEFINEDNAME:
+ $this->_readDefinedName();
+ break;
+ case self::XLS_Type_MSODRAWINGGROUP:
+ $this->_readMsoDrawingGroup();
+ break;
+ case self::XLS_Type_SST:
+ $this->_readSst();
+ break;
+ case self::XLS_Type_EOF:
+ $this->_readDefault();
+ break 2;
+ default:
+ $this->_readDefault();
+ break;
}
}
@@ -689,7 +748,6 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
$startColor = self::_readColor($fill->startcolorIndex, $this->_palette, $this->_version);
$fill->getStartColor()->setRGB($startColor['rgb']);
}
-
if (isset($fill->endcolorIndex)) {
$endColor = self::_readColor($fill->endcolorIndex, $this->_palette, $this->_version);
$fill->getEndColor()->setRGB($endColor['rgb']);
@@ -706,22 +764,18 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
$borderTopColor = self::_readColor($top->colorIndex, $this->_palette, $this->_version);
$top->getColor()->setRGB($borderTopColor['rgb']);
}
-
if (isset($right->colorIndex)) {
$borderRightColor = self::_readColor($right->colorIndex, $this->_palette, $this->_version);
$right->getColor()->setRGB($borderRightColor['rgb']);
}
-
if (isset($bottom->colorIndex)) {
$borderBottomColor = self::_readColor($bottom->colorIndex, $this->_palette, $this->_version);
$bottom->getColor()->setRGB($borderBottomColor['rgb']);
}
-
if (isset($left->colorIndex)) {
$borderLeftColor = self::_readColor($left->colorIndex, $this->_palette, $this->_version);
$left->getColor()->setRGB($borderLeftColor['rgb']);
}
-
if (isset($diagonal->colorIndex)) {
$borderDiagonalColor = self::_readColor($diagonal->colorIndex, $this->_palette, $this->_version);
$diagonal->getColor()->setRGB($borderDiagonalColor['rgb']);
@@ -742,7 +796,6 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
// Parse the individual sheets
foreach ($this->_sheets as $sheet) {
-
if ($sheet['sheetType'] != 0x00) {
// 0x00: Worksheet, 0x02: Chart, 0x06: Visual Basic module
continue;
@@ -789,60 +842,166 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
$code = self::_GetInt2d($this->_data, $this->_pos);
switch ($code) {
- case self::XLS_Type_BOF: $this->_readBof(); break;
- case self::XLS_Type_PRINTGRIDLINES: $this->_readPrintGridlines(); break;
- case self::XLS_Type_DEFAULTROWHEIGHT: $this->_readDefaultRowHeight(); break;
- case self::XLS_Type_SHEETPR: $this->_readSheetPr(); break;
- case self::XLS_Type_HORIZONTALPAGEBREAKS: $this->_readHorizontalPageBreaks(); break;
- case self::XLS_Type_VERTICALPAGEBREAKS: $this->_readVerticalPageBreaks(); break;
- case self::XLS_Type_HEADER: $this->_readHeader(); break;
- case self::XLS_Type_FOOTER: $this->_readFooter(); break;
- case self::XLS_Type_HCENTER: $this->_readHcenter(); break;
- case self::XLS_Type_VCENTER: $this->_readVcenter(); break;
- case self::XLS_Type_LEFTMARGIN: $this->_readLeftMargin(); break;
- case self::XLS_Type_RIGHTMARGIN: $this->_readRightMargin(); break;
- case self::XLS_Type_TOPMARGIN: $this->_readTopMargin(); break;
- case self::XLS_Type_BOTTOMMARGIN: $this->_readBottomMargin(); break;
- case self::XLS_Type_PAGESETUP: $this->_readPageSetup(); break;
- case self::XLS_Type_PROTECT: $this->_readProtect(); break;
- case self::XLS_Type_SCENPROTECT: $this->_readScenProtect(); break;
- case self::XLS_Type_OBJECTPROTECT: $this->_readObjectProtect(); break;
- case self::XLS_Type_PASSWORD: $this->_readPassword(); break;
- case self::XLS_Type_DEFCOLWIDTH: $this->_readDefColWidth(); break;
- case self::XLS_Type_COLINFO: $this->_readColInfo(); break;
- case self::XLS_Type_DIMENSION: $this->_readDefault(); break;
- case self::XLS_Type_ROW: $this->_readRow(); break;
- case self::XLS_Type_DBCELL: $this->_readDefault(); break;
- case self::XLS_Type_RK: $this->_readRk(); break;
- case self::XLS_Type_LABELSST: $this->_readLabelSst(); break;
- case self::XLS_Type_MULRK: $this->_readMulRk(); break;
- case self::XLS_Type_NUMBER: $this->_readNumber(); break;
- case self::XLS_Type_FORMULA: $this->_readFormula(); break;
- case self::XLS_Type_SHAREDFMLA: $this->_readSharedFmla(); break;
- case self::XLS_Type_BOOLERR: $this->_readBoolErr(); break;
- case self::XLS_Type_MULBLANK: $this->_readMulBlank(); break;
- case self::XLS_Type_LABEL: $this->_readLabel(); break;
- case self::XLS_Type_BLANK: $this->_readBlank(); break;
- case self::XLS_Type_MSODRAWING: $this->_readMsoDrawing(); break;
- case self::XLS_Type_OBJ: $this->_readObj(); break;
- case self::XLS_Type_WINDOW2: $this->_readWindow2(); break;
- case self::XLS_Type_PAGELAYOUTVIEW: $this->_readPageLayoutView(); break;
- case self::XLS_Type_SCL: $this->_readScl(); break;
- case self::XLS_Type_PANE: $this->_readPane(); break;
- case self::XLS_Type_SELECTION: $this->_readSelection(); break;
- case self::XLS_Type_MERGEDCELLS: $this->_readMergedCells(); break;
- case self::XLS_Type_HYPERLINK: $this->_readHyperLink(); break;
- case self::XLS_Type_DATAVALIDATIONS: $this->_readDataValidations(); break;
- case self::XLS_Type_DATAVALIDATION: $this->_readDataValidation(); break;
- case self::XLS_Type_SHEETLAYOUT: $this->_readSheetLayout(); break;
- case self::XLS_Type_SHEETPROTECTION: $this->_readSheetProtection(); break;
- case self::XLS_Type_RANGEPROTECTION: $this->_readRangeProtection(); break;
- case self::XLS_Type_NOTE: $this->_readNote(); break;
+ case self::XLS_Type_BOF:
+ $this->_readBof();
+ break;
+ case self::XLS_Type_PRINTGRIDLINES:
+ $this->_readPrintGridlines();
+ break;
+ case self::XLS_Type_DEFAULTROWHEIGHT:
+ $this->_readDefaultRowHeight();
+ break;
+ case self::XLS_Type_SHEETPR:
+ $this->_readSheetPr();
+ break;
+ case self::XLS_Type_HORIZONTALPAGEBREAKS:
+ $this->_readHorizontalPageBreaks();
+ break;
+ case self::XLS_Type_VERTICALPAGEBREAKS:
+ $this->_readVerticalPageBreaks();
+ break;
+ case self::XLS_Type_HEADER:
+ $this->_readHeader();
+ break;
+ case self::XLS_Type_FOOTER:
+ $this->_readFooter();
+ break;
+ case self::XLS_Type_HCENTER:
+ $this->_readHcenter();
+ break;
+ case self::XLS_Type_VCENTER:
+ $this->_readVcenter();
+ break;
+ case self::XLS_Type_LEFTMARGIN:
+ $this->_readLeftMargin();
+ break;
+ case self::XLS_Type_RIGHTMARGIN:
+ $this->_readRightMargin();
+ break;
+ case self::XLS_Type_TOPMARGIN:
+ $this->_readTopMargin();
+ break;
+ case self::XLS_Type_BOTTOMMARGIN:
+ $this->_readBottomMargin();
+ break;
+ case self::XLS_Type_PAGESETUP:
+ $this->_readPageSetup();
+ break;
+ case self::XLS_Type_PROTECT:
+ $this->_readProtect();
+ break;
+ case self::XLS_Type_SCENPROTECT:
+ $this->_readScenProtect();
+ break;
+ case self::XLS_Type_OBJECTPROTECT:
+ $this->_readObjectProtect();
+ break;
+ case self::XLS_Type_PASSWORD:
+ $this->_readPassword();
+ break;
+ case self::XLS_Type_DEFCOLWIDTH:
+ $this->_readDefColWidth();
+ break;
+ case self::XLS_Type_COLINFO:
+ $this->_readColInfo();
+ break;
+ case self::XLS_Type_DIMENSION:
+ $this->_readDefault();
+ break;
+ case self::XLS_Type_ROW:
+ $this->_readRow();
+ break;
+ case self::XLS_Type_DBCELL:
+ $this->_readDefault();
+ break;
+ case self::XLS_Type_RK:
+ $this->_readRk();
+ break;
+ case self::XLS_Type_LABELSST:
+ $this->_readLabelSst();
+ break;
+ case self::XLS_Type_MULRK:
+ $this->_readMulRk();
+ break;
+ case self::XLS_Type_NUMBER:
+ $this->_readNumber();
+ break;
+ case self::XLS_Type_FORMULA:
+ $this->_readFormula();
+ break;
+ case self::XLS_Type_SHAREDFMLA:
+ $this->_readSharedFmla();
+ break;
+ case self::XLS_Type_BOOLERR:
+ $this->_readBoolErr();
+ break;
+ case self::XLS_Type_MULBLANK:
+ $this->_readMulBlank();
+ break;
+ case self::XLS_Type_LABEL:
+ $this->_readLabel();
+ break;
+ case self::XLS_Type_BLANK:
+ $this->_readBlank();
+ break;
+ case self::XLS_Type_MSODRAWING:
+ $this->_readMsoDrawing();
+ break;
+ case self::XLS_Type_OBJ:
+ $this->_readObj();
+ break;
+ case self::XLS_Type_WINDOW2:
+ $this->_readWindow2();
+ break;
+ case self::XLS_Type_PAGELAYOUTVIEW:
+ $this->_readPageLayoutView();
+ break;
+ case self::XLS_Type_SCL:
+ $this->_readScl();
+ break;
+ case self::XLS_Type_PANE:
+ $this->_readPane();
+ break;
+ case self::XLS_Type_SELECTION:
+ $this->_readSelection();
+ break;
+ case self::XLS_Type_MERGEDCELLS:
+ $this->_readMergedCells();
+ break;
+ case self::XLS_Type_HYPERLINK:
+ $this->_readHyperLink();
+ break;
+ case self::XLS_Type_DATAVALIDATIONS:
+ $this->_readDataValidations();
+ break;
+ case self::XLS_Type_DATAVALIDATION:
+ $this->_readDataValidation();
+ break;
+ case self::XLS_Type_SHEETLAYOUT:
+ $this->_readSheetLayout();
+ break;
+ case self::XLS_Type_SHEETPROTECTION:
+ $this->_readSheetProtection();
+ break;
+ case self::XLS_Type_RANGEPROTECTION:
+ $this->_readRangeProtection();
+ break;
+ case self::XLS_Type_NOTE:
+ $this->_readNote();
+ break;
//case self::XLS_Type_IMDATA: $this->_readImData(); break;
- case self::XLS_Type_TXO: $this->_readTextObject(); break;
- case self::XLS_Type_CONTINUE: $this->_readContinue(); break;
- case self::XLS_Type_EOF: $this->_readDefault(); break 2;
- default: $this->_readDefault(); break;
+ case self::XLS_Type_TXO:
+ $this->_readTextObject();
+ break;
+ case self::XLS_Type_CONTINUE:
+ $this->_readContinue();
+ break;
+ case self::XLS_Type_EOF:
+ $this->_readDefault();
+ break 2;
+ default:
+ $this->_readDefault();
+ break;
}
}
@@ -897,7 +1056,6 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
// Note
// echo 'Cell Annotation Object
';
// echo 'Object ID is ', $obj['idObjID'],'
';
-//
if (isset($this->_cellNotes[$obj['idObjID']])) {
$cellNote = $this->_cellNotes[$obj['idObjID']];
@@ -907,11 +1065,9 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
}
}
break;
-
case 0x08:
// echo 'Picture Object
';
// picture
-
// get index to BSE entry (1-based)
$BSEindex = $spContainer->getOPT(0x0104);
$BSECollection = $escherWorkbook->getDggContainer()->getBstoreContainer()->getBSECollection();
@@ -936,7 +1092,6 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
$drawing->setRenderingFunction(PHPExcel_Worksheet_MemoryDrawing::RENDERING_JPEG);
$drawing->setMimeType(PHPExcel_Worksheet_MemoryDrawing::MIMETYPE_JPEG);
break;
-
case PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE::BLIPTYPE_PNG:
$drawing->setRenderingFunction(PHPExcel_Worksheet_MemoryDrawing::RENDERING_PNG);
$drawing->setMimeType(PHPExcel_Worksheet_MemoryDrawing::MIMETYPE_PNG);
@@ -946,13 +1101,10 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
$drawing->setWorksheet($this->_phpSheet);
$drawing->setCoordinates($spContainer->getStartCoordinates());
}
-
break;
-
default:
// other object type
break;
-
}
}
}
@@ -982,9 +1134,7 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
// var_dump($noteDetails);
// echo '
';
$cellAddress = str_replace('$','', $noteDetails['cellRef']);
- $this->_phpSheet->getComment( $cellAddress )
- ->setAuthor( $noteDetails['author'] )
- ->setText($this->_parseRichText($noteDetails['objTextData']['text']) );
+ $this->_phpSheet->getComment($cellAddress)->setAuthor($noteDetails['author'])->setText($this->_parseRichText($noteDetails['objTextData']['text']));
}
}
}
@@ -993,78 +1143,69 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
foreach ($this->_definedname as $definedName) {
if ($definedName['isBuiltInName']) {
switch ($definedName['name']) {
+ case pack('C', 0x06):
+ // print area
+ // in general, formula looks like this: Foo!$C$7:$J$66,Bar!$A$1:$IV$2
+ $ranges = explode(',', $definedName['formula']); // FIXME: what if sheetname contains comma?
- case pack('C', 0x06):
- // print area
- // in general, formula looks like this: Foo!$C$7:$J$66,Bar!$A$1:$IV$2
- $ranges = explode(',', $definedName['formula']); // FIXME: what if sheetname contains comma?
-
- $extractedRanges = array();
- foreach ($ranges as $range) {
- // $range should look like one of these
- // Foo!$C$7:$J$66
- // Bar!$A$1:$IV$2
-
- $explodes = explode('!', $range); // FIXME: what if sheetname contains exclamation mark?
- $sheetName = trim($explodes[0], "'");
-
- if (count($explodes) == 2) {
- if (strpos($explodes[1], ':') === FALSE) {
- $explodes[1] = $explodes[1] . ':' . $explodes[1];
+ $extractedRanges = array();
+ foreach ($ranges as $range) {
+ // $range should look like one of these
+ // Foo!$C$7:$J$66
+ // Bar!$A$1:$IV$2
+ $explodes = explode('!', $range); // FIXME: what if sheetname contains exclamation mark?
+ $sheetName = trim($explodes[0], "'");
+ if (count($explodes) == 2) {
+ if (strpos($explodes[1], ':') === FALSE) {
+ $explodes[1] = $explodes[1] . ':' . $explodes[1];
+ }
+ $extractedRanges[] = str_replace('$', '', $explodes[1]); // C7:J66
}
- $extractedRanges[] = str_replace('$', '', $explodes[1]); // C7:J66
}
- }
- if ($docSheet = $this->_phpExcel->getSheetByName($sheetName)) {
- $docSheet->getPageSetup()->setPrintArea(implode(',', $extractedRanges)); // C7:J66,A1:IV2
- }
- break;
+ if ($docSheet = $this->_phpExcel->getSheetByName($sheetName)) {
+ $docSheet->getPageSetup()->setPrintArea(implode(',', $extractedRanges)); // C7:J66,A1:IV2
+ }
+ break;
+ case pack('C', 0x07):
+ // print titles (repeating rows)
+ // Assuming BIFF8, there are 3 cases
+ // 1. repeating rows
+ // formula looks like this: Sheet!$A$1:$IV$2
+ // rows 1-2 repeat
+ // 2. repeating columns
+ // formula looks like this: Sheet!$A$1:$B$65536
+ // columns A-B repeat
+ // 3. both repeating rows and repeating columns
+ // formula looks like this: Sheet!$A$1:$B$65536,Sheet!$A$1:$IV$2
+ $ranges = explode(',', $definedName['formula']); // FIXME: what if sheetname contains comma?
+ foreach ($ranges as $range) {
+ // $range should look like this one of these
+ // Sheet!$A$1:$B$65536
+ // Sheet!$A$1:$IV$2
+ $explodes = explode('!', $range);
+ if (count($explodes) == 2) {
+ if ($docSheet = $this->_phpExcel->getSheetByName($explodes[0])) {
- case pack('C', 0x07):
- // print titles (repeating rows)
- // Assuming BIFF8, there are 3 cases
- // 1. repeating rows
- // formula looks like this: Sheet!$A$1:$IV$2
- // rows 1-2 repeat
- // 2. repeating columns
- // formula looks like this: Sheet!$A$1:$B$65536
- // columns A-B repeat
- // 3. both repeating rows and repeating columns
- // formula looks like this: Sheet!$A$1:$B$65536,Sheet!$A$1:$IV$2
+ $extractedRange = $explodes[1];
+ $extractedRange = str_replace('$', '', $extractedRange);
- $ranges = explode(',', $definedName['formula']); // FIXME: what if sheetname contains comma?
+ $coordinateStrings = explode(':', $extractedRange);
+ if (count($coordinateStrings) == 2) {
+ list($firstColumn, $firstRow) = PHPExcel_Cell::coordinateFromString($coordinateStrings[0]);
+ list($lastColumn, $lastRow) = PHPExcel_Cell::coordinateFromString($coordinateStrings[1]);
- foreach ($ranges as $range) {
- // $range should look like this one of these
- // Sheet!$A$1:$B$65536
- // Sheet!$A$1:$IV$2
-
- $explodes = explode('!', $range);
-
- if (count($explodes) == 2) {
- if ($docSheet = $this->_phpExcel->getSheetByName($explodes[0])) {
-
- $extractedRange = $explodes[1];
- $extractedRange = str_replace('$', '', $extractedRange);
-
- $coordinateStrings = explode(':', $extractedRange);
- if (count($coordinateStrings) == 2) {
- list($firstColumn, $firstRow) = PHPExcel_Cell::coordinateFromString($coordinateStrings[0]);
- list($lastColumn, $lastRow) = PHPExcel_Cell::coordinateFromString($coordinateStrings[1]);
-
- if ($firstColumn == 'A' and $lastColumn == 'IV') {
- // then we have repeating rows
- $docSheet->getPageSetup()->setRowsToRepeatAtTop(array($firstRow, $lastRow));
- } elseif ($firstRow == 1 and $lastRow == 65536) {
- // then we have repeating columns
- $docSheet->getPageSetup()->setColumnsToRepeatAtLeft(array($firstColumn, $lastColumn));
+ if ($firstColumn == 'A' and $lastColumn == 'IV') {
+ // then we have repeating rows
+ $docSheet->getPageSetup()->setRowsToRepeatAtTop(array($firstRow, $lastRow));
+ } elseif ($firstRow == 1 and $lastRow == 65536) {
+ // then we have repeating columns
+ $docSheet->getPageSetup()->setColumnsToRepeatAtLeft(array($firstColumn, $lastColumn));
+ }
}
}
}
}
- }
- break;
-
+ break;
}
} else {
// Extract range
@@ -1078,8 +1219,7 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
$localOnly = ($definedName['scope'] == 0) ? false : true;
- $scope = ($definedName['scope'] == 0) ?
- null : $this->_phpExcel->getSheetByName($this->_sheets[$definedName['scope'] - 1]['name']);
+ $scope = ($definedName['scope'] == 0) ? null : $this->_phpExcel->getSheetByName($this->_sheets[$definedName['scope'] - 1]['name']);
$this->_phpExcel->addNamedRange( new PHPExcel_NamedRange((string)$definedName['name'], $docSheet, $extractedRange, $localOnly, $scope) );
}
@@ -1114,7 +1254,6 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
$recordData = '';
if ($this->_encryption == self::MS_BIFF_CRYPTO_RC4) {
-
$oldBlock = floor($this->_rc4Pos / self::REKEY_BLOCK);
$block = floor($pos / self::REKEY_BLOCK);
$endBlock = floor(($pos + $len) / self::REKEY_BLOCK);
@@ -1144,7 +1283,6 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
// Keep track of the position of this decryptor.
// We'll try and re-use it later if we can to speed things up
$this->_rc4Pos = $pos + $len;
-
} elseif ($this->_encryption == self::MS_BIFF_CRYPTO_XOR) {
throw new PHPExcel_Reader_Exception('XOr encryption not supported');
}
@@ -1160,18 +1298,14 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
{
// OLE reader
$ole = new PHPExcel_Shared_OLERead();
-
// get excel data,
$res = $ole->read($pFilename);
// Get workbook data: workbook stream + sheet streams
$this->_data = $ole->getStream($ole->wrkbook);
-
// Get summary information data
$this->_summaryInformation = $ole->getStream($ole->summaryInformation);
-
// Get additional document summary information data
$this->_documentSummaryInformation = $ole->getStream($ole->documentSummaryInformation);
-
// Get user-defined property data
// $this->_userDefinedProperties = $ole->getUserDefinedProperties();
}
@@ -1211,7 +1345,6 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
// offset: ($secOffset+8); size: var
// loop through property decarations and properties
for ($i = 0; $i < $countProperties; ++$i) {
-
// offset: ($secOffset+8) + (8 * $i); size: 4; property ID
$id = self::_GetInt4d($this->_summaryInformation, ($secOffset+8) + (8 * $i));
@@ -1229,27 +1362,22 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
case 0x02: // 2 byte signed integer
$value = self::_GetInt2d($this->_summaryInformation, $secOffset + 4 + $offset);
break;
-
case 0x03: // 4 byte signed integer
$value = self::_GetInt4d($this->_summaryInformation, $secOffset + 4 + $offset);
break;
-
case 0x13: // 4 byte unsigned integer
// not needed yet, fix later if necessary
break;
-
case 0x1E: // null-terminated string prepended by dword string length
$byteLength = self::_GetInt4d($this->_summaryInformation, $secOffset + 4 + $offset);
$value = substr($this->_summaryInformation, $secOffset + 8 + $offset, $byteLength);
$value = PHPExcel_Shared_String::ConvertEncoding($value, 'UTF-8', $codePage);
$value = rtrim($value);
break;
-
case 0x40: // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601)
// PHP-time
$value = PHPExcel_Shared_OLE::OLE2LocalDate(substr($this->_summaryInformation, $secOffset + 4 + $offset, 8));
break;
-
case 0x47: // Clipboard format
// not needed yet, fix later if necessary
break;
@@ -1259,79 +1387,60 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
case 0x01: // Code Page
$codePage = PHPExcel_Shared_CodePage::NumberToName($value);
break;
-
case 0x02: // Title
$this->_phpExcel->getProperties()->setTitle($value);
break;
-
case 0x03: // Subject
$this->_phpExcel->getProperties()->setSubject($value);
break;
-
case 0x04: // Author (Creator)
$this->_phpExcel->getProperties()->setCreator($value);
break;
-
case 0x05: // Keywords
$this->_phpExcel->getProperties()->setKeywords($value);
break;
-
case 0x06: // Comments (Description)
$this->_phpExcel->getProperties()->setDescription($value);
break;
-
case 0x07: // Template
// Not supported by PHPExcel
break;
-
case 0x08: // Last Saved By (LastModifiedBy)
$this->_phpExcel->getProperties()->setLastModifiedBy($value);
break;
-
case 0x09: // Revision
// Not supported by PHPExcel
break;
-
case 0x0A: // Total Editing Time
// Not supported by PHPExcel
break;
-
case 0x0B: // Last Printed
// Not supported by PHPExcel
break;
-
case 0x0C: // Created Date/Time
$this->_phpExcel->getProperties()->setCreated($value);
break;
-
case 0x0D: // Modified Date/Time
$this->_phpExcel->getProperties()->setModified($value);
break;
-
case 0x0E: // Number of Pages
// Not supported by PHPExcel
break;
-
case 0x0F: // Number of Words
// Not supported by PHPExcel
break;
-
case 0x10: // Number of Characters
// Not supported by PHPExcel
break;
-
case 0x11: // Thumbnail
// Not supported by PHPExcel
break;
-
case 0x12: // Name of creating application
// Not supported by PHPExcel
break;
-
case 0x13: // Security
// Not supported by PHPExcel
break;
-
}
}
}
@@ -1395,32 +1504,26 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
case 0x02: // 2 byte signed integer
$value = self::_GetInt2d($this->_documentSummaryInformation, $secOffset + 4 + $offset);
break;
-
case 0x03: // 4 byte signed integer
$value = self::_GetInt4d($this->_documentSummaryInformation, $secOffset + 4 + $offset);
break;
-
case 0x0B: // Boolean
$value = self::_GetInt2d($this->_documentSummaryInformation, $secOffset + 4 + $offset);
$value = ($value == 0 ? false : true);
break;
-
case 0x13: // 4 byte unsigned integer
// not needed yet, fix later if necessary
break;
-
case 0x1E: // null-terminated string prepended by dword string length
$byteLength = self::_GetInt4d($this->_documentSummaryInformation, $secOffset + 4 + $offset);
$value = substr($this->_documentSummaryInformation, $secOffset + 8 + $offset, $byteLength);
$value = PHPExcel_Shared_String::ConvertEncoding($value, 'UTF-8', $codePage);
$value = rtrim($value);
break;
-
case 0x40: // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601)
// PHP-Time
$value = PHPExcel_Shared_OLE::OLE2LocalDate(substr($this->_documentSummaryInformation, $secOffset + 4 + $offset, 8));
break;
-
case 0x47: // Clipboard format
// not needed yet, fix later if necessary
break;
@@ -1430,67 +1533,51 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
case 0x01: // Code Page
$codePage = PHPExcel_Shared_CodePage::NumberToName($value);
break;
-
case 0x02: // Category
$this->_phpExcel->getProperties()->setCategory($value);
break;
-
case 0x03: // Presentation Target
// Not supported by PHPExcel
break;
-
case 0x04: // Bytes
// Not supported by PHPExcel
break;
-
case 0x05: // Lines
// Not supported by PHPExcel
break;
-
case 0x06: // Paragraphs
// Not supported by PHPExcel
break;
-
case 0x07: // Slides
// Not supported by PHPExcel
break;
-
case 0x08: // Notes
// Not supported by PHPExcel
break;
-
case 0x09: // Hidden Slides
// Not supported by PHPExcel
break;
-
case 0x0A: // MM Clips
// Not supported by PHPExcel
break;
-
case 0x0B: // Scale Crop
// Not supported by PHPExcel
break;
-
case 0x0C: // Heading Pairs
// Not supported by PHPExcel
break;
-
case 0x0D: // Titles of Parts
// Not supported by PHPExcel
break;
-
case 0x0E: // Manager
$this->_phpExcel->getProperties()->setManager($value);
break;
-
case 0x0F: // Company
$this->_phpExcel->getProperties()->setCompany($value);
break;
-
case 0x10: // Links up-to-date
// Not supported by PHPExcel
break;
-
}
}
}
@@ -1535,10 +1622,11 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
// echo 'Note Object ID=', $noteObjID,'
';
// echo 'Note Author=', $noteAuthor,'