public final class DocumentSettingsPart extends JaxbXmlPartXPathAware<CTSettings>
binderjaxbElement, jc, MAX_BYTES_Unmarshal_ErrorcontentType, partName, relationships| Constructor and Description |
|---|
DocumentSettingsPart() |
DocumentSettingsPart(PartName partName) |
| Modifier and Type | Method and Description |
|---|---|
void |
attachTemplate(String templatePath) |
String |
getMceIgnorable() |
CTCompatSetting |
getWordCompatSetting(String name)
Get a compatibility setting in the Word namespace, by name
|
void |
init() |
boolean |
isRestrictEditingWith(STDocProtect editValue)
Verifies the documentProtection tag inside settings.xml file
if the protection is enforced (w:enforcement="1")
and if the kind of protection equals to passed (STDocProtect.Enum editValue)
|
boolean |
overrideTableStyleFontSizeAndJustification()
Get the value of compatSetting overrideTableStyleFontSizeAndJustification
|
void |
protectRestrictEditing(STDocProtect editValue,
String password,
HashAlgorithm hashAlgo)
Enforces the protection with the option specified by passed editValue, password, and
HashAlgorithm for the password.
|
void |
protectRestrictFormatting(boolean autoFormatOverride,
boolean styleLockTheme,
boolean styleLockQFSet,
String password,
HashAlgorithm hashAlgo)
Restrict allowed formatting to specified styles.
|
void |
removeEnforcement()
Removes protection enforcement.
In the documentProtection tag inside settings.xml file it sets the value of enforcement to "0" (w:enforcement="0") |
protected void |
setMceIgnorable(McIgnorableNamespaceDeclarator namespacePrefixMapper)
Where the mc:Ignorable attribute is present,
ensure its contents matches the ignorable namespaces
actually present.
|
void |
setOverrideTableStyleFontSizeAndJustification(boolean val) |
void |
setWordCompatSetting(String name,
String val) |
boolean |
validateProtectionPassword(String password)
Validates the existing password
|
createBinderAndJaxbElement, getBinder, getJAXBAssociationsForXPath, getJAXBAssociationsForXPath, getJAXBNodesViaXPath, getJAXBNodesViaXPath, setJaxbElement, unmarshal, unmarshaladdMcChoiceNamespace, getContents, getJAXBContext, getJaxbElement, getMcChoiceNamespaces, getXML, isContentEqual, isUnmarshalled, marshal, marshal, marshal, marshal, pipe, pipe, pipe, setContents, setJAXBContext, setJaxbElement, transform, variableReplacegetContentLengthAsLoaded, getOwningRelationshipPart, getPackage, getRelationshipType, getSourceRelationship, getSourceRelationships, getVersion, remove, rename, setContentLengthAsLoaded, setOwningRelationshipPart, setPackage, setPartShortcut, setRelationshipType, setSourceRelationship, setVersionaddTargetPart, addTargetPart, addTargetPart, addTargetPart, getContentType, getPartName, getRelationshipsPart, getRelationshipsPart, getUserData, reset, setContentType, setPartName, setRelationships, setUserDatapublic DocumentSettingsPart(PartName partName) throws InvalidFormatException
InvalidFormatExceptionpublic DocumentSettingsPart()
throws InvalidFormatException
InvalidFormatExceptionpublic void init()
protected void setMceIgnorable(McIgnorableNamespaceDeclarator namespacePrefixMapper)
JaxbXmlPartsetMceIgnorable in class JaxbXmlPart<CTSettings>public String getMceIgnorable()
getMceIgnorable in class JaxbXmlPart<CTSettings>public CTCompatSetting getWordCompatSetting(String name)
name - Docx4JExceptionpublic boolean overrideTableStyleFontSizeAndJustification()
public void setOverrideTableStyleFontSizeAndJustification(boolean val)
public void protectRestrictFormatting(boolean autoFormatOverride,
boolean styleLockTheme,
boolean styleLockQFSet,
String password,
HashAlgorithm hashAlgo)
throws Docx4JException
allowedStyleNames - autoFormatOverride - styleLockTheme - styleLockQFSet - Docx4JExceptionpublic boolean isRestrictEditingWith(STDocProtect editValue)
public void protectRestrictEditing(STDocProtect editValue, String password, HashAlgorithm hashAlgo)
editValue - the protection typepassword - the plaintext password, if null no password will be appliedhashAlgo - the hash algorithm - only md2, m5, sha1, sha256, sha384 and sha512 are supported.
if null, it will default default to sha512 (like Word 2013)public boolean validateProtectionPassword(String password)
password - public void removeEnforcement()
public void attachTemplate(String templatePath)
templatePath - Copyright © 2007-2020. All Rights Reserved.