Select all cells
966433
function () {
      if (!priv.settings.multiSelect) {
        return;
      }
      var tds = self.view.getAllCells();
      if (tds.length) {
        selection.setRangeStart(tds[0]);
        selection.setRangeEnd(tds[tds.length - 1], false);
      }
    }
1353259
function selectionSet (elem) {
  const sel = document.getSelection()
  const range = document.createRange()
  range.selectNodeContents(elem)
  sel.removeAllRanges()
  sel.addRange(range)
}
1182809
function getCellByRange(range) {
  let cell = range.startContainer;

  if (domUtils.getNodeName(cell) === 'TD' || domUtils.getNodeName(cell) === 'TH') {
    cell = $(cell);
  } else {
    cell = $(cell).parentsUntil('tr');
  }

  return cell;
}
568713
function () {
      var tds = self.view.getAllCells();
      for (var i = 0, ilen = tds.length; i < ilen; i++) {
        $(tds[i]).empty();
        self.minWidthFix(tds[i]);
      }
    }
555202
private List<List<Cell>> getAllCellsByLine(CellType type) {
	
		String locatorLines="", locatorColumn="";
		
		switch(type){
			case HEAD: 	locatorLines = ".//thead/tr";
						locatorColumn = ".//th";
						break;
			case BODY: 	locatorLines = ".//tbody/tr";
						locatorColumn = ".//td";
						break;
			case FOOT: 	locatorLines = ".//tfoot/tr";
						locatorColumn = ".//td";
						break;
		}
		
		List<WebElement> lines = this.getElement().findElements(By.xpath(locatorLines)); // Recover all lines from the table
		
		List<List<Cell>> cellLines = new ArrayList<List<Cell>>(); // List of lines of the table
		
		Integer lineIndex = 1;
		
		for (WebElement line : lines) { // iterate the lines taken from table
			
			List<Cell> cellColumns = new ArrayList<Cell>();
			List<WebElement> columns = line.findElements(By.xpath(locatorColumn)); // Recover all columns from the lines
			Integer columnIndex = 1;
			
			for (WebElement column : columns) { // iterate the columns taken from the line
				Cell cell = new SeleniumCell(column);
				cell.setCoordinates(lineIndex, columnIndex);
				cellColumns.add(cell);
				columnIndex++;
			} // end of columns iteration
			
			cellLines.add(cellColumns);
			lineIndex++;
		}// end of lines iteration
		
		return cellLines;
	}
891215
def highlight_current_cell(self):
        """"""
        if self.cell_separators is None or \
          not self.highlight_current_cell_enabled:
            return
        cursor, whole_file_selected, whole_screen_selected =\
            self.select_current_cell_in_visible_portion()
        selection = TextDecoration(cursor)
        selection.format.setProperty(QTextFormat.FullWidthSelection,
                                     to_qvariant(True))
        selection.format.setBackground(self.currentcell_color)

        if whole_file_selected:
            self.clear_extra_selections('current_cell')
        elif whole_screen_selected:
            if self.has_cell_separators:
                self.set_extra_selections('current_cell', [selection])
                self.update_extra_selections()
            else:
                self.clear_extra_selections('current_cell')
        else:
            self.set_extra_selections('current_cell', [selection])
            self.update_extra_selections()
144731
function(oArgs) {
    var sMode = this.get("selectionMode");
    if(sMode == "cellblock") {
        this._handleCellBlockSelectionByMouse(oArgs);
    }
    else if(sMode == "cellrange") {
        this._handleCellRangeSelectionByMouse(oArgs);
    }
    else {
        this._handleSingleCellSelectionByMouse(oArgs);
    }
}
659144
def select(self, cursor, qstring, vals=()):
    ""
    cursor.execute(qstring, vals) # hmm; do I not want to commit at the end of this?
    return cursor.fetchall()
751007
def select(self, rows, status=True, progress=True):
        ""
        before = len(self._selectedRows)
        if options.bulk_select_clear:
            self._selectedRows.clear()
        for r in (Progress(rows, 'selecting') if progress else rows):
            self.selectRow(r)
        if status:
            if options.bulk_select_clear:
                msg = 'selected %s %s%s' % (len(self._selectedRows), self.rowtype, ' instead' if before > 0 else '')
            else:
                msg = 'selected %s%s %s' % (len(self._selectedRows)-before, ' more' if before > 0 else '', self.rowtype)
            vd.status(msg)
346234
def cell_source(cell):
    """"""
    source = cell.source
    if source == '':
        return ['']
    if source.endswith('\n'):
        return source.splitlines() + ['']
    return source.splitlines()
639951
function TicTacToeBoard(cells){
    this.board = [];
		for(var i=0; i<NUM_CELLS; i++) {
      if(cells){
        this.board[i] = cells[i];
      } else {
        this.board[i] = Cell.EMPTY;
      }
		}
  }
961640
function(){
		var piece = this.getcell_excell(); /* piece : cell or excell */
		if(piece.isnull){ return;}

		var group = piece.group;
		if(group==='excell' || (group==='cell' && piece!==this.cursor.getc())){
			this.setcursor(piece);
		}
		else if(group==='cell'){
			this.input51_main(piece);
		}
	}
110339
function(cells, opt) {

        var preparedCells = joint.util.toArray(cells).map(function(cell) {
            return this._prepareCell(cell, opt);
        }, this);
        this.get('cells').reset(preparedCells, opt);

        return this;
    }
843766
function all(sheet, nodes) {
  var result = []
  var length = nodes.length
  var index = -1

  while (++index < length) {
    result.push(visit(sheet, nodes[index]))
  }

  return result.join('')
}
913639
function() {
			// First deselect everything
			this.el.all('td.selected').removeClass('selected')
			
			for (var i=0,date;date=this.selected[i];i++) {
				var cell = this.el.one('.pane[data-month="' + date.month + '"][data-year="' + date.year + '"] td[data-day="' + date.day + '"]')
				if (cell._node) {
					cell.addClass('selected')
				}
			}
		}
1183631
function (startCell, endCell, callback) {
      var result = {
        index: [], // list of cell index: A1, A2, A3
        value: []  // list of cell value
      };

      var cols = {
        start: 0,
        end: 0
      };

      if (endCell.col >= startCell.col) {
        cols = {
          start: startCell.col,
          end: endCell.col
        };
      } else {
        cols = {
          start: endCell.col,
          end: startCell.col
        };
      }

      var rows = {
        start: 0,
        end: 0
      };

      if (endCell.row >= startCell.row) {
        rows = {
          start: startCell.row,
          end: endCell.row
        };
      } else {
        rows = {
          start: endCell.row,
          end: startCell.row
        };
      }

      for (var column = cols.start; column <= cols.end; column++) {
        for (var row = rows.start; row <= rows.end; row++) {
          var cellIndex = instance.utils.toChar(column) + (row + 1),
              cellValue = instance.helper.cellValue.call(this, cellIndex);

          result.index.push(cellIndex);
          result.value.push(cellValue);
        }
      }

      if (instance.utils.isFunction(callback)) {
        return callback.apply(callback, [result]);
      } else {
        return result;
      }
    }
422125
def merge_all_cells(cells):
    
    current = 0

    while len(cells) > 1:
        count = 0

        while count < len(cells):
            cell1 = cells[current]
            cell2 = cells[count]

            merge_direction = get_merge_direction(cell1, cell2)
            if not merge_direction == "NONE":
                merge_cells(cell1, cell2, merge_direction)

                if current > count:
                    current -= 1

                cells.pop(count)

            else:
                count += 1

        current += 1

        if current >= len(cells):
            current = 0

    return cells[0].text