LayOut C API

- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Enumerations | Functions
autotextdefinition.h File Reference
`#include <LayOutAPI/common.h>`
`#include <LayOutAPI/model/defs.h>`

Go to the source code of this file.

## Enumerations
enum | LOAutoTextDefinitionType { LOAutoTextDefinitionType_File = 0, LOAutoTextDefinitionType_PageName, LOAutoTextDefinitionType_PageNumber, LOAutoTextDefinitionType_CustomText, LOAutoTextDefinitionType_DateCurrent, LOAutoTextDefinitionType_DateCreated, LOAutoTextDefinitionType_DateModified, LOAutoTextDefinitionType_DatePublished, LOAutoTextDefinitionType_ModelGroupName, LOAutoTextDefinitionType_ModelComponentInstanceName, LOAutoTextDefinitionType_ModelComponentDefinitionName, LOAutoTextDefinitionType_ModelComponentDescription, LOAutoTextDefinitionType_ModelVolume, LOAutoTextDefinitionType_ModelFaceArea, LOAutoTextDefinitionType_ModelEdgeLength, LOAutoTextDefinitionType_ModelCoordinates, LOAutoTextDefinitionType_ModelDynamicComponentAttribute, LOAutoTextDefinitionType_ModelClassifierAttribute, LOAutoTextDefinitionType_ModelComponentInstanceAttribute, LOAutoTextDefinitionType_ModelComponentDefinitionAttribute, LOAutoTextDefinitionType_ModelSceneName, LOAutoTextDefinitionType_ModelSceneDescription, LOAutoTextDefinitionType_ModelScale, LOAutoTextDefinitionType_ModelSectionName, LOAutoTextDefinitionType_ModelSectionSymbol, LOAutoTextDefinitionType_PageCount, LOAutoTextDefinitionType_Sequence, LOAutoTextDefinitionType_ModelRatio, LOAutoTextDefinitionType_Count }
| Defines the different types of auto-text. More...
enum | LOAutoTextDefinitionNumberingStyle { LOAutoTextDefinitionNumberingStyle_Arabic = 0, LOAutoTextDefinitionNumberingStyle_ArabicPadded, LOAutoTextDefinitionNumberingStyle_UCAlpha, LOAutoTextDefinitionNumberingStyle_LCAlpha, LOAutoTextDefinitionNumberingStyle_UCRoman, LOAutoTextDefinitionNumberingStyle_LCRoman, LOAutoTextDefinitionNumberingStyle_Count }
| An enumeration of the different styles of page numbers we support. More...
enum | LOAutoTextDefinitionSequenceType { LOAutoTextDefinitionSequenceType_PerDocument = 0, LOAutoTextDefinitionSequenceType_PerPage, LOAutoTextDefinitionSequenceType_Count }
| An enumeration of the different types of auto-text sequencing. More...

