Skip to content

Minor fixes #330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading