ddn.odf.settings

ODF document settings support.

Parses and serializes the settings.xml stream inside an ODF package. Represents configuration item sets, typed values, view settings, and preserves unknown settings losslessly.

Types 4

Discriminant for the ODF config:type attribute.

STRING
INT
DOUBLE
BOOLEAN
LONG

A single <config:config-item> entry with name, raw value, and declared type.

Fields
string name
string value
Methods
ConfigItemType parseType(string t) @safe pure nothrowMaps an ODF type string to a ConfigItemType value.
string typeString() const @safe pure nothrowReturns the ODF type attribute string for this item.

A <config:config-item-set> containing items and optional nested sets.

Fields
string name
ConfigItem[] items
ConfigItemSet[] nestedSets

Top-level representation of settings.xml inside an ODF package.

Fields
string odfVersion
ConfigItemSet[] itemSets

Functions 8

fnOdfSettings parseSettings(const(ubyte)[] xmlBytes)Parses settings from raw `settings.xml` bytes.
fnOdfSettings parseSettingsString(string xml)Parses settings from an XML string.
fnstring serializeSettings(const ref OdfSettings settings)Serializes settings to an XML string for `settings.xml`.
fnconst(ConfigItemSet) * findItemSet(const ref OdfSettings settings, string name)Finds a config item set by name.
fnconst(ConfigItem) * findItem(const ref OdfSettings settings, string setName, string itemName)Finds a config item by set name and item name.
fnvoid parseSettingsElement(XmlElement settingsElem, ref OdfSettings settings)
fnvoid serializeItemSet(XmlElement parent, ref const ConfigItemSet set)