## Functions
LO_RESULT | LOAutoTextDefinitionGetType (LOAutoTextDefinitionRef autotext, LOAutoTextDefinitionType *type)
| Gets the type of the specified auto-text definition. More...
LO_RESULT | LOAutoTextDefinitionGetMandatory (LOAutoTextDefinitionRef autotext, bool *is_mandatory)
| Gets whether the specified auto-text definition is a mandatory definition. Mandatory auto-text definitions may not be removed from a document, and they may not be created through the API, but they may be modified. More...
LO_RESULT | LOAutoTextDefinitionGetDocument (LOAutoTextDefinitionRef autotext, LODocumentRef *document)
| Returns the document that this auto-text definition belongs to. More...
LO_RESULT | LOAutoTextDefinitionGetName (LOAutoTextDefinitionRef autotext, SUStringRef *name)
| Gets the name of the specified auto-text definition. More...
LO_RESULT | LOAutoTextDefinitionSetName (LOAutoTextDefinitionRef autotext, const char *name)
| Sets the name of the specified auto-text definition. More...
LO_RESULT | LOAutoTextDefinitionGetTag (LOAutoTextDefinitionRef autotext, SUStringRef *tag)
| Gets the tag string of the specified auto-text definition. More...
LO_RESULT | LOAutoTextDefinitionGetIndex (LOAutoTextDefinitionRef autotext, size_t *index)
| Gets the index of the specified auto-text definition. More...
LO_RESULT | LOAutoTextDefinitionGetCustomText (LOAutoTextDefinitionRef autotext, SUStringRef *custom_text)
| Gets the text string of the specified custom auto-text definition. More...
LO_RESULT | LOAutoTextDefinitionSetCustomText (LOAutoTextDefinitionRef autotext, const char *custom_text)
| Sets the text string of the specified custom auto-text definition. More...
LO_RESULT | LOAutoTextDefinitionGetDateFormat (LOAutoTextDefinitionRef autotext, SUStringRef *date_format)
| Gets the date format string of the specified date auto-text definition. More...
LO_RESULT | LOAutoTextDefinitionSetDateFormat (LOAutoTextDefinitionRef autotext, const char *date_format)
| Sets the date format string of the specified date auto-text definition. More...
LO_RESULT | LOAutoTextDefinitionGetDisplayFullPath (LOAutoTextDefinitionRef autotext, bool *is_display_full_path)
| Gets a boolean signifying if the full path is displayed for the specified file auto-text definition. More...
LO_RESULT | LOAutoTextDefinitionSetDisplayFullPath (LOAutoTextDefinitionRef autotext, bool is_display_full_path)
| Sets whether the full path is displayed for the specified file auto-text definition. More...
LO_RESULT | LOAutoTextDefinitionGetDisplayFileExtension (LOAutoTextDefinitionRef autotext, bool *is_display_file_ext)
| Gets a boolean signifying if the file extension is displayed for the specified file auto-text definition. More...
LO_RESULT | LOAutoTextDefinitionSetDisplayFileExtension (LOAutoTextDefinitionRef autotext, bool is_display_file_ext)
| Sets whether the file extension is displayed for the specified file auto text definition. More...
LO_RESULT | LOAutoTextDefinitionGetPageNumberStyle (LOAutoTextDefinitionRef autotext, LOAutoTextDefinitionNumberingStyle *numbering_style)
| Gets the numbering style of the specified page number auto-text definition. More...
LO_RESULT | LOAutoTextDefinitionSetPageNumberStyle (LOAutoTextDefinitionRef autotext, LOAutoTextDefinitionNumberingStyle numbering_style)
| Sets the numbering style of the specified page number auto-text definition. More...
LO_RESULT | LOAutoTextDefinitionGetPageNumberStartIndex (LOAutoTextDefinitionRef autotext, int *start_index)
| Gets the index at which the auto-text definition starts numbering. More...
LO_RESULT | LOAutoTextDefinitionSetPageNumberStartIndex (LOAutoTextDefinitionRef autotext, int value)
| Sets the value at which to start counting. More...
LO_RESULT | LOAutoTextDefinitionGetStartPage (LOAutoTextDefinitionRef autotext, LOPageRef *page)
| Gets the page that the page number or page count auto-text definition starts numbering on. More...
LO_RESULT | LOAutoTextDefinitionSetStartPage (LOAutoTextDefinitionRef autotext, LOPageRef page)
| Sets the page that the page number or page count auto-text definition starts numbering on. More...
LO_RESULT | LOAutoTextDefinitionGetEndPage (LOAutoTextDefinitionRef autotext, LOPageRef *page)
| Gets the page the page count auto-text definition stops counting at. page may be returned as SU_INVALID, which indicates that the auto-text uses the last page in the document. More...
LO_RESULT | LOAutoTextDefinitionSetEndPage (LOAutoTextDefinitionRef autotext, LOPageRef page)
| Sets the page the page count auto-text definition stops counting at. This page must be after or the same as start page. If page is SU_INVALID, then the last page in the document will be used. More...
LO_RESULT | LOAutoTextDefinitionGetIncrement (LOAutoTextDefinitionRef autotext, int *increment)
| Gets the increment value of the specified sequence auto-text definition. More...
LO_RESULT | LOAutoTextDefinitionSetIncrement (LOAutoTextDefinitionRef autotext, int increment)
| Sets the increment value of the specified sequence auto-text definition. More...
LO_RESULT | LOAutoTextDefinitionGetSequenceFormat (LOAutoTextDefinitionRef autotext, SUStringRef *sequence_format)
| Gets the sequence format string of the specified date auto-text definition. More...
LO_RESULT | LOAutoTextDefinitionSetSequenceFormat (LOAutoTextDefinitionRef autotext, const char *sequence_format)
| Sets the format string of the specified sequence auto-text definition. If the string is empty, the format string will be set to the default of ###. More...
LO_RESULT | LOAutoTextDefinitionRenumberSequence (LOAutoTextDefinitionRef autotext)
| Iterates through all uses of the auto-text definition and eliminates gaps and duplicates in the sequence. More...
LO_RESULT | LOAutoTextDefinitionGetNumberStyle (LOAutoTextDefinitionRef autotext, LOAutoTextDefinitionNumberingStyle *numbering_style)
| Gets the numbering style of the specified page number, page count, or sequence auto-text definition. More...
LO_RESULT | LOAutoTextDefinitionSetNumberStyle (LOAutoTextDefinitionRef autotext, LOAutoTextDefinitionNumberingStyle numbering_style)
| Sets the numbering style of the specified page number, page count, or sequence auto-text definition. More...
LO_RESULT | LOAutoTextDefinitionGetStartIndex (LOAutoTextDefinitionRef autotext, int *start_index)
| Gets the index at which the auto-text definition starts numbering. More...
LO_RESULT | LOAutoTextDefinitionSetStartIndex (LOAutoTextDefinitionRef autotext, int value)
| Sets the value at which to start counting. More...
LO_RESULT | LOAutoTextDefinitionGetSequenceType (LOAutoTextDefinitionRef autotext, LOAutoTextDefinitionSequenceType *sequence_type)
| Gets the sequence type of the specified sequence auto-text definition. More...
LO_RESULT | LOAutoTextDefinitionSetSequenceType (LOAutoTextDefinitionRef autotext, LOAutoTextDefinitionSequenceType sequence_type)
| Sets the sequence type of the specified sequence auto-text definition. More...

