224 | | if ( link.result.getLength() != 3 ) |
225 | | ui_error( "the setting supposed to represent a matrix element has wrong syntax", link.result ); |
226 | | |
227 | | Setting &rows_setting = link.result[0]; |
228 | | Setting &cols_setting = link.result[1]; |
229 | | Setting &elements = link.result[2]; |
| 224 | int data_offset; |
| 225 | |
| 226 | if ( link.result.getLength() == 3 ) |
| 227 | data_offset = 0; |
| 228 | else if ( link.result.getLength() == 4 ) |
| 229 | { |
| 230 | ASSERT_UITYPE(link.result[0],TypeString); |
| 231 | if( link.result[0] != "matrix" ) |
| 232 | ui_error( "the setting supposed to represent a matrix element has wrong syntax", link.result ); |
| 233 | |
| 234 | data_offset = 1; |
| 235 | } |
| 236 | else |
| 237 | ui_error( "the setting supposed to represent a matrix element has wrong syntax", link.result ); |
| 238 | |
| 239 | Setting &rows_setting = link.result[0 + data_offset]; |
| 240 | Setting &cols_setting = link.result[1 + data_offset]; |
| 241 | Setting &elements = link.result[2 + data_offset]; |