LayOut C API

- Main Page
- Related Pages
- Data Structures
- Files

- Data Structures
- Data Structure Index
- Data Fields

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Related Functions
LODocumentRef Struct Reference

References a LayOut document. More...

`#include <document.h>`

## Related Functions
(Note that these are not member functions.)
LO_RESULT | LODocumentCreateAttributeDictionaryCopy (LODocumentRef document, const char *dictionary_name, LODictionaryRef *dictionary)
| Gets a copy of an attribute dictionary with the given name from a document. More...
LO_RESULT | LODocumentSetAttribute (LODocumentRef document, const char *dictionary_name, const char *key, LOTypedValueRef value_in)
| Sets an attribute to a given dictionary belonging to a document. More...
LO_RESULT | LODocumentGetAttribute (LODocumentRef document, const char *dictionary_name, const char *key, LOTypedValueRef value_out)
| Gets an attribute from a given dictionary belonging to a document. More...
LO_RESULT | LODocumentDeleteAttribute (LODocumentRef document, const char *dictionary_name, const char *key)
| Removes an attribute from a given dictionary belonging to a Document. If key is nullptr, then the entire dictionary will be removed from the Document. More...

## Detailed Description

References a LayOut document.

## Friends And Related Function Documentation

LO_RESULT LODocumentCreateAttributeDictionaryCopy | ( | LODocumentRef | document,
|  | const char * | dictionary_name,
|  | LODictionaryRef * | dictionary
| ) |  |
| related

Gets a copy of an attribute dictionary with the given name from a document.

Since
  LayOut 2026.0, API 11.0

Parameters

  [in] | document | The document object.
  [in] | dictionary_name | The name of the attribute dictionary object to retrieve.
  [out] | dictionary | The attribute dictionary object.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `document` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_INPUT if `dictionary_name` is NULL
  - SU_ERROR_NULL_POINTER_OUTPUT if `dictionary` is NULL
  - SU_ERROR_NO_DATA if `document` does not have an attribute dictionary with the given name

LO_RESULT LODocumentDeleteAttribute | ( | LODocumentRef | document,
|  | const char * | dictionary_name,
|  | const char * | key
| ) |  |
| related

Removes an attribute from a given dictionary belonging to a Document. If key is nullptr, then the entire dictionary will be removed from the Document.

Since
  LayOut 2026.0, API 11.0

Parameters

  [in] | document | The document object.
  [in] | dictionary_name | The name of the attribute dictionary object to remove.
  [in] | key | The key to remove from the attribute dictionary.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `document` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_INPUT if `dictionary_name` is NULL

LO_RESULT LODocumentGetAttribute | ( | LODocumentRef | document,
|  | const char * | dictionary_name,
|  | const char * | key,
|  | LOTypedValueRef | value_out
| ) |  |
| related

Gets an attribute from a given dictionary belonging to a document.

Since
  LayOut 2026.0, API 11.0

Parameters

  [in] | document | The document object.
  [in] | dictionary_name | The name of the attribute dictionary object to retrieve the value from.
  [in] | key | The key to use when adding to the attribute dictionary.
  [out] | value_out | The value retrieved from the attribute dictionary.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `document` does not refer to a valid object
  - SU_ERROR_INVALID_OUTPUT if `value_out` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_INPUT if `dictionary_name` or `key` are NULL
  - SU_ERROR_NO_DATA if no attribute dictionary exists with the given name, or if the attribute dictionary does not contain the given key

LO_RESULT LODocumentSetAttribute | ( | LODocumentRef | document,
|  | const char * | dictionary_name,
|  | const char * | key,
|  | LOTypedValueRef | value_in
| ) |  |
| related

Sets an attribute to a given dictionary belonging to a document.

Since
  LayOut 2026.0, API 11.0

Parameters

  [in] | document | The document object.
  [in] | dictionary_name | The name of the attribute dictionary object being added to.
  [in] | key | The key to use when adding to the attribute dictionary.
  [in] | value_in | The value to be added to the attribute dictionary.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `document` does not refer to a valid object
  - SU_ERROR_INVALID_ARGUMENT if `value_in` contains no data
  - SU_ERROR_NULL_POINTER_INPUT if `dictionary_name` or `key` are NULL
  - SU_ERROR_UNSUPPORTED if `dictionary_name` is empty

The documentation for this struct was generated from the following file:

- LayOutAPI/model/document.h