Vendor updates
This commit is contained in:
@ -82,7 +82,7 @@ class Sample
|
||||
|
||||
$files = [];
|
||||
foreach ($regex as $file) {
|
||||
$file = str_replace($baseDir . '/', '', $file[0]);
|
||||
$file = str_replace(str_replace('\\', '/', $baseDir) . '/', '', str_replace('\\', '/', $file[0]));
|
||||
$info = pathinfo($file);
|
||||
$category = str_replace('_', ' ', $info['dirname']);
|
||||
$name = str_replace('_', ' ', preg_replace('/(|\.php)/', '', $info['filename']));
|
||||
|
@ -1127,7 +1127,7 @@ class Xls extends BaseReader
|
||||
// TODO: Why is there no BSE Index? Is this a new Office Version? Password protected field?
|
||||
// More likely : a uncompatible picture
|
||||
if (!$BSEindex) {
|
||||
continue;
|
||||
continue 2;
|
||||
}
|
||||
|
||||
$BSECollection = $escherWorkbook->getDggContainer()->getBstoreContainer()->getBSECollection();
|
||||
|
@ -643,7 +643,7 @@ class Xlsx extends BaseReader
|
||||
$excel->addCellXf($objStyle);
|
||||
}
|
||||
|
||||
foreach ($xmlStyles->cellStyleXfs->xf as $xf) {
|
||||
foreach (isset($xmlStyles->cellStyleXfs->xf) ? $xmlStyles->cellStyleXfs->xf : [] as $xf) {
|
||||
$numFmt = NumberFormat::FORMAT_GENERAL;
|
||||
if ($numFmts && $xf['numFmtId']) {
|
||||
$tmpNumFmt = self::getArrayItem($numFmts->xpath("sml:numFmt[@numFmtId=$xf[numFmtId]]"));
|
||||
|
@ -320,7 +320,7 @@ class OLE
|
||||
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
fseek($fh, 1, SEEK_CUR);
|
||||
$pps->Type = $type;
|
||||
|
@ -691,6 +691,9 @@ class NumberFormat extends Supervisor
|
||||
// Strip #
|
||||
$format = preg_replace('/\\#/', '0', $format);
|
||||
|
||||
// Remove locale code [$-###]
|
||||
$format = preg_replace('/\[\$\-.*\]/', '', $format);
|
||||
|
||||
$n = '/\\[[^\\]]+\\]/';
|
||||
$m = preg_replace($n, '', $format);
|
||||
$number_regex = '/(0+)(\\.?)(0*)/';
|
||||
|
@ -153,10 +153,6 @@ class ColumnCellIterator extends CellIterator
|
||||
*/
|
||||
public function prev()
|
||||
{
|
||||
if ($this->currentRow <= $this->startRow) {
|
||||
throw new PhpSpreadsheetException("Row is already at the beginning of range ({$this->startRow} - {$this->endRow})");
|
||||
}
|
||||
|
||||
do {
|
||||
--$this->currentRow;
|
||||
} while (($this->onlyExistingCells) &&
|
||||
@ -171,7 +167,7 @@ class ColumnCellIterator extends CellIterator
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return $this->currentRow <= $this->endRow;
|
||||
return $this->currentRow <= $this->endRow && $this->currentRow >= $this->startRow;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -157,14 +157,9 @@ class ColumnIterator implements \Iterator
|
||||
|
||||
/**
|
||||
* Set the iterator to its previous value.
|
||||
*
|
||||
* @throws PhpSpreadsheetException
|
||||
*/
|
||||
public function prev()
|
||||
{
|
||||
if ($this->currentColumnIndex <= $this->startColumnIndex) {
|
||||
throw new PhpSpreadsheetException('Column is already at the beginning of range (' . Coordinate::stringFromColumnIndex($this->endColumnIndex) . ' - ' . Coordinate::stringFromColumnIndex($this->endColumnIndex) . ')');
|
||||
}
|
||||
--$this->currentColumnIndex;
|
||||
}
|
||||
|
||||
@ -175,6 +170,6 @@ class ColumnIterator implements \Iterator
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return $this->currentColumnIndex <= $this->endColumnIndex;
|
||||
return $this->currentColumnIndex <= $this->endColumnIndex && $this->currentColumnIndex >= $this->startColumnIndex;
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ class Iterator implements \Iterator
|
||||
*
|
||||
* @param Spreadsheet $subject
|
||||
*/
|
||||
public function __construct(Spreadsheet $subject = null)
|
||||
public function __construct(Spreadsheet $subject)
|
||||
{
|
||||
// Set subject
|
||||
$this->subject = $subject;
|
||||
@ -82,6 +82,6 @@ class Iterator implements \Iterator
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return $this->position < $this->subject->getSheetCount();
|
||||
return $this->position < $this->subject->getSheetCount() && $this->position >= 0;
|
||||
}
|
||||
}
|
||||
|
@ -155,9 +155,6 @@ class RowCellIterator extends CellIterator
|
||||
*/
|
||||
public function prev()
|
||||
{
|
||||
if ($this->currentColumnIndex <= $this->startColumnIndex) {
|
||||
throw new PhpSpreadsheetException('Column is already at the beginning of range (' . Coordinate::stringFromColumnIndex($this->endColumnIndex) . ' - ' . Coordinate::stringFromColumnIndex($this->endColumnIndex) . ')');
|
||||
}
|
||||
do {
|
||||
--$this->currentColumnIndex;
|
||||
} while (($this->onlyExistingCells) && (!$this->worksheet->cellExistsByColumnAndRow($this->currentColumnIndex, $this->rowIndex)) && ($this->currentColumnIndex >= $this->startColumnIndex));
|
||||
@ -170,7 +167,7 @@ class RowCellIterator extends CellIterator
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return $this->currentColumnIndex <= $this->endColumnIndex;
|
||||
return $this->currentColumnIndex <= $this->endColumnIndex && $this->currentColumnIndex >= $this->startColumnIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -152,15 +152,9 @@ class RowIterator implements \Iterator
|
||||
|
||||
/**
|
||||
* Set the iterator to its previous value.
|
||||
*
|
||||
* @throws PhpSpreadsheetException
|
||||
*/
|
||||
public function prev()
|
||||
{
|
||||
if ($this->position <= $this->startRow) {
|
||||
throw new PhpSpreadsheetException("Row is already at the beginning of range ({$this->startRow} - {$this->endRow})");
|
||||
}
|
||||
|
||||
--$this->position;
|
||||
}
|
||||
|
||||
@ -171,6 +165,6 @@ class RowIterator implements \Iterator
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return $this->position <= $this->endRow;
|
||||
return $this->position <= $this->endRow && $this->position >= $this->startRow;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user