fixes for article

git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353571 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Said Ryan Ackley 2004-07-11 04:38:32 +00:00
parent f94e9f9505
commit 0f6869f71f
3 changed files with 9 additions and 4 deletions

View File

@ -336,7 +336,7 @@ public class Range
int insertIndex = _end - tp.getStart(); int insertIndex = _end - tp.getStart();
if (tp.getStringBuffer().charAt(_end - 1) == '\r') if (tp.getStringBuffer().charAt(_end - 1) == '\r' && text.charAt(0) != '\u0007')
{ {
insertIndex--; insertIndex--;
} }

View File

@ -14,7 +14,7 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==================================================================== */ ==================================================================== */
package org.apache.poi.hwpf.usermodel; package org.apache.poi.hwpf.usermodel;
@ -37,6 +37,11 @@ public class Section
return TYPE_SECTION; return TYPE_SECTION;
} }
public int getNumColumns()
{
return _props.getCcolM1() + 1;
}
public Object clone() public Object clone()
throws CloneNotSupportedException throws CloneNotSupportedException
{ {

View File

@ -14,7 +14,7 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==================================================================== */ ==================================================================== */
package org.apache.poi.hwpf.usermodel; package org.apache.poi.hwpf.usermodel;
import java.util.ArrayList; import java.util.ArrayList;
@ -36,12 +36,12 @@ public class Table
while (rowEnd < numParagraphs) while (rowEnd < numParagraphs)
{ {
Paragraph p = getParagraph(rowEnd); Paragraph p = getParagraph(rowEnd);
rowEnd++;
if (p.isTableRowEnd() && p.getTableLevel() == levelNum) if (p.isTableRowEnd() && p.getTableLevel() == levelNum)
{ {
_rows.add(new TableRow(rowStart, rowEnd, this, levelNum)); _rows.add(new TableRow(rowStart, rowEnd, this, levelNum));
rowStart = rowEnd; rowStart = rowEnd;
} }
rowEnd++;
} }
} }