@Override public XSLFPictureShape getFallbackPicture() { String xquery = "declare namespace p='http://schemas.openxmlformats.org/presentationml/2006/main'; " + "declare namespace mc='http://schemas.openxmlformats.org/markup-compatibility/2006' " + ".//mc:Fallback/*/p:pic" ; XmlObject xo = selectProperty(XmlObject.class, xquery); if (xo == null) { return null; } CTGroupShape gs; try { gs = CTGroupShape.Factory.parse(xo.newDomNode()); } catch (XmlException e) { LOG.log(POILogger.WARN, "Can't parse fallback picture stream of graphical frame", e); return null; } if (gs.sizeOfPicArray() == 0) { return null; } return new XSLFPictureShape(gs.getPicArray(0), getSheet()); } }
public Node newDomNode() { return underlyingXmlObject().newDomNode(); }
public Node newDomNode(XmlOptions options) { return underlyingXmlObject().newDomNode(options); }
public static Element translate(XmlObject o) { org.w3c.Document docOld = (org.w3c.dom.Document) o.newDomNode(); nu.xom.Document docNew = DOMConverter.convert(docOld); return docNew.getRootElement(); }
@Override protected void marshalDomNode(Object graph, Node node) throws XmlMappingException { Document document = (node.getNodeType() == Node.DOCUMENT_NODE ? (Document) node : node.getOwnerDocument()); Node xmlBeansNode = ((XmlObject) graph).newDomNode(getXmlOptions()); NodeList xmlBeansChildNodes = xmlBeansNode.getChildNodes(); for (int i = 0; i < xmlBeansChildNodes.getLength(); i++) { Node xmlBeansChildNode = xmlBeansChildNodes.item(i); Node importedNode = document.importNode(xmlBeansChildNode, true); node.appendChild(importedNode); } }
protected final void marshalDomNode(Object graph, Node node) throws XmlMappingException { Document document = node.getNodeType() == Node.DOCUMENT_NODE ? (Document) node : node.getOwnerDocument(); Node xmlBeansNode = ((XmlObject) graph).newDomNode(getXmlOptions()); NodeList xmlBeansChildNodes = xmlBeansNode.getChildNodes(); for (int i = 0; i < xmlBeansChildNodes.getLength(); i++) { Node xmlBeansChildNode = xmlBeansChildNodes.item(i); Node importedNode = document.importNode(xmlBeansChildNode, true); node.appendChild(importedNode); } }
public Node newDomNode(XmlOptions options) { return underlyingXmlObject().newDomNode(options); }
public Node newDomNode(XmlOptions options) { return underlyingXmlObject().newDomNode(options); }
public Node newDomNode() { return underlyingXmlObject().newDomNode(); }
public Node newDomNode() { return underlyingXmlObject().newDomNode(); }
if (Boolean.valueOf((String) context.getContextualProperty(XMLBEANS_NAMESPACE_HACK)).booleanValue()) Object o = obj.newDomNode(); if (o instanceof Document)
@Override public XSLFPictureShape getFallbackPicture() { String xquery = "declare namespace p='http://schemas.openxmlformats.org/presentationml/2006/main'; " + "declare namespace mc='http://schemas.openxmlformats.org/markup-compatibility/2006' " + ".//mc:Fallback/*/p:pic" ; XmlObject xo = selectProperty(XmlObject.class, xquery); if (xo == null) { return null; } CTGroupShape gs; try { gs = CTGroupShape.Factory.parse(xo.newDomNode()); } catch (XmlException e) { LOG.log(POILogger.WARN, "Can't parse fallback picture stream of graphical frame", e); return null; } if (gs.sizeOfPicArray() == 0) { return null; } return new XSLFPictureShape(gs.getPicArray(0), getSheet()); } }