## Enumeration Type Documentation

enum LOAutoTextDefinitionNumberingStyle

An enumeration of the different styles of page numbers we support.

Since
  LayOut 2017, API 2.0

Enumerator
LOAutoTextDefinitionNumberingStyle_Arabic |
LOAutoTextDefinitionNumberingStyle_ArabicPadded |
LOAutoTextDefinitionNumberingStyle_UCAlpha |
LOAutoTextDefinitionNumberingStyle_LCAlpha |
LOAutoTextDefinitionNumberingStyle_UCRoman |
LOAutoTextDefinitionNumberingStyle_LCRoman |
LOAutoTextDefinitionNumberingStyle_Count |

enum LOAutoTextDefinitionSequenceType

An enumeration of the different types of auto-text sequencing.

Since
  LayOut 2023.0, API 8.0

Enumerator
LOAutoTextDefinitionSequenceType_PerDocument |
LOAutoTextDefinitionSequenceType_PerPage |
LOAutoTextDefinitionSequenceType_Count |

enum LOAutoTextDefinitionType

Defines the different types of auto-text.

Since
  LayOut 2017, API 2.0

Enumerator
LOAutoTextDefinitionType_File |
LOAutoTextDefinitionType_PageName |
LOAutoTextDefinitionType_PageNumber |
LOAutoTextDefinitionType_CustomText |
LOAutoTextDefinitionType_DateCurrent |
LOAutoTextDefinitionType_DateCreated |
LOAutoTextDefinitionType_DateModified |
LOAutoTextDefinitionType_DatePublished |
LOAutoTextDefinitionType_ModelGroupName |
LOAutoTextDefinitionType_ModelComponentInstanceName |
LOAutoTextDefinitionType_ModelComponentDefinitionName |
LOAutoTextDefinitionType_ModelComponentDescription |
LOAutoTextDefinitionType_ModelVolume |
LOAutoTextDefinitionType_ModelFaceArea |
LOAutoTextDefinitionType_ModelEdgeLength |
LOAutoTextDefinitionType_ModelCoordinates |
LOAutoTextDefinitionType_ModelDynamicComponentAttribute |
LOAutoTextDefinitionType_ModelClassifierAttribute |
LOAutoTextDefinitionType_ModelComponentInstanceAttribute |
LOAutoTextDefinitionType_ModelComponentDefinitionAttribute |
LOAutoTextDefinitionType_ModelSceneName |
LOAutoTextDefinitionType_ModelSceneDescription |
LOAutoTextDefinitionType_ModelScale |
LOAutoTextDefinitionType_ModelSectionName |
LOAutoTextDefinitionType_ModelSectionSymbol |
LOAutoTextDefinitionType_PageCount |
LOAutoTextDefinitionType_Sequence |
LOAutoTextDefinitionType_ModelRatio |
LOAutoTextDefinitionType_Count |

