mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-26 10:21:56 +00:00
Applied ReadFilter option to OOCalc and Excel2003XML Readers, plus additional tests in the /Tests directory
git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@60573 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
@@ -262,8 +262,6 @@ class PHPExcel_Reader_OOCalc implements PHPExcel_Reader_IReader
|
||||
$officePropertyDC = $officePropertyData->children($namespacesMeta['dc']);
|
||||
}
|
||||
foreach($officePropertyDC as $propertyName => $propertyValue) {
|
||||
// echo $propertyName.' = '.$propertyValue.'<hr />';
|
||||
|
||||
switch ($propertyName) {
|
||||
case 'title' :
|
||||
$docProps->setTitle($propertyValue);
|
||||
@@ -291,13 +289,6 @@ class PHPExcel_Reader_OOCalc implements PHPExcel_Reader_IReader
|
||||
}
|
||||
foreach($officePropertyMeta as $propertyName => $propertyValue) {
|
||||
$propertyValueAttributes = $propertyValue->attributes($namespacesMeta['meta']);
|
||||
|
||||
// echo $propertyName.' = '.$propertyValue.'<br />';
|
||||
// foreach ($propertyValueAttributes as $key => $value) {
|
||||
// echo $key.' = '.$value.'<br />';
|
||||
// }
|
||||
// echo '<hr />';
|
||||
//
|
||||
switch ($propertyName) {
|
||||
case 'initial-creator' :
|
||||
$docProps->setCreator($propertyValue);
|
||||
@@ -384,6 +375,12 @@ class PHPExcel_Reader_OOCalc implements PHPExcel_Reader_IReader
|
||||
case 'table-row' :
|
||||
$columnID = 'A';
|
||||
foreach($rowData as $key => $cellData) {
|
||||
if (!is_null($this->getReadFilter())) {
|
||||
if (!$this->getReadFilter()->readCell($columnID, $rowID, $worksheetName)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// echo '<b>'.$columnID.$rowID.'</b><br />';
|
||||
$cellDataText = $cellData->children($namespacesContent['text']);
|
||||
$cellDataOfficeAttributes = $cellData->attributes($namespacesContent['office']);
|
||||
|
||||
Reference in New Issue
Block a user