Remove unnecessary casts
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1649310 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8edf70ec8f
commit
71cf9cd8c3
@ -138,8 +138,8 @@ public final class TextRun
|
|||||||
// Build one for each run with the same style
|
// Build one for each run with the same style
|
||||||
while(pos <= runRawText.length() && curP < pStyles.size() && curC < cStyles.size()) {
|
while(pos <= runRawText.length() && curP < pStyles.size() && curC < cStyles.size()) {
|
||||||
// Get the Props to use
|
// Get the Props to use
|
||||||
TextPropCollection pProps = (TextPropCollection)pStyles.get(curP);
|
TextPropCollection pProps = pStyles.get(curP);
|
||||||
TextPropCollection cProps = (TextPropCollection)cStyles.get(curC);
|
TextPropCollection cProps = cStyles.get(curC);
|
||||||
|
|
||||||
int pLen = pProps.getCharactersCovered();
|
int pLen = pProps.getCharactersCovered();
|
||||||
int cLen = cProps.getCharactersCovered();
|
int cLen = cProps.getCharactersCovered();
|
||||||
@ -291,15 +291,13 @@ public final class TextRun
|
|||||||
int pOverRun = _styleAtom.getParagraphTextLengthCovered() - oldSize;
|
int pOverRun = _styleAtom.getParagraphTextLengthCovered() - oldSize;
|
||||||
int cOverRun = _styleAtom.getCharacterTextLengthCovered() - oldSize;
|
int cOverRun = _styleAtom.getCharacterTextLengthCovered() - oldSize;
|
||||||
if(pOverRun > 0) {
|
if(pOverRun > 0) {
|
||||||
TextPropCollection tpc = (TextPropCollection)
|
TextPropCollection tpc = _styleAtom.getParagraphStyles().getLast();
|
||||||
_styleAtom.getParagraphStyles().getLast();
|
|
||||||
tpc.updateTextSize(
|
tpc.updateTextSize(
|
||||||
tpc.getCharactersCovered() - pOverRun
|
tpc.getCharactersCovered() - pOverRun
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if(cOverRun > 0) {
|
if(cOverRun > 0) {
|
||||||
TextPropCollection tpc = (TextPropCollection)
|
TextPropCollection tpc = _styleAtom.getCharacterStyles().getLast();
|
||||||
_styleAtom.getCharacterStyles().getLast();
|
|
||||||
tpc.updateTextSize(
|
tpc.updateTextSize(
|
||||||
tpc.getCharactersCovered() - cOverRun
|
tpc.getCharactersCovered() - cOverRun
|
||||||
);
|
);
|
||||||
@ -540,8 +538,8 @@ public final class TextRun
|
|||||||
}
|
}
|
||||||
// These are the only styles for now
|
// These are the only styles for now
|
||||||
_rtRuns[0].supplyTextProps(
|
_rtRuns[0].supplyTextProps(
|
||||||
(TextPropCollection)_styleAtom.getParagraphStyles().get(0),
|
_styleAtom.getParagraphStyles().get(0),
|
||||||
(TextPropCollection)_styleAtom.getCharacterStyles().get(0),
|
_styleAtom.getCharacterStyles().get(0),
|
||||||
false,
|
false,
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user