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; this.words = words;
buildBBox(); buildBBox();
x0 = getPdfMinX(); x0 = getMinX();
y0 = getPdfMinY(); y0 = getMinY();
x1 = getPdfMaxX(); x1 = getMaxX();
y1 = getPdfMaxY(); y1 = getMaxY();
computeFontStyle(); computeFontStyle();
} }

View File

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