// table open line never has cells
return -1;
} else {
Matcher newRowMatcher = newRowPattern.matcher(line);
if (newRowMatcher.matches()) {
TableRowAttributes attributes = new TableRowAttributes();
String newRowOptions = newRowMatcher.group(1);
if (newRowOptions != null) {
Matcher optionsMatcher = optionsPattern.matcher(newRowOptions);
while (optionsMatcher.find()) {
String optionName = optionsMatcher.group(1);
String optionValue = optionsMatcher.group(2);
if (optionName.equalsIgnoreCase("id")) {
attributes.setId(optionValue);
} else if (optionName.equalsIgnoreCase("style")) {
attributes.setCssStyle(optionValue);
} else if (optionName.equalsIgnoreCase("class")) {
attributes.setCssClass(optionValue);
} else if (optionName.equalsIgnoreCase("title")) {
attributes.setTitle(optionValue);
} else if (optionName.equalsIgnoreCase("align")) {
attributes.setAlign(optionValue);
} else if (optionName.equalsIgnoreCase("valign")) {
attributes.setValign(optionValue);
} else if (optionName.equalsIgnoreCase("bgcolor")) {
attributes.setBgcolor(optionValue);
}
}
}
openRow(newRowMatcher.start(),attributes);
return -1;