Author: nick
Date: Fri May 31 17:30:29 2013
New Revision: 1488329

URL: http://svn.apache.org/r1488329
Log:
Fix bug #55001 - check for unicode text too (plus fix indents)

Modified:
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TextShape.java

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TextShape.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TextShape.java?rev=1488329&r1=1488328&r2=1488329&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TextShape.java 
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TextShape.java Fri 
May 31 17:30:29 2013
@@ -486,27 +486,32 @@ public abstract class TextShape extends 
       * @return the TextRun object for this text box
       */
     public TextRun getTextRun(){
-        if (null == this._txtrun) initTextRun();
-        if (null == this._txtrun && null != this._txtbox) {
-               TextHeaderAtom    tha = null; 
-               TextBytesAtom     tba = null;
-               StyleTextPropAtom sta = null;
-               Record[] childRecords = this._txtbox.getChildRecords();
-               for (Record r : childRecords) {
-                       if (r instanceof TextHeaderAtom) {
-                               tha = (TextHeaderAtom) r;
-                               } else if (r instanceof TextBytesAtom) {
-                                       tba = (TextBytesAtom) r;
-                               } else if (r instanceof StyleTextPropAtom) {
-                                       sta = (StyleTextPropAtom) r;
-                               }
-               }
-               if (null != tba) {
-                       this._txtrun = new TextRun(tha, tba, sta);
-               }
-         }
-         return _txtrun;
-     }
+       if (null == this._txtrun) initTextRun();
+       if (null == this._txtrun && null != this._txtbox) {
+          TextHeaderAtom    tha = null; 
+          TextBytesAtom     tba = null;
+          TextCharsAtom     tca = null;
+          StyleTextPropAtom sta = null;
+          Record[] childRecords = this._txtbox.getChildRecords();
+          for (Record r : childRecords) {
+             if (r instanceof TextHeaderAtom) {
+                tha = (TextHeaderAtom) r;
+             } else if (r instanceof TextBytesAtom) {
+                tba = (TextBytesAtom) r;
+             } else if (r instanceof TextCharsAtom) {
+                tca = (TextCharsAtom) r;
+             } else if (r instanceof StyleTextPropAtom) {
+                sta = (StyleTextPropAtom) r;
+             }
+          }
+          if (tba != null) {
+             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) {
         _sheet = sheet;



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to