## Function Documentation

LO_RESULT LOAutoTextDefinitionGetCustomText | ( | LOAutoTextDefinitionRef | autotext,
|  | SUStringRef * | custom_text
| ) |  |

Gets the text string of the specified custom auto-text definition.

Since
  LayOut 2017, API 2.0

Parameters

  [in] | autotext | The auto-text definition object.
  [out] | custom_text | The auto-text definition custom text string.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if custom_text is NULL
  - SU_ERROR_UNSUPPORTED if autotext's type is not that of custom text

LO_RESULT LOAutoTextDefinitionGetDateFormat | ( | LOAutoTextDefinitionRef | autotext,
|  | SUStringRef * | date_format
| ) |  |

Gets the date format string of the specified date auto-text definition.

Since
  LayOut 2017, API 2.0

Parameters

  [in] | autotext | The auto-text definition object.
  [out] | date_format | The auto-text definition date format string.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if date_format is NULL
  - SU_ERROR_UNSUPPORTED if autotext's type is not a date type

LO_RESULT LOAutoTextDefinitionGetDisplayFileExtension | ( | LOAutoTextDefinitionRef | autotext,
|  | bool * | is_display_file_ext
| ) |  |

Gets a boolean signifying if the file extension is displayed for the specified file auto-text definition.

Since
  LayOut 2017, API 2.0

Parameters

  [in] | autotext | The auto-text definition object.
  [in] | is_display_file_ext | Boolean signifying if the full path is being displayed.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if is_display_file_ext is NULL
  - SU_ERROR_UNSUPPORTED if autotext's type is not a file type

LO_RESULT LOAutoTextDefinitionGetDisplayFullPath | ( | LOAutoTextDefinitionRef | autotext,
|  | bool * | is_display_full_path
| ) |  |

Gets a boolean signifying if the full path is displayed for the specified file auto-text definition.

Since
  LayOut 2017, API 2.0

Parameters

  [in] | autotext | The auto-text definition object.
  [in] | is_display_full_path | Boolean signifying if the full path is being displayed.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if is_display_full_path is NULL
  - SU_ERROR_UNSUPPORTED if autotext's type is not a file type

LO_RESULT LOAutoTextDefinitionGetDocument | ( | LOAutoTextDefinitionRef | autotext,
|  | LODocumentRef * | document
| ) |  |

Returns the document that this auto-text definition belongs to.

Since
  LayOut 2018, API 3.0

Parameters

  [in] | autotext | The auto-text definition object.
  [out] | document | The document object.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if document is NULL

