RED-10249: regex found incorrectly due to wrong text sorting

This commit is contained in:
Kilian Schuettler 2024-11-04 12:39:17 +01:00
parent ca2f3512d2
commit 124afb3623
2 changed files with 4 additions and 5 deletions

View File

@ -82,10 +82,10 @@ public class Line extends TextBoundingBox {
this.words = words;
buildBBox();
x0 = getPdfMinX();
y0 = getPdfMinY();
x1 = getPdfMaxX();
y1 = getPdfMaxY();
x0 = getMinX();
y0 = getMinY();
x1 = getMaxX();
y1 = getMaxY();
computeFontStyle();
}

View File

@ -18,7 +18,6 @@ public class Zone extends TextBoundingBox {
@SuppressWarnings("PMD.ConstructorCallsOverridableMethod")
public Zone(List<Line> lines) {
lines.sort(Comparator.comparingDouble(Line::getY0));
this.lines = lines;
setToBBoxOfComponents(lines);
}