@param TableCell|null $oldCell
@param TableCell|null $newCell
@param bool           $usingExtraRow

@return \DOMElement
777799
protected function diffCells($oldCell, $newCell, $usingExtraRow = false)
    {
        $diffCell = $this->getNewCellNode($oldCell, $newCell);

        $oldContent = $oldCell ? $this->getInnerHtml($oldCell->getDomNode()) : '';
        $newContent = $newCell ? $this->getInnerHtml($newCell->getDomNode()) : '';

        $htmlDiff = HtmlDiff::create(
            mb_convert_encoding($oldContent, 'UTF-8', 'HTML-ENTITIES'),
            mb_convert_encoding($newContent, 'UTF-8', 'HTML-ENTITIES'),
            $this->config
        );
        $diff = $htmlDiff->build();

        $this->setInnerHtml($diffCell, $diff);

        if (null === $newCell) {
            $diffCell->setAttribute('class', trim($diffCell->getAttribute('class').' del'));
        }

        if (null === $oldCell) {
            $diffCell->setAttribute('class', trim($diffCell->getAttribute('class').' ins'));
        }

        if ($usingExtraRow) {
            $diffCell->setAttribute('class', trim($diffCell->getAttribute('class').' extra-row'));
        }

        return $diffCell;
    }
1328727
public function prependCell($cell, $name = null)
    {
        $cell = $this->buildCell($cell);
        if ($name == null && $cell->getName() != '') {
            $name = $cell->getName();
        }
        if ($name == null) {
            array_unshift($this->cells, $cell);
        } else {
            $this->cells = [$name => $cell] + $this->cells;
        }
        reset($this->cells);
        $cell->setName(key($this->cells));
        return $this;
    }
332671
public function setHyperlink(PHPExcel_Cell_Hyperlink $pHyperlink = NULL)
	{
		if (!isset($this->_parent)) {
			throw new PHPExcel_Exception('Cannot set hyperlink for cell that is not bound to a worksheet');
		}

		$this->getWorksheet()->setHyperlink($this->getCoordinate(), $pHyperlink);

		return $this->notifyCacheController();
	}
569851
public function copyCellCollection(PHPExcel_Worksheet $parent) {
		$this->_currentCellIsDirty;
        $this->_storeData();

		//	Get a new id for the new table name
		$tableName = str_replace('.','_',$this->_getUniqueID());
		if (!$this->_DBHandle->queryExec('CREATE TABLE kvp_'.$tableName.' (id VARCHAR(12) PRIMARY KEY, value BLOB)
													AS SELECT * FROM kvp_'.$this->_TableName))
			throw new PHPExcel_Exception(sqlite_error_string($this->_DBHandle->lastError()));

		//	Copy the existing cell cache file
		$this->_TableName = $tableName;
	}
1057140
public function cellGrowRight($iRow, $iCol, $iColSup) {
    if (!isset($this->cells[$iRow][$iCol])) {
      throw new \RuntimeException('No cell at this position.');
    }
    $cell = $this->cells[$iRow][$iCol];
    if ($cell instanceof ShadowCell) {
      throw new \Exception("Can't grow a ShadowCell.");
    }
    if ($cell instanceof PlaceholderCell) {
      throw new \Exception("Can't grow a PlaceholderCell.");
    }
    // Coordinates of the extension area on the right of the cell.
    $iRowMin = $iRow;
    $iRowSup = $iRow + $cell->getRowspan();
    $iColMin = $iCol + $cell->getColspan();
    if (!$this->areaIsFree($iRowMin, $iColMin, $iRowSup, $iColSup)) {
      return false;
    }
    $this->paintShadow($iRowMin, $iColMin, $iRowSup, $iColSup);
    $this->cells[$iRow][$iCol] = $cell->setColspan($iColSup - $iCol);
    return true;
  }
1259958
public static Cell getOrCreateCell(Row row, int cellIndex) {
		Cell cell = row.getCell(cellIndex);
		if (null == cell) {
			cell = row.createCell(cellIndex);
		}
		return cell;
	}
809796
public static function compareCells(PHPExcel_Cell $a, PHPExcel_Cell $b)
    {
        if ($a->getRow() < $b->getRow()) {
            return -1;
        } elseif ($a->getRow() > $b->getRow()) {
            return 1;
        } elseif (self::columnIndexFromString($a->getColumn()) < self::columnIndexFromString($b->getColumn())) {
            return -1;
        } else {
            return 1;
        }
    }
867144
public function addRow($rows = null) {
        if( ! is_array($rows) ) {
            $rows = func_get_args();
        }
        $row = new TableRow;
        foreach( $rows as $arg ) {
            $cell = new TableCell;
            $cell->addChild( $arg );
            $row->addChild( $cell );
        }
        $this->addChild($row);
        return $row;
    }
153986
public function prev()
    {
        if ($this->position <= $this->startColumn) {
            throw new PHPExcel_Exception(
                "Column is already at the beginning of range (" .
                PHPExcel_Cell::stringFromColumnIndex($this->endColumn) . " - " .
                PHPExcel_Cell::stringFromColumnIndex($this->endColumn) . ")"
            );
        }

        do {
            --$this->position;
        } while (($this->onlyExistingCells) &&
            (!$this->subject->cellExistsByColumnAndRow($this->position, $this->rowIndex)) &&
            ($this->position >= $this->startColumn));
    }
972562
protected function newCell($total, $index, $record, $attributes, $content)
    {
        return HTML::createTag(
            'td',
            $attributes,
            $content
        );
    }
384973
private function newExpr() {
    $node = new NewNode();
    $this->mustMatch(T_NEW, $node);
    $node->addChild($this->classNameReference(), 'className');
    if ($this->currentType === '(') {
      $this->functionCallParameterList($node);
    }
    return $node;
  }
121890
private <C> void fireEventToCell(Event event, String eventType, Element parentElem,
                                     final T rowValue, Context context, HasCell<T, C> column) {
        // Check if the cell consumes the event.
        Cell<C> cell = column.getCell();
        if (!cellConsumesEventType(cell, eventType)) {
            return;
        }

        C cellValue = column.getValue(rowValue);
        boolean cellWasEditing = cell.isEditing(context, parentElem, cellValue);
        if (column instanceof Column) {
          /*
           * If the HasCell is a Column, let it handle the event itself. This is
           * here for legacy support.
           */
            Column<T, C> col = (Column<T, C>) column;
            col.onBrowserEvent(context, parentElem, rowValue, event);
        } else {
            // Create a FieldUpdater.
            final FieldUpdater<T, C> fieldUpdater = column.getFieldUpdater();
            final int index = context.getIndex();
            ValueUpdater<C> valueUpdater = (fieldUpdater == null) ? null : (value) -> {
                fieldUpdater.update(index, rowValue, value);
            };

            // Fire the event to the cell.
            cell.onBrowserEvent(context, parentElem, cellValue, event, valueUpdater);
        }
699375
public function getResultRowObject($returnColumns = null, $omitColumns = null)
    {
        if (!$this->_resultRow) {
            return false;
        }

        $returnObject = new \stdClass();

        if (null !== $returnColumns) {

            $availableColumns = array_keys($this->_resultRow);
            foreach ((array) $returnColumns as $returnColumn) {
                if (in_array($returnColumn, $availableColumns)) {
                    $returnObject->{$returnColumn} = $this->_resultRow[$returnColumn];
                }
            }
            return $returnObject;
        } elseif (null !== $omitColumns) {

            $omitColumns = (array) $omitColumns;
            foreach ($this->_resultRow as $resultColumn => $resultValue) {
                if (!in_array($resultColumn, $omitColumns)) {
                    $returnObject->{$resultColumn} = $resultValue;
                }
            }
            return $returnObject;
        } else {

            foreach ($this->_resultRow as $resultColumn => $resultValue) {
                $returnObject->{$resultColumn} = $resultValue;
            }
            return $returnObject;
        }
    }
252847
function &addCell($name = null) {
        if (!$name) {
            $name = uniqid(microtime(true), true);
        }
        $this->cells[$name] = new TableRowCell();
        return $this->cells[$name];
    }
859186
function setUseNewRulesTeam($newRules, $multicall = false)
    {
        if (!is_bool($newRules)) {
            throw new InvalidArgumentException('newRules = ' . print_r($newRules, true));
        }

        return $this->execute(ucfirst(__FUNCTION__), array($newRules), $multicall);
    }
453289
public function moveCell($fromAddress, $toAddress) {
		if ($fromAddress === $this->_currentObjectID) {
			$this->_currentObjectID = $toAddress;
		}

		$this->_deleteQuery->bindValue('id',$toAddress,SQLITE3_TEXT);
		$result = $this->_deleteQuery->execute();
		if ($result === false)
			throw new PHPExcel_Exception($this->_DBHandle->lastErrorMsg());

		$this->_updateQuery->bindValue('toid',$toAddress,SQLITE3_TEXT);
		$this->_updateQuery->bindValue('fromid',$fromAddress,SQLITE3_TEXT);
		$result = $this->_updateQuery->execute();
		if ($result === false)
			throw new PHPExcel_Exception($this->_DBHandle->lastErrorMsg());

		return TRUE;
	}
1266542
public function insertNewRowBefore($pBefore = 1, $pNumRows = 1)
    {
        if ($pBefore >= 1) {
            $objReferenceHelper = PHPExcel_ReferenceHelper::getInstance();
            $objReferenceHelper->insertNewBefore('A' . $pBefore, 0, $pNumRows, $this);
        } else {
            throw new PHPExcel_Exception("Rows can only be inserted before at least row 1.");
        }
        return $this;
    }