mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-06 03:50:19 +02:00
code cleanup
This commit is contained in:
parent
fe988f8419
commit
9f30c9a1a7
1 changed files with 6 additions and 5 deletions
|
@ -320,9 +320,10 @@ public abstract class ZLTextView extends ZLTextViewBase {
|
||||||
selectedElementRegion.draw(context);
|
selectedElementRegion.draw(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mySelection.isEmpty() && !page.TextElementMap.isEmpty()) {
|
final ZLTextElementAreaVector vector = page.TextElementMap;
|
||||||
final ZLTextElementArea firstArea = page.TextElementMap.get(0);
|
if (!mySelection.isEmpty() && !vector.isEmpty()) {
|
||||||
final ZLTextElementArea lastArea = page.TextElementMap.get(page.TextElementMap.size() - 1);
|
final ZLTextElementArea firstArea = vector.get(0);
|
||||||
|
final ZLTextElementArea lastArea = vector.get(vector.size() - 1);
|
||||||
final ZLTextElementArea selectionStartArea = mySelection.getStartArea();
|
final ZLTextElementArea selectionStartArea = mySelection.getStartArea();
|
||||||
final ZLTextElementArea selectionEndArea = mySelection.getEndArea();
|
final ZLTextElementArea selectionEndArea = mySelection.getEndArea();
|
||||||
|
|
||||||
|
@ -1326,7 +1327,7 @@ public abstract class ZLTextView extends ZLTextViewBase {
|
||||||
|
|
||||||
public int getSelectionStartY() {
|
public int getSelectionStartY() {
|
||||||
final ZLTextElementAreaVector vector = myCurrentPage.TextElementMap;
|
final ZLTextElementAreaVector vector = myCurrentPage.TextElementMap;
|
||||||
if (vector.isEmpty()) {
|
if (mySelection.isEmpty() || vector.isEmpty()) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
final ZLTextElementArea selectionStartArea = mySelection.getStartArea();
|
final ZLTextElementArea selectionStartArea = mySelection.getStartArea();
|
||||||
|
@ -1343,7 +1344,7 @@ public abstract class ZLTextView extends ZLTextViewBase {
|
||||||
|
|
||||||
public int getSelectionEndY() {
|
public int getSelectionEndY() {
|
||||||
final ZLTextElementAreaVector vector = myCurrentPage.TextElementMap;
|
final ZLTextElementAreaVector vector = myCurrentPage.TextElementMap;
|
||||||
if (vector.isEmpty()) {
|
if (mySelection.isEmpty() || vector.isEmpty()) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
final ZLTextElementArea selectionEndArea = mySelection.getEndArea();
|
final ZLTextElementArea selectionEndArea = mySelection.getEndArea();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue