RED-10249: regex found incorrectly due to wrong text sorting
This commit is contained in:
parent
ca2f3512d2
commit
124afb3623
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user