* Adds an empty row after (or before) the given rowNr */
| 153 | * Adds an empty row after (or before) the given rowNr |
| 154 | */ |
| 155 | void CsvTable::addRow(table_index_t rowNr, bool before) { |
| 156 | if( rowNr >= storage.rows() ) |
| 157 | rowNr = storage.rows() - 1; |
| 158 | if( rowNr < 0 ) |
| 159 | rowNr = 0; |
| 160 | |
| 161 | storage.insertRow(rowNr, before); |
| 162 | if( before ) { |
| 163 | moveFlags(rowNr, 1); |
| 164 | } else { |
| 165 | moveFlags(rowNr+1, 1); |
| 166 | } |
| 167 | updateInternals(); |
| 168 | } |
| 169 | |
| 170 | |
| 171 | /** |
no test coverage detected