Paper Office
paper-docxAPI referencestyles.latent

LatentStyles

paper-docx 0.2.0 API reference

Provides access to the default behaviors for latent styles in this document and to the collection of _LatentStyle objects that define overrides of those defaults for a particular named latent style.

Attributes

default_priority

attributedefault_priority

Integer between 0 and 99 inclusive specifying the default sort order for latent styles in style lists and the style gallery.

None if no value is assigned, which causes Word to use the default value 99.

default_to_hidden

attributedefault_to_hidden

Boolean specifying whether the default behavior for latent styles is to be hidden.

A hidden style does not appear in the recommended list or in the style gallery.

default_to_locked

attributedefault_to_locked

Boolean specifying whether the default behavior for latent styles is to be locked.

A locked style does not appear in the styles panel or the style gallery and cannot be applied to document content. This behavior is only active when formatting protection is turned on for the document (via the Developer menu).

default_to_quick_style

attributedefault_to_quick_style

Boolean specifying whether the default behavior for latent styles is to appear in the style gallery when not hidden.

default_to_unhide_when_used

attributedefault_to_unhide_when_used

Boolean specifying whether the default behavior for latent styles is to be unhidden when first applied to content.

element

attributeelement

The lxml element proxied by this object.

load_count

attributeload_count

Integer specifying the number of built-in styles to initialize to the defaults specified in this LatentStyles object.

None if there is no setting in the XML (very uncommon). The default Word 2011 template sets this value to 276, accounting for the built-in styles in Word 2010.

part

attributepartXmlPart

The package part containing this object.

Functions

__getitem__

func__getitem__(key)

Enables dictionary-style access to a latent style by name.

paramkey

__iter__

func__iter__()

__len__

func__len__()

add_latent_style

funcadd_latent_style(name)

Return a newly added _LatentStyle object to override the inherited defaults defined in this latent styles object for the built-in style having name.

paramname

On this page