Skip to content

Commit 0626cd4

Browse files
committed
Do row adding in bulk
DEVSIX-8836
1 parent 7145131 commit 0626cd4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

layout/src/main/java/com/itextpdf/layout/tagging/TableTaggingRule.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ public boolean onTagFinish(LayoutTaggingHelper taggingHelper, TaggingHintKey tab
8686
taggingHelper.moveKidHint(nonCellKid, tableHintKey);
8787
}
8888
}
89+
List<TaggingDummyElement> rows = new ArrayList<>();
8990
for (TreeMap<Integer, TaggingHintKey> rowTags : tableTags.values()) {
9091
TaggingDummyElement row = new TaggingDummyElement(StandardRoles.TR);
9192
TaggingHintKey rowTagHint = LayoutTaggingHelper.getOrCreateHintKey(row);
@@ -98,8 +99,9 @@ public boolean onTagFinish(LayoutTaggingHelper taggingHelper, TaggingHintKey tab
9899
}
99100
tableCellTagsUnindexed = null;
100101
}
101-
taggingHelper.addKidsHint(tbodyTag, Collections.<TaggingDummyElement>singletonList(row), -1);
102+
rows.add(row);
102103
}
104+
taggingHelper.addKidsHint(tbodyTag, rows, -1);
103105

104106
for (TaggingHintKey nonCellKid : nonCellKids) {
105107
if (StandardRoles.CAPTION.equals(getKidRole(nonCellKid,taggingHelper))) {

0 commit comments

Comments
 (0)