public final class StyleDefinitionsPart extends JaxbXmlPartXPathAware<Styles>
Modifier and Type | Field and Description |
---|---|
static String |
docDefaultsString |
static String |
pPrDefaultsString |
static String |
rPrDefaultsString |
binder
jaxbElement, jc, MAX_BYTES_Unmarshal_Error
contentType, partName, relationships
Constructor and Description |
---|
StyleDefinitionsPart() |
StyleDefinitionsPart(PartName partName) |
Modifier and Type | Method and Description |
---|---|
String |
getCss() |
Style |
getDefaultCharacterStyle() |
Style |
getDefaultParagraphStyle()
if this returns null; invoke createVirtualStylesForDocDefaults() @since 3.2.0 then try again
|
Style |
getDefaultTableStyle() |
String |
getIDForStyleName(String name)
Given the name of a style known in this part, return the corresponding style ID.
|
static Map<String,Style> |
getKnownStyles()
Returns a map of styles defined in docx4j's KnownStyles.xml
(not styles defined in your pkg)
|
Style |
getLinkedStyle(String rStyleVal)
For a run/character style return its linked paragraph style (if any),
or vice versa.
|
String |
getMceIgnorable() |
String |
getNameForStyleID(String id)
Given the ID of a style known in this part, return the corresponding style name.
|
Style |
getStyleById(String id) |
void |
init() |
void |
protectRestrictFormatting(List<String> allowedStyleNames,
boolean removedNotAllowedFormatting,
Set<String> stylesInUse)
Restrict allowed formatting to specified styles.
|
void |
refreshNameIdBiMaps()
Refresh the style name - ID bimaps, based on styles currently defined in this part.
|
void |
setCss(String css) |
void |
setJaxbElement(Styles jaxbElement)
You can't use this override to create/update a binder, since this would set the
jaxbElement field to something different to the object being passed in
(as a consequence of the process to create a binder).
|
protected void |
setMceIgnorable(McIgnorableNamespaceDeclarator namespacePrefixMapper)
Where the mc:Ignorable attribute is present,
ensure its contents matches the ignorable namespaces
actually present.
|
Object |
unmarshalDefaultStyles()
Unmarshal a default set of styles, useful when creating this
part from scratch.
|
createBinderAndJaxbElement, getBinder, getJAXBAssociationsForXPath, getJAXBAssociationsForXPath, getJAXBNodesViaXPath, getJAXBNodesViaXPath, unmarshal, unmarshal
addMcChoiceNamespace, getContents, getJAXBContext, getJaxbElement, getMcChoiceNamespaces, getXML, isContentEqual, isUnmarshalled, marshal, marshal, marshal, marshal, pipe, pipe, pipe, setContents, setJAXBContext, setJaxbElement, transform, variableReplace
getContentLengthAsLoaded, getOwningRelationshipPart, getPackage, getRelationshipType, getSourceRelationship, getSourceRelationships, getVersion, remove, rename, setContentLengthAsLoaded, setOwningRelationshipPart, setPackage, setPartShortcut, setRelationshipType, setSourceRelationship, setVersion
addTargetPart, addTargetPart, addTargetPart, addTargetPart, getContentType, getPartName, getRelationshipsPart, getRelationshipsPart, getUserData, reset, setContentType, setPartName, setRelationships, setUserData
public static final String rPrDefaultsString
public static final String pPrDefaultsString
public static final String docDefaultsString
public StyleDefinitionsPart(PartName partName) throws InvalidFormatException
InvalidFormatException
public StyleDefinitionsPart() throws InvalidFormatException
InvalidFormatException
public void init()
protected void setMceIgnorable(McIgnorableNamespaceDeclarator namespacePrefixMapper)
JaxbXmlPart
setMceIgnorable
in class JaxbXmlPart<Styles>
public String getMceIgnorable()
getMceIgnorable
in class JaxbXmlPart<Styles>
public void setJaxbElement(Styles jaxbElement)
JaxbXmlPartXPathAware
setJaxbElement
in class JaxbXmlPartXPathAware<Styles>
public Object unmarshalDefaultStyles() throws JAXBException
JAXBException
- If any unexpected errors occur while unmarshallingpublic static Map<String,Style> getKnownStyles()
public Style getDefaultCharacterStyle()
public Style getDefaultParagraphStyle()
public Style getDefaultTableStyle()
public String getCss()
public void setCss(String css)
public Style getLinkedStyle(String rStyleVal)
rStyleVal
- public void protectRestrictFormatting(List<String> allowedStyleNames, boolean removedNotAllowedFormatting, Set<String> stylesInUse) throws Docx4JException
allowedStyleNames
- Docx4JException
public String getNameForStyleID(String id)
id
- public String getIDForStyleName(String name)
name
- public void refreshNameIdBiMaps()
Copyright © 2007-2019. All Rights Reserved.