public void addDocPropsExtendedPart() { if (docPropsExtendedPart==null) { try { docPropsExtendedPart = new org.docx4j.openpackaging.parts.DocPropsExtendedPart(); this.addTargetPart(docPropsExtendedPart); docPropsExtendedPart.setJaxbElement(new org.docx4j.docProps.extended.Properties()); } catch (InvalidFormatException e) { //Won't happen, so don't throw log.error(e.getMessage(), e); } } }
/** * @param val * @since 3.3.0 */ public void setDocSecurity(int val) { // See http://webapp.docx4java.org/OnlineDemo/ecma376/SharedML/DocSecurity.html // It is set by Word 2013 restrict editing read only, or comments, to 8. // May also be set by Excel to something other than 0 // for for certain protect sheet, protect workbook values, // but not for the default values, so nothing is implemented in xlsx4j yet if (this.getJaxbElement()==null) { this.setJaxbElement(new Properties()); } this.getJaxbElement().setDocSecurity(val); }
public String xpathGetString(String xpathString, String prefixMappings) throws Docx4JException { Document doc = XmlUtils.marshaltoW3CDomDocument( getJaxbElement(), Context.jcDocPropsExtended ); try { String result; synchronized(xPath) { getNamespaceContext().registerPrefixMappings(prefixMappings); result = xPath.evaluate(xpathString, doc ); } log.debug(xpathString + " ---> " + result); return result; } catch (Exception e) { throw new Docx4JException("Problems evaluating xpath '" + xpathString + "'", e); } } private NamespacePrefixMappings nsContext;
public void init() { setJAXBContext(Context.jcDocPropsExtended); // Used if this Part is added to [Content_Types].xml setContentType(new org.docx4j.openpackaging.contenttype.ContentType( org.docx4j.openpackaging.contenttype.ContentTypes.OFFICEDOCUMENT_EXTENDEDPROPERTIES)); // Used when this Part is added to a rels setRelationshipType(Namespaces.PROPERTIES_EXTENDED); }
public DocPropertyResolver(WordprocessingMLPackage wordMLPackage) { coreProperties = wordMLPackage.getDocPropsCorePart() == null ? null : wordMLPackage.getDocPropsCorePart().getJaxbElement(); extendedProperties = wordMLPackage.getDocPropsExtendedPart() == null ? null : wordMLPackage.getDocPropsExtendedPart().getJaxbElement(); docPropsCustomPart = wordMLPackage.getDocPropsCustomPart(); }
/** * @throws InvalidFormatException */ public DocPropsExtendedPart(PartName partName) throws InvalidFormatException { super(partName); init(); }
/** * Note, this won't create the DocPropsExtendedPart (app.xml) if it doesn't exist * @param val */ protected void setDocSecurity(int val) { if (pkg.getDocPropsExtendedPart()!=null) { pkg.getDocPropsExtendedPart().setDocSecurity(val); } }
public Part CreateDocPropsExtendedPartObject(String partName) throws InvalidFormatException { return new DocPropsExtendedPart(new PartName(partName)); }
&& pkg.getDocPropsExtendedPart().getContents()!=null) { pkg.getDocPropsExtendedPart().getContents().setCompany(null); pkg.getDocPropsExtendedPart().getContents().setManager(null); pkg.getDocPropsExtendedPart().getContents().setHeadingPairs(null);
setJAXBContext(org.docx4j.jaxb.Context.jcDocPropsExtended); Unmarshaller u = jc.createUnmarshaller();
public void init() { setJAXBContext(Context.jcDocPropsExtended); // Used if this Part is added to [Content_Types].xml setContentType(new org.docx4j.openpackaging.contenttype.ContentType( org.docx4j.openpackaging.contenttype.ContentTypes.OFFICEDOCUMENT_EXTENDEDPROPERTIES)); // Used when this Part is added to a rels setRelationshipType(Namespaces.PROPERTIES_EXTENDED); }
Docx4jProperties.getProperties().getProperty("docx4j.App.write", "false")); if (appWrite) { Properties cp = ((DocPropsExtendedPart)part).getJaxbElement();
public DocPropsExtendedPart() throws InvalidFormatException { super(new PartName("/docProps/app.xml")); init(); }
/** * Note, this won't create the DocPropsExtendedPart (app.xml) if it doesn't exist * @param val */ protected void setDocSecurity(int val) { if (pkg.getDocPropsExtendedPart()!=null) { pkg.getDocPropsExtendedPart().setDocSecurity(val); } }
public Part CreateDocPropsExtendedPartObject(String partName) throws InvalidFormatException { return new DocPropsExtendedPart(new PartName(partName)); }
&& pkg.getDocPropsExtendedPart().getContents()!=null) { pkg.getDocPropsExtendedPart().getContents().setCompany(null); pkg.getDocPropsExtendedPart().getContents().setManager(null); pkg.getDocPropsExtendedPart().getContents().setHeadingPairs(null);
setJAXBContext(org.docx4j.jaxb.Context.jcDocPropsExtended); Unmarshaller u = jc.createUnmarshaller();
DocPropsExtendedPart app = new DocPropsExtendedPart(); org.docx4j.docProps.extended.ObjectFactory extFactory = new org.docx4j.docProps.extended.ObjectFactory(); app.setJaxbElement(extFactory.createProperties() ); wmlPack.addTargetPart(app);
/** * @param val * @since 3.3.0 */ public void setDocSecurity(int val) { // See http://webapp.docx4java.org/OnlineDemo/ecma376/SharedML/DocSecurity.html // It is set by Word 2013 restrict editing read only, or comments, to 8. // May also be set by Excel to something other than 0 // for for certain protect sheet, protect workbook values, // but not for the default values, so nothing is implemented in xlsx4j yet if (this.getJaxbElement()==null) { this.setJaxbElement(new Properties()); } this.getJaxbElement().setDocSecurity(val); }
public String xpathGetString(String xpathString, String prefixMappings) throws Docx4JException { Document doc = XmlUtils.marshaltoW3CDomDocument( getJaxbElement(), Context.jcDocPropsExtended ); try { String result; synchronized(xPath) { getNamespaceContext().registerPrefixMappings(prefixMappings); result = xPath.evaluate(xpathString, doc ); } log.debug(xpathString + " ---> " + result); return result; } catch (Exception e) { throw new Docx4JException("Problems evaluating xpath '" + xpathString + "'", e); } } private NamespacePrefixMappings nsContext;