handle empty strings

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1143012 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sergey Vladimirov 2011-07-05 11:58:50 +00:00
parent 34436d6ec7
commit d24bfcea93

View File

@ -50,8 +50,8 @@ public final class TableRow
Paragraph p = getParagraph(start);
String s = p.text();
while (! ( (s.charAt(s.length() - 1) == TABLE_CELL_MARK) ||
p.isEmbeddedCellMark() && p.getTableLevel() == levelNum))
while (! ( s.length() > 0 && (s.charAt(s.length() - 1) == TABLE_CELL_MARK) ||
p.isEmbeddedCellMark() && p.getTableLevel() == levelNum) && end < endIdx)
{
end++;
p = getParagraph(end);