Fix bug #55001 - check for unicode text too (plus fix indents)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1488329 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bf581e03b9
commit
17cb45f1bf
@ -486,27 +486,32 @@ public abstract class TextShape extends SimpleShape {
|
|||||||
* @return the TextRun object for this text box
|
* @return the TextRun object for this text box
|
||||||
*/
|
*/
|
||||||
public TextRun getTextRun(){
|
public TextRun getTextRun(){
|
||||||
if (null == this._txtrun) initTextRun();
|
if (null == this._txtrun) initTextRun();
|
||||||
if (null == this._txtrun && null != this._txtbox) {
|
if (null == this._txtrun && null != this._txtbox) {
|
||||||
TextHeaderAtom tha = null;
|
TextHeaderAtom tha = null;
|
||||||
TextBytesAtom tba = null;
|
TextBytesAtom tba = null;
|
||||||
StyleTextPropAtom sta = null;
|
TextCharsAtom tca = null;
|
||||||
Record[] childRecords = this._txtbox.getChildRecords();
|
StyleTextPropAtom sta = null;
|
||||||
for (Record r : childRecords) {
|
Record[] childRecords = this._txtbox.getChildRecords();
|
||||||
if (r instanceof TextHeaderAtom) {
|
for (Record r : childRecords) {
|
||||||
tha = (TextHeaderAtom) r;
|
if (r instanceof TextHeaderAtom) {
|
||||||
} else if (r instanceof TextBytesAtom) {
|
tha = (TextHeaderAtom) r;
|
||||||
tba = (TextBytesAtom) r;
|
} else if (r instanceof TextBytesAtom) {
|
||||||
} else if (r instanceof StyleTextPropAtom) {
|
tba = (TextBytesAtom) r;
|
||||||
sta = (StyleTextPropAtom) r;
|
} else if (r instanceof TextCharsAtom) {
|
||||||
}
|
tca = (TextCharsAtom) r;
|
||||||
}
|
} else if (r instanceof StyleTextPropAtom) {
|
||||||
if (null != tba) {
|
sta = (StyleTextPropAtom) r;
|
||||||
this._txtrun = new TextRun(tha, tba, sta);
|
}
|
||||||
}
|
}
|
||||||
}
|
if (tba != null) {
|
||||||
return _txtrun;
|
this._txtrun = new TextRun(tha, tba, sta);
|
||||||
}
|
} else if (tca != null) {
|
||||||
|
this._txtrun = new TextRun(tha, tca, sta);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return _txtrun;
|
||||||
|
}
|
||||||
|
|
||||||
public void setSheet(Sheet sheet) {
|
public void setSheet(Sheet sheet) {
|
||||||
_sheet = sheet;
|
_sheet = sheet;
|
||||||
|
Loading…
Reference in New Issue
Block a user