View | Details | Raw Unified | Return to bug 52745
Collapse All | Expand All

(-)poi-3.8-beta5/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRichTextString.java (-1 / +5 lines)
Lines 194-204 public class XSSFRichTextString implemen Link Here
194
    public void append(String text, XSSFFont font){
194
    public void append(String text, XSSFFont font){
195
        if(st.sizeOfRArray() == 0 && st.isSetT()) {
195
        if(st.sizeOfRArray() == 0 && st.isSetT()) {
196
            //convert <t>string</t> into a text run: <r><t>string</t></r>
196
            //convert <t>string</t> into a text run: <r><t>string</t></r>
197
            st.addNewR().setT(st.getT());
197
            //st.addNewR().setT(st.getT());
198
            CTRElt lt = st.addNewR();
199
            lt.setT(st.getT());
200
            preserveSpaces(lt.xgetT());
198
            st.unsetT();
201
            st.unsetT();
199
        }
202
        }
200
        CTRElt lt = st.addNewR();
203
        CTRElt lt = st.addNewR();
201
        lt.setT(text);
204
        lt.setT(text);
205
        preserveSpaces(lt.xgetT());
202
        CTRPrElt pr = lt.addNewRPr();
206
        CTRPrElt pr = lt.addNewRPr();
203
        if(font != null) setRunAttributes(font.getCTFont(), pr);
207
        if(font != null) setRunAttributes(font.getCTFont(), pr);
204
    }
208
    }

Return to bug 52745