1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <?php
- $erCalc_Row = error_reporting(E_ALL | E_STRICT);
- class Calc_Row
- {
-
- protected $row;
-
-
- function getCells ()
- {
- $cellNodeList = $this->row->childNodes;
- $cells = array();
- $iCell = 0;
- for ($icol = 0 ; $icol < $cellNodeList->length ; $icol++)
- {
- $cellElement = $cellNodeList->item($icol);
- $count = NULL;
- if (is_object($cellElement))
- {
- $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);
- }
- }
- return $cells;
- }
-
-
- function __construct(DOMElement $row)
- {
- if ((!is_a($row, '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);
|