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

(-)src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java (+4 lines)
Lines 44-49 Link Here
44
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRunTrackChange;
44
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRunTrackChange;
45
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSdtContentRun;
45
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSdtContentRun;
46
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSdtRun;
46
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSdtRun;
47
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSimpleField;
47
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSpacing;
48
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSpacing;
48
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTString;
49
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTString;
49
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl;
50
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl;
Lines 123-128 Link Here
123
      for (CTRunTrackChange c : paragraph.getInsArray()) {
124
      for (CTRunTrackChange c : paragraph.getInsArray()) {
124
          rs.addAll( Arrays.asList(c.getRArray()) );
125
          rs.addAll( Arrays.asList(c.getRArray()) );
125
      }
126
      }
127
      for (CTSimpleField f : paragraph.getFldSimpleArray()) {
128
    	  rs.addAll( Arrays.asList(f.getRArray()) );
129
      }
126
130
127
      // Get text of the paragraph
131
      // Get text of the paragraph
128
      for (int j = 0; j < rs.size(); j++) {
132
      for (int j = 0; j < rs.size(); j++) {
(-)src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java (+12 lines)
Lines 237-240 Link Here
237
       // Now check the first paragraph in total
237
       // Now check the first paragraph in total
238
       assertTrue(extractor.getText().contains("a\tb\n"));
238
       assertTrue(extractor.getText().contains("a\tb\n"));
239
    }
239
    }
240
    
241
    /**
242
     * The output should contain the values of simple fields, those specified
243
     * with the fldSimple element (spec sec. 17.16.19)
244
     */
245
    public void testFldSimpleContent() {
246
        XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("FldSimple.docx");
247
        XWPFWordExtractor extractor = new XWPFWordExtractor(doc);
248
        String text = extractor.getText();
249
        assertTrue(text.length() > 0);
250
        assertTrue(text.contains("FldSimple.docx"));
251
    }
240
}
252
}

Return to bug 49455