DispMapSpan.java
1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xfa.text;
import com.adobe.xfa.text.DispLine;
import com.adobe.xfa.text.DispMapItem;
import com.adobe.xfa.text.DispPosn;
import com.adobe.xfa.text.DispRun;
import com.adobe.xfa.text.TextPosn;
class DispMapSpan {
private DispLine mpoLine;
private DispMapItem moItem;
private int mnStart;
DispMapSpan(DispLine poLine) {
this.mpoLine = poLine;
}
DispMapSpan(DispLine poLine, DispMapItem oSource) {
this.mpoLine = poLine;
this.moItem = oSource.cloneMapItem();
}
DispLine getLine() {
return this.mpoLine;
}
int length() {
return this.mpoLine.getCharCount() - this.mnStart;
}
void flush(boolean bForce) {
int nLength = this.length();
if (nLength > 0 || bForce) {
assert (this.moItem != null);
this.moItem.add(this.mpoLine, this.mnStart, nLength);
this.mnStart = this.mpoLine.getCharCount();
}
}
void flush() {
this.flush(false);
}
void reset(DispMapItem oSource, boolean bForce) {
this.flush(bForce);
if (this.moItem == null) {
this.moItem = oSource.cloneMapItem();
} else {
this.moItem.copyFrom(oSource);
}
}
void reset(DispMapItem oSource) {
this.reset(oSource, false);
}
DispPosn p() {
assert (this.moItem instanceof DispPosn);
return (DispPosn)this.moItem;
}
TextPosn pp() {
assert (this.moItem instanceof DispPosn);
DispPosn p = (DispPosn)this.moItem;
return p.pp();
}
DispRun r() {
assert (this.moItem instanceof DispRun);
return (DispRun)this.moItem;
}
void copyFrom(DispMapItem source) {
if (this.moItem == null) {
this.moItem = source.cloneMapItem();
} else {
this.moItem.copyFrom(source);
}
}
}