LO_RESULT LOAutoTextDefinitionGetEndPage | ( | LOAutoTextDefinitionRef | autotext,
|  | LOPageRef * | page
| ) |  |

Gets the page the page count auto-text definition stops counting at. page may be returned as SU_INVALID, which indicates that the auto-text uses the last page in the document.

Since
  LayOut 2022.0, API 7.0

Parameters

  [in] | autotext | The auto-text definition object.
  [out] | page | The page object.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `autotext` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `page` is NULL
  - SU_ERROR_UNSUPPORTED if `autotext's` type is not page count

LO_RESULT LOAutoTextDefinitionGetIncrement | ( | LOAutoTextDefinitionRef | autotext,
|  | int * | increment
| ) |  |

Gets the increment value of the specified sequence auto-text definition.

Since
  LayOut 2022.0, API 7.0

Parameters

  [in] | autotext | The auto-text definition object.
  [out] | increment | The amount each sequence object increments by.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `autotext` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `increment` is NULL
  - SU_ERROR_UNSUPPORTED if `autotext's` type is not a sequence type

LO_RESULT LOAutoTextDefinitionGetIndex | ( | LOAutoTextDefinitionRef | autotext,
|  | size_t * | index
| ) |  |

Gets the index of the specified auto-text definition.

Since
  LayOut 2018, API 3.0

Parameters

  [in] | autotext | The auto-text definition object.
  [out] | index | The index of the auto-text definition.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if index is NULL

LO_RESULT LOAutoTextDefinitionGetMandatory | ( | LOAutoTextDefinitionRef | autotext,
|  | bool * | is_mandatory
| ) |  |

Gets whether the specified auto-text definition is a mandatory definition. Mandatory auto-text definitions may not be removed from a document, and they may not be created through the API, but they may be modified.

Since
  LayOut 2018, API 3.0

Parameters

  [in] | autotext | The auto-text definition object.
  [out] | is_mandatory | Whether it is a mandatory auto-text definition.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if is_mandatory is NULL

LO_RESULT LOAutoTextDefinitionGetName | ( | LOAutoTextDefinitionRef | autotext,
|  | SUStringRef * | name
| ) |  |

Gets the name of the specified auto-text definition.

Since
  LayOut 2017, API 2.0

Parameters

  [in] | autotext | The auto-text definition object.
  [out] | name | The auto-text definition name string.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if name is NULL

LO_RESULT LOAutoTextDefinitionGetNumberStyle | ( | LOAutoTextDefinitionRef | autotext,
|  | LOAutoTextDefinitionNumberingStyle * | numbering_style
| ) |  |

Gets the numbering style of the specified page number, page count, or sequence auto-text definition.

Since
  LayOut 2022.0, API 7.0

Note
  Use this method instead of the deprecated `LOAutoTextDefinitionGetPageNumberStyle`.

Parameters

  [in] | autotext | The auto-text definition object.
  [out] | numbering_style | The style of numbering.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `autotext` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `numbering_style` is NULL
  - SU_ERROR_UNSUPPORTED if `autotext's` type is not page number, page count, or sequence

LO_RESULT LOAutoTextDefinitionGetPageNumberStartIndex | ( | LOAutoTextDefinitionRef | autotext,
|  | int * | start_index
| ) |  |

Gets the index at which the auto-text definition starts numbering.

Since
  LayOut 2017, API 2.0

Parameters

  [in] | autotext | The auto-text definition object.
  [out] | start_index | The starting index.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `autotext` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `start_index` is NULL
  - SU_ERROR_UNSUPPORTED if `autotext's` type is not page number

LO_RESULT LOAutoTextDefinitionGetPageNumberStyle | ( | LOAutoTextDefinitionRef | autotext,
|  | LOAutoTextDefinitionNumberingStyle * | numbering_style
| ) |  |

Gets the numbering style of the specified page number auto-text definition.

Since
  LayOut 2017, API 2.0

Parameters

  [in] | autotext | The auto-text definition object.
  [out] | numbering_style | The style of numbering.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `autotext` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `numbering_style` is NULL
  - SU_ERROR_UNSUPPORTED if `autotext's` type is not page number

LO_RESULT LOAutoTextDefinitionGetSequenceFormat | ( | LOAutoTextDefinitionRef | autotext,
|  | SUStringRef * | sequence_format
| ) |  |

Gets the sequence format string of the specified date auto-text definition.

Since
  LayOut 2022.0, API 7.0

Parameters

  [in] | autotext | The auto-text definition object.
  [out] | sequence_format | The auto-text definition sequence format string.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `autotext` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `sequence_format` is NULL
  - SU_ERROR_UNSUPPORTED if `autotext's` type is not a sequence type

LO_RESULT LOAutoTextDefinitionGetSequenceType | ( | LOAutoTextDefinitionRef | autotext,
|  | LOAutoTextDefinitionSequenceType * | sequence_type
| ) |  |

Gets the sequence type of the specified sequence auto-text definition.

Since
  LayOut 2023.0, API 8.0

Parameters

  [in] | autotext | The auto-text definition object.
  [out] | sequence_type | The sequencing behavior of this definition.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `autotext` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `sequence_type` is NULL
  - SU_ERROR_UNSUPPORTED if `autotext's` type is not sequence

LO_RESULT LOAutoTextDefinitionGetStartIndex | ( | LOAutoTextDefinitionRef | autotext,
|  | int * | start_index
| ) |  |

Gets the index at which the auto-text definition starts numbering.

Since
  LayOut 2022.0, API 7.0

Note
  Use this method instead of the deprecated `LOAutoTextDefinitionGetPageNumberStartIndex`.

Parameters

  [in] | autotext | The auto-text definition object.
  [out] | start_index | The starting index.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `autotext` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `start_index` is NULL
  - SU_ERROR_UNSUPPORTED if `autotext's` type is not page number, page count, or sequence

LO_RESULT LOAutoTextDefinitionGetStartPage | ( | LOAutoTextDefinitionRef | autotext,
|  | LOPageRef * | page
| ) |  |

Gets the page that the page number or page count auto-text definition starts numbering on.

Since
  LayOut 2022.0, API 7.0

Parameters

  [in] | autotext | The auto-text definition object.
  [out] | page | The page object.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `autotext` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `page` is NULL
  - SU_ERROR_UNSUPPORTED if `autotext's` type is not page number, page count, or sequence

LO_RESULT LOAutoTextDefinitionGetTag | ( | LOAutoTextDefinitionRef | autotext,
|  | SUStringRef * | tag
| ) |  |

Gets the tag string of the specified auto-text definition.

Since
  LayOut 2017, API 2.0

Parameters

  [in] | autotext | The auto-text definition object.
  [out] | tag | The auto-text definition tag string.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if tag is NULL

LO_RESULT LOAutoTextDefinitionGetType | ( | LOAutoTextDefinitionRef | autotext,
|  | LOAutoTextDefinitionType * | type
| ) |  |

Gets the type of the specified auto-text definition.

Since
  LayOut 2017, API 2.0

Parameters

  [in] | autotext | The auto-text definition object.
  [out] | type | The auto-text definition type.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if type is NULL

LO_RESULT LOAutoTextDefinitionRenumberSequence | ( | LOAutoTextDefinitionRef | autotext | ) |

Iterates through all uses of the auto-text definition and eliminates gaps and duplicates in the sequence.

Since
  LayOut 2022.0, API 7.0

Parameters

  [in] | autotext | The auto-text definition object.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `autotext` does not refer to a valid object
  - SU_ERROR_UNSUPPORTED if `autotext's` type is not a sequence type

LO_RESULT LOAutoTextDefinitionSetCustomText | ( | LOAutoTextDefinitionRef | autotext,
|  | const char * | custom_text
| ) |  |

