return null;
}
private void handleSdt(Object o) {
SdtElement sdt = (SdtElement)o;
SdtPr sdtPr = sdt.getSdtPr();
Tag tag = sdtPr.getTag();
HashMap<String, String> map = null;
if (tag!=null) {
map = QueryString.parseQueryString(
tag.getVal(), true);
}
SdtPr.Picture pic = getPicture(sdtPr);
if (sdtPr.getDataBinding()!=null && pic!=null) {
Object sdtParent = ((Child)o).getParent();
sdt.getSdtContent().getContent().clear();
sdt.getSdtContent().getContent().add(
this.xpathInjectImage(
(WordprocessingMLPackage)pkg, part,
sdtPr.getDataBinding(), sdt,
sdtParent));
// TODO v3 XSLT approach
// .. if the sdt contains a template picture,
// find its a:blip, and just replace that.
} else if (map!=null && map.containsKey(OpenDoPEHandler.BINDING_CONTENTTYPE)
&& map.get(OpenDoPEHandler.BINDING_CONTENTTYPE).equals("application/xhtml+xml")) {
// Convert XHTML.
log.error("TODO: add HTML import support");
} else if (map!=null && map.containsKey(OpenDoPEHandler.BINDING_ROLE_CONDITIONAL) ) {
// Do nothing
} else if (map!=null && map.containsKey(OpenDoPEHandler.BINDING_RESULT_RPTD) ) {
// Do nothing
} else if (map!=null && map.containsKey(OpenDoPEHandler.BINDING_ROLE_RPT_POS_CON) ) {
// This may be tricky to do here ..
} else if (map!=null && map.containsKey(OpenDoPEHandler.BINDING_ROLE_XPATH) ) {
boolean isMultiline = isMultiline(sdtPr);
sdt.getSdtContent().getContent().clear();
sdt.getSdtContent().getContent().addAll(
this.xpathGenerateRuns(
(WordprocessingMLPackage)pkg, part,
sdtPr,
sdtPr.getDataBinding(),
//sdtParent, contentChild,
null, isMultiline));
} else if (sdtPr.getDataBinding()!=null && !isRichText(sdtPr) ) {
// TODO and not(w:sdtPr/w:docPartGallery)
// .. but which is that?
//@XmlElementRef(name = "docPartList", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
//@XmlElementRef(name = "docPartObj", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
sdt.getSdtContent().getContent().clear();
sdt.getSdtContent().getContent().addAll(
this.xpathGenerateRuns(
(WordprocessingMLPackage)pkg, part,
sdtPr,
sdtPr.getDataBinding(),
//sdtParent, contentChild,