Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximPlusov committed Jun 27, 2024
1 parent dc50699 commit 50962a4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ public void add(TextLine line) {
textLines.add(line);
super.add(line);
}

public void add(List<TextLine> lines) {
for (TextLine line : lines) {
add(line);
}
}

public int getLinesNumber() {
return textLines.size();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class ListInterval {
private List<ListItemInfo> listItemsInfos = new ArrayList<>();
public Integer numberOfColumns;

public ListInterval() {
public ListInterval() {

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ else if (differentLinesProbability >= toColumnsMergeProbability) {
mergeProbability = differentLinesProbability;
TextColumn lastColumn = new TextColumn(currentTextNode.getLastColumn());
TextBlock lastBlock = new TextBlock(lastColumn.getLastTextBlock());
lastBlock.getLines().addAll(lines);
lastBlock.add(lines);
lastColumn.setLastTextBlock(lastBlock);
currentTextNode.setLastColumn(lastColumn);
if (nextTextNode.getColumnsNumber() > 1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class ClusterTableConsumer extends WCAGConsumer {
private final List<Table> tables;
private final List<PDFList> lists;

public ClusterTableConsumer() {
public ClusterTableConsumer() {
tables = new ArrayList<>();
lists = new ArrayList<>();
init();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
import org.verapdf.wcag.algorithms.semanticalgorithms.containers.StaticContainers;
import org.verapdf.wcag.algorithms.semanticalgorithms.utils.WCAGProgressStatus;

import java.util.List;
import java.util.LinkedList;
import java.util.Set;
import java.util.HashSet;
import java.util.*;

public class LinesPreprocessingConsumer extends WCAGConsumer {

Expand All @@ -32,7 +29,7 @@ public void findTableBorders() {
}

private List<TableBorderBuilder> findTableBorders(Integer pageNumber) {
List<TableBorderBuilder> tableBorders = new LinkedList<>();
List<TableBorderBuilder> tableBorders = new ArrayList<>();
Set<LineChunk> set = new HashSet<>(StaticContainers.getLinesCollection().getHorizontalLines(pageNumber));
set.addAll(StaticContainers.getLinesCollection().getVerticalLines(pageNumber));
set.addAll(StaticContainers.getLinesCollection().getSquares(pageNumber));
Expand Down

0 comments on commit 50962a4

Please sign in to comment.