Sets the text string of the specified custom auto-text definition.

Since
  LayOut 2017, API 2.0

Parameters

  [in] | autotext | The auto-text definition object.
  [in] | custom_text | The auto-text definition custom text string.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
  - SU_ERROR_UNSUPPORTED if autotext's type is not that of custom text

LO_RESULT LOAutoTextDefinitionSetDateFormat | ( | LOAutoTextDefinitionRef | autotext,
|  | const char * | date_format
| ) |  |

Sets the date format string of the specified date auto-text definition.

Since
  LayOut 2017, API 2.0

Parameters

  [in] | autotext | The auto-text definition object.
  [in] | date_format | The auto-text definition date format string.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
  - SU_ERROR_UNSUPPORTED if autotext's type is not a date type

LO_RESULT LOAutoTextDefinitionSetDisplayFileExtension | ( | LOAutoTextDefinitionRef | autotext,
|  | bool | is_display_file_ext
| ) |  |

Sets whether the file extension is displayed for the specified file auto text definition.

Since
  LayOut 2017, API 2.0

Parameters

  [in] | autotext | The auto-text definition object.
  [in] | is_display_file_ext | Boolean signifying if the full path is being displayed.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
  - SU_ERROR_UNSUPPORTED if autotext's type is not a file type

LO_RESULT LOAutoTextDefinitionSetDisplayFullPath | ( | LOAutoTextDefinitionRef | autotext,
|  | bool | is_display_full_path
| ) |  |

Sets whether the full path is displayed for the specified file auto-text definition.

Since
  LayOut 2017, API 2.0

Parameters

  [in] | autotext | The auto-text definition object.
  [in] | is_display_full_path | Boolean signifying if the full path is being displayed.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
  - SU_ERROR_UNSUPPORTED if autotext's type is not a file type

LO_RESULT LOAutoTextDefinitionSetEndPage | ( | LOAutoTextDefinitionRef | autotext,
|  | LOPageRef | page
| ) |  |

Sets the page the page count auto-text definition stops counting at. This page must be after or the same as start page. If page is SU_INVALID, then the last page in the document will be used.

Since
  LayOut 2022.0, API 7.0

Parameters

  [in] | autotext | The auto-text definition object.
  [in] | page | The page object.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `autotext` does not refer to a valid object
  - SU_ERROR_OUT_OF_RANGE if `page` is a page that comes after this definition's start page
  - SU_ERROR_UNSUPPORTED if `autotext's` type is not page count

LO_RESULT LOAutoTextDefinitionSetIncrement | ( | LOAutoTextDefinitionRef | autotext,
|  | int | increment
| ) |  |

Sets the increment value of the specified sequence auto-text definition.

Since
  LayOut 2022.0, API 7.0

Parameters

  [in] | autotext | The auto-text definition object.
  [in] | increment | The new amount each sequence object will increment by.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `autotext` does not refer to a valid object
  - SU_ERROR_UNSUPPORTED if `autotext's` type is not a sequence type

LO_RESULT LOAutoTextDefinitionSetName | ( | LOAutoTextDefinitionRef | autotext,
|  | const char * | name
| ) |  |

Sets the name of the specified auto-text definition.

Since
  LayOut 2017, API 2.0

Parameters

  [in] | autotext | The auto-text definition object.
  [out] | name | The auto-text definition name string.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
  - SU_ERROR_UNSUPPORTED if autotext is a mandatory definition
  - SU_ERROR_DUPLICATE if name is the name of an existing definition
  - SU_ERROR_UNSUPPORTED if name is an empty string

LO_RESULT LOAutoTextDefinitionSetNumberStyle | ( | LOAutoTextDefinitionRef | autotext,
|  | LOAutoTextDefinitionNumberingStyle | numbering_style
| ) |  |

Sets the numbering style of the specified page number, page count, or sequence auto-text definition.

Since
  LayOut 2022.0, API 7.0

