|
@@ -4,7 +4,7 @@
|
|
|
*
|
|
|
* Requires PHP 5.2
|
|
|
*
|
|
|
- * @version $Id: Calc_Row.php,v 1.3 2007-08-06 16:31:38 marand Exp $
|
|
|
+ * @version $Id: Calc_Row.php,v 1.4 2007-09-09 19:49:24 marand Exp $
|
|
|
* @license CeCILL 2.0
|
|
|
* @copyright 2005-2006 Ouest Systemes Informatiques
|
|
|
*/
|
|
@@ -17,10 +17,10 @@ class Calc_Row
|
|
|
* @var DOMElement $row
|
|
|
*/
|
|
|
protected $row;
|
|
|
-
|
|
|
+
|
|
|
|
|
|
* Analyze a spreadsheet row and return the cells as an array of Calc_Cell
|
|
|
- *
|
|
|
+ *
|
|
|
* @return array
|
|
|
*/
|
|
|
function getCells ()
|
|
@@ -38,34 +38,35 @@ class Calc_Row
|
|
|
$count = $cellElement->getAttributeNS(Calc_Reader::NS_TABLE, 'number-columns-repeated');
|
|
|
}
|
|
|
if (empty($count))
|
|
|
- {
|
|
|
+ {
|
|
|
$count = 1;
|
|
|
}
|
|
|
for ($j = 0 ; $j < $count ; $j++)
|
|
|
{
|
|
|
- $cells[$iCell++] = new Calc_Cell($cellElement);
|
|
|
+ $cells[$iCell++] = new Calc_Cell($cellElement);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
return $cells;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
* Construct a Calc_Row from the DOMElement representing it.
|
|
|
- *
|
|
|
+ *
|
|
|
* This DOMElement must bear a table:table-row tag
|
|
|
- *
|
|
|
+ *
|
|
|
* @param DOMNodeList $row
|
|
|
* @return void
|
|
|
*/
|
|
|
function __construct(DOMElement $row)
|
|
|
{
|
|
|
- if ((!is_a($row, 'DOMElement')) || ($row->tagName != 'table:table-row'))
|
|
|
+ if ((!($row instanceof DOMElement)) || ($row->tagName != 'table:table-row'))
|
|
|
{
|
|
|
die('Calc_Row::__construct() needs a DOMElement parameter for a table-row element ');
|
|
|
}
|
|
|
$this->row = $row;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
error_reporting($erCalc_Row);
|
|
|
unset($erCalc_Row);
|