Lines 54-59
Link Here
|
54 |
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STLineSpacingRule; |
54 |
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STLineSpacingRule; |
55 |
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STOnOff; |
55 |
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STOnOff; |
56 |
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STTextAlignment; |
56 |
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STTextAlignment; |
|
|
57 |
import org.w3c.dom.Node; |
57 |
import org.w3c.dom.NodeList; |
58 |
import org.w3c.dom.NodeList; |
58 |
import org.w3c.dom.Text; |
59 |
import org.w3c.dom.Text; |
59 |
|
60 |
|
Lines 133-139
Link Here
|
133 |
while (c.toNextSelection()) { |
134 |
while (c.toNextSelection()) { |
134 |
XmlObject o = c.getObject(); |
135 |
XmlObject o = c.getObject(); |
135 |
if (o instanceof CTText) { |
136 |
if (o instanceof CTText) { |
136 |
text.append(((CTText) o).getStringValue()); |
137 |
String tagName = o.getDomNode().getNodeName(); |
|
|
138 |
// field codes (w:instrText, defined in spec sec. 17.16.23) |
139 |
// come up as instances of CTText, but they only |
140 |
// pollute the output |
141 |
if (!tagName.equals("w:instrText")) { |
142 |
text.append(((CTText) o).getStringValue()); |
143 |
} |
137 |
} |
144 |
} |
138 |
if (o instanceof CTPTab) { |
145 |
if (o instanceof CTPTab) { |
139 |
text.append("\t"); |
146 |
text.append("\t"); |