Note
  Use this method instead of the deprecated `LOAutoTextDefinitionSetPageNumberStyle`.

Parameters

  [in] | autotext | The auto-text definition object.
  [in] | numbering_style | The style of numbering.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `autotext` does not refer to a valid object
  - SU_ERROR_UNSUPPORTED if `autotext's` type is not page number, page count, or sequence
  - SU_ERROR_OUT_OF_RANGE if `numbering_style` is not a valid numbering style

LO_RESULT LOAutoTextDefinitionSetPageNumberStartIndex | ( | LOAutoTextDefinitionRef | autotext,
|  | int | value
| ) |  |

Sets the value at which to start counting.

Since
  LayOut 2017, API 2.0

Parameters

  [in] | autotext | The auto-text definition object.
  [out] | value | The number at which to start counting.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `autotext` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_INPUT if `value` is NULL
  - SU_ERROR_UNSUPPORTED if autotext's type is not a page number

LO_RESULT LOAutoTextDefinitionSetPageNumberStyle | ( | LOAutoTextDefinitionRef | autotext,
|  | LOAutoTextDefinitionNumberingStyle | numbering_style
| ) |  |

Sets the numbering style of the specified page number auto-text definition.

Since
  LayOut 2017, API 2.0

Parameters

  [in] | autotext | The auto-text definition object.
  [out] | numbering_style | The style of numbering.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `autotext` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_INPUT if `numbering_style` is NULL
  - SU_ERROR_UNSUPPORTED if `autotext's` type is not page number

LO_RESULT LOAutoTextDefinitionSetSequenceFormat | ( | LOAutoTextDefinitionRef | autotext,
|  | const char * | sequence_format
| ) |  |

Sets the format string of the specified sequence auto-text definition. If the string is empty, the format string will be set to the default of ###.

Since
  LayOut 2022.0, API 7.0

Parameters

  [in] | autotext | The auto-text definition object.
  [in] | sequence_format | The new format string for the sequence.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `autotext` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `sequence_format` is NULL
  - SU_ERROR_UNSUPPORTED if `autotext's` type is not a sequence type

LO_RESULT LOAutoTextDefinitionSetSequenceType | ( | LOAutoTextDefinitionRef | autotext,
|  | LOAutoTextDefinitionSequenceType | sequence_type
| ) |  |

Sets the sequence type of the specified sequence auto-text definition.

Since
  LayOut 2023.0, API 8.0

Parameters

  [in] | autotext | The auto-text definition object.
  [in] | sequence_type | The sequencing behavior.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `autotext` does not refer to a valid object
  - SU_ERROR_UNSUPPORTED if `autotext's` type is not sequence
  - SU_ERROR_OUT_OF_RANGE if `sequence_type` is not a valid sequence type

LO_RESULT LOAutoTextDefinitionSetStartIndex | ( | LOAutoTextDefinitionRef | autotext,
|  | int | value
| ) |  |

Sets the value at which to start counting.

Since
  LayOut 2022.0, API 7.0

Note
  Use this method instead of the deprecated `LOAutoTextDefinitionGetPageNumberStartIndex`.

Parameters

  [in] | autotext | The auto-text definition object.
  [in] | value | The number at which to start counting.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `autotext` does not refer to a valid object
  - SU_ERROR_UNSUPPORTED if autotext's type is not a page number, page count, or sequence type

LO_RESULT LOAutoTextDefinitionSetStartPage | ( | LOAutoTextDefinitionRef | autotext,
|  | LOPageRef | page
| ) |  |

Sets the page that the page number or page count auto-text definition starts numbering on.

Since
  LayOut 2022.0, API 7.0

Parameters

  [in] | autotext | The auto-text definition object.
  [in] | page | The page object.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `autotext` does not refer to a valid object
  - SU_ERROR_INVALID_INPUT if `page` does not refer to a valid object
  - SU_ERROR_UNSUPPORTED if `autotext's` type is not page number or page count