context: function MoveSelection(forward){  var newRowIndex = curRowIndex;  var newColIndex = curColIndex;  var focusCell;  var inRow = false;  if (SelectedCellsType == SELECT_ROW)  {    newRowIndex += (forward ? 1 : -1);    // Wrap around if before first or after last row    if (newRowIndex < 0)      newRowIndex = lastRowIndex;    else if (newRowIndex > lastRowIndex)      newRowIndex = 0;    inRow = true;    // Use first cell in row for focus cell    newColIndex = 0;  }  else  {    // Cell or column:    if (!forward)      newColIndex--;          if (SelectedCellsType == SELECT_CELL)    {      // Skip to next cell      if (forward)        newColIndex += curColSpan;    }    else  // SELECT_COLUMN    {      // Use first cell in column for focus cell      newRowIndex = 0;      // Don't skip by colspan,      //  but find first cell in next cellmap column      if (forward)        newColIndex++;    }    if (newColIndex < 0)    {      // Request is before the first cell in column      // Wrap to last cell in column      newColIndex = lastColIndex;      if (SelectedCellsType == SELECT_CELL)      {        // If moving by cell, also wrap to previous...        if (newRowIndex > 0)          newRowIndex -= 1;        else          // ...or the last row          newRowIndex = lastRowIndex;                inRow = true;        }    }    else if (newColIndex > lastColIndex)    {      // Request is after the last cell in column      // Wrap to first cell in column      newColIndex = 0;      if (SelectedCellsType == SELECT_CELL)      {        // If moving by cell, also wrap to next...        if (newRowIndex < lastRowIndex)          newRowIndex++;        else          // ...or the first row          newRowIndex = 0;        inRow = true;        }    }  }    // Get the cell at the new location//dump("*** Move from row="+curRowIndex+", col="+curColIndex+" to NewRow="+newRowIndex+", NewCol="+newColIndex+"\n");    do {    if (!GetCellData(newRowIndex, newColIndex))    {      dump("MoveSelection: CELL NOT FOUND\n");      return;    }    if (inRow)    {      if (cellData.startRowIndex == newRowIndex)        break;      else        // Cell spans from a row above, look for the next cell in row        newRowIndex += cellData.actualRowSpan;    }    else    {      if (cellData.startColIndex == newColIndex)        break;      else        // Cell spans from a Col above, look for the next cell in column        newColIndex += cellData.actualColSpan;    }  }  while(true);  // Set cell and other data  CellElement = cellData.cell;  globalTableCell = CellElement.cloneNode(false);  globalElement = globalCellElement;  // Save globals for current cell  curRowIndex = cellData.startRowIndex;  curColIndex = cellData.startColIndex;  curColSpan = cellData.actualColSpan;  if (CellDataChanged && dialog.ApplyBeforeMove.checked)  {dump("Moving selection -- apply attributes...\n");    if (!ValidateCellData())      return;    editorShell.BeginBatchChanges();    // Apply changes to all selected cells    ApplyCellAttributes();    editorShell.EndBatchChanges();    SetCloseButton();  }  // Reinitialize using new cell only if checkbox is not checked  if (!dialog.KeepCurrentData.checked)  {dump("InitCellPanel should be called...\n");    InitCellPanel();    // Uncheck all the checkboxes used from last selection?  }  // Change the selection  DoCellSelection();}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/5986ab59396a3071965154ed4499fa5a734750cd/EdTableProps.js/clean/editor/ui/dialogs/content/EdTableProps.js