Search style by identity in PHPExcel_Worksheet::duplicateStyle()

This commit is contained in:
Andrey Mironov
2012-10-30 16:46:18 +06:00
parent 4381f9740c
commit db2a7cbabf
2 changed files with 19 additions and 3 deletions
+16
View File
@@ -607,6 +607,22 @@ class PHPExcel
return false;
}
/**
* Check if style exists in style collection
*
* @param PHPExcel_Style $style
* @return boolean
*/
public function cellXfExists($pCellStyle = null)
{
foreach ($this->_cellXfCollection as $cellXf) {
if ($cellXf === $pCellStyle) {
return true;
}
}
return false;
}
/**
* Get default style
*