Lines 26-31
Link Here
|
26 |
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSdtBlock; |
26 |
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSdtBlock; |
27 |
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSdtContentBlock; |
27 |
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSdtContentBlock; |
28 |
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSdtContentRun; |
28 |
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSdtContentRun; |
|
|
29 |
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSdtRun; |
29 |
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl; |
30 |
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl; |
30 |
|
31 |
|
31 |
/** |
32 |
/** |
Lines 50-60
Link Here
|
50 |
if (sdtRun == null) { |
51 |
if (sdtRun == null) { |
51 |
return; |
52 |
return; |
52 |
} |
53 |
} |
53 |
for (CTR ctr : sdtRun.getRArray()) { |
54 |
XmlCursor cursor = sdtRun.newCursor(); |
54 |
XWPFRun run = new XWPFRun(ctr, parent); |
55 |
cursor.selectPath("./*"); |
55 |
// runs.add(run); |
56 |
while (cursor.toNextSelection()) { |
56 |
bodyElements.add(run); |
57 |
XmlObject o = cursor.getObject(); |
|
|
58 |
if (o instanceof CTR) { |
59 |
XWPFRun run = new XWPFRun((CTR) o, parent); |
60 |
bodyElements.add(run); |
61 |
} else if (o instanceof CTSdtRun) { |
62 |
XWPFSDT c = new XWPFSDT(((CTSdtRun) o), part); |
63 |
bodyElements.add(c); |
64 |
} |
57 |
} |
65 |
} |
|
|
66 |
cursor.dispose(); |
58 |
} |
67 |
} |
59 |
|
68 |
|
60 |
public XWPFSDTContent(CTSdtContentBlock block, IBody part, IRunBody parent) { |
69 |
public XWPFSDTContent(CTSdtContentBlock block, IBody part, IRunBody parent) { |