Requires functional XTextViewCursor.
Problem: for multicolumn layout and when viewing pages side-by-side in LO, the (top-down,left-to-right) order interpreted as-on-the-screen: an XTextRange at the top of the second column or second page is sorted before an XTextRange at the bottom of the first column of the first page.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static <T> int | |
| private static com. | findPositionOfTextRange(com.
Location. range,To get the position, we need az XTextViewCursor. It will be moved to the range. cursorGiven a location, return its position: coordinates relative to the top left position of the first page of the document. |
| public static <T> List | Returns: The input, sorted by the elements XTextRange and getIndexInPosition.Sort the input |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| RangeSortVisual | back to summary |
|---|---|
| private RangeSortVisual() | |
| compareTopToBottomLeftToRight | back to summary |
|---|---|
| private static <T> int compareTopToBottomLeftToRight(RangeSortVisual. | |
| findPositionOfTextRange | back to summary |
|---|---|
| private static com. Given a location, return its position: coordinates relative to the top left position of the first page of the document. Note for text layouts with two or more columns, this gives the wrong order: top-down/left-to-right does not match reading order. Note The "relative to the top left position of the first page" is meant "as it appears on the screen". In particular: when viewing pages side-by-side, the top half of the right page is higher than the lower half of the left page. Again, top-down/left-to-right does not match reading order.
| |
| visualSort | back to summary |
|---|---|
| public static <T> List Sort the input
Requires a functional
| |
Comparison is based on (Y,X,indexInPosition): vertical compared first, horizontal second, indexInPosition third.
Used for sorting reference marks by their visual positions.
| Modifier and Type | Field and Description |
|---|---|
| private final T | |
| private final int | |
| private final com. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public T |
| content | back to summary |
|---|---|
| private final T content | |
| indexInPosition | back to summary |
|---|---|
| private final int indexInPosition | |
| position | back to summary |
|---|---|
| private final com. | |
| ComparableMark | back to summary |
|---|---|
| public ComparableMark(com. | |
| getContent | back to summary |
|---|---|
| public T getContent() | |