Пример #1
0
 public CellRange normalize(int rowCount, int colCount) {
   boolean rowOnly = isRowsOnly();
   boolean colOnly = isColumnsOnly();
   if (rowOnly || colOnly) {
     CellRange x = new CellRange(m_row1, m_col1, m_row2, m_col2);
     if (rowOnly) {
       x.m_col1 = 1;
       x.m_col2 = colCount;
     }
     if (colOnly) {
       x.m_row1 = 1;
       x.m_row2 = rowCount;
     }
     return x;
   } else {
     return this;
   }
 }