General

Components

Community

Development

TDF

Formatting Attribute Sets (Operations)

Style Support

Text applications support styles of type page, drawing, character, paragraph, and table.

All operations that set formatting attributes will contain attribute sets. These attribute sets contain sub-objects with attributes and are mapped by attribute type. Additionally, an attribute set may contain the identifier of a style sheet referenced by a component in the document.

The attribute types supported by an attribute set are dependent on the operation containing the attribute set. An attribute set will always be carried in the attrs property of the operation.

Example: A paragraph in a text document may contain paragraph attributes, character attributes, and a reference to a paragraph style sheet. The attribute set is an object containing up to two maps with attributes:

attrs: { styleId: "Normal", paragraph: { alignment: "right", ... }, character: { fontSize: 12, ... } }

AttributeSet

The generic definition of an attribute set.

Property Data Type Default Value Description
styleId String ”” (no style sheet) Reference to the style sheet defined by an addStyle operation. MUST NOT be used in attribute sets of addStyle operations.
type1 Object {} Map with formatting attributes supported by the attribute type1.
type2 Object {} Map with formatting attributes supported by the attribute type2.

CharacterAttributeSet

Contains attributes for character style sheets and text spans, in the following format:

Property Data Type Default Value Description
styleId String none Identifier of a character style sheet inserted with an addStyle operation.
character CharacterAttributes {} Character formatting attributes.

ParagraphAttributeSet

Contains attributes for paragraph style sheets and paragraph elements, in the following format:

Property Data Type Default Value Description
styleId String none Identifier of a paragraph style sheet inserted with an addStyle operation.
paragraph ParagraphAttributes {} Paragraph formatting attributes.
character CharacterAttributes {} Character formatting attributes.

TableAttributeSet

Contains attributes for table elements (not table style sheets, see TableStyleSheetAttributeSet), in the following format:

Property Data Type Default Value Description
styleId String none Identifier of a table style sheet inserted with an addStyle operation.
stripsetSize Integer 1 Table formatting attributes.
table TableAttributes {} Table formatting attributes.
row TableRowAttributes {} Table Row formatting attributes.
cell TableCellAttributes {} Table Cell formatting attributes.
paragraph ParagraphAttributes {} Paragraph formatting attributes.
character CharacterAttributes {} Character formatting attributes.

TableStyleSheetAttributeSet

Contains attributes for table style sheets (not table elements, see TableAttributeSet), in the following format:

Property Data Type Default Value Description
wholeTable TableAttributeSet {} Table attribute set for the entire table.
firstRow TableAttributeSet {} Table attribute set for the top row.
lastRow TableAttributeSet {} Table attribute set for the bottom row.
firstCol TableAttributeSet {} Table attribute set for the left column.
lastCol TableAttributeSet {} Table attribute set for the right column.
band1Vert TableAttributeSet {} Table attribute set for the odd inner columns.
band2Vert TableAttributeSet {} Table attribute set for the even inner columns.
band1Hor TableAttributeSet {} Table attribute set for the odd inner rows.
band2Hor TableAttributeSet {} Table attribute set for the even inner rows.
northEastCell TableAttributeSet {} Table attribute set for the top-right corner cell.
northWestCell TableAttributeSet {} Table attribute set for the top-left corner cell.
southEastCell TableAttributeSet {} Table attribute set for the bottom-right corner cell.
southWestCell TableAttributeSet {} Table attribute set for the bottom left corner cell.

TableRowAttributeSet

Contains attributes for table row elements, in the following format:

Property Data Type Default Value Description
row TableRowAttributes {} Table row formatting attributes.

TableCellAttributeSet

Contains attributes for table cell elements, in the following format:

Property Data Type Default Value Description
cell TableCellAttributes {} Table cell formatting attributes.
paragraph ParagraphAttributes {} Paragraph formatting attributes.
character CharacterAttributes {} Character formatting attributes.

DocumentAttributeSet

Contains global document settings, and default attribute values for different attribute types supported by the current application. Default attribute values are used to determine the value of an attribute that is neither specified by a style sheet referenced by a component nor by an explicit attribute of the component.

Property Data Type Default Value Application Description
document DocumentAttributes {} all Global document settings, depending on the document type.
page PageAttributes {} all Default page attributes.
defaultTextListStyles TO_BE_DEFINED {} Presentation Default text list styles that are used for non presentation objects.
character CharacterAttributes {} all Default character attributes for drawing objects, text documents, and spreadsheet cells.
paragraph ParagraphAttributes {} Text Default paragraph attributes for text documents.
cell CellAttributes {} Spreadsheet Default cell attributes for spreadsheet documents.
layout LayoutAttributes {} Presentation Width in percent from the slide pane for presentation documents.

PageAttributeSet

Contains attributes for page style sheets and page elements, in the following format:

Property Data Type Default Value Description
styleId String ”” (no style sheet) Identifier of a page style sheet inserted with an addStyle operation.
page PageAttributes {} Page formatting attributes.

DrawingAttributeSet

Contains attributes for drawing style sheets and drawing objects, in the following format:

Property Data Type Default Value Description
styleId String Identifier of a drawing style sheet inserted with an addStyle operation.
drawing DrawingAttributes {} Drawing formatting attributes.
fill DrawingFillAttributes {} Additional fill formatting attributes for the entire drawing object.
line DrawingLineAttributes {} Additional line formatting attributes for the entire drawing object.
image ImageAttributes {} Additional image attributes, only used for image and OLE objects.
shape ShapeAttributes {} Additional formatting attributes for auto-shapes and text frames.
geometry GeometryAttributes {} Additional geometry attributes for auto-shapes and text frames.
connector ConnectorAttributes {} Additional connector attributes for connector shapes.
chart ChartAttributes {} Additional chart formatting attributes, only used for chart objects.

ChartDataSeriesAttributeSet

Contains attributes for data series in chart objects, in the following format:

Property Data Type Default Value Description
series ChartDataSeriesAttributes {} Chart data series formatting attributes.
fill DrawingFillAttributes {} Additional fill formatting attributes for the data series.
line DrawingLineAttributes {} Additional line formatting attributes for the data series.

ChartDataPointAttributeSet

Contains attributes for data point in chart objects, in the following format:

Property Data Type Default Value Description
fill DrawingFillAttributes {} Additional fill formatting attributes for the data point.
line DrawingLineAttributes {} Additional line formatting attributes for the data point.

ChartAxisAttributeSet

Contains attributes for axes in chart objects, in the following format:

Property Data Type Default Value Description
axis ChartAxisAttributes {} Chart axis formatting attributes.
line DrawingLineAttributes {} Additional line formatting attributes for the axis.
character CharacterAttributes {} Character formatting attributes for the axis labels.

ChartTitleAttributeSet

Contains attributes for titles in chart objects, in the following format:

Property Data Type Default Value Description
fill DrawingFillAttributes {} Fill formatting attributes for the title shape.
line DrawingLineAttributes {} Line formatting attributes for the title shape.
text DrawingTextAttributes {} Attributes describing the text source.
character CharacterAttributes {} Character formatting attributes for the title.

ChartGridlineAttributeSet

Contains attributes for grid lines in chart objects, in the following format:

Property Data Type Default Value Description
line DrawingLineAttributes {} Line formatting attributes for the grid line.

ChartLegendAttributeSet

Contains attributes for the legend in a chart object, in the following format:

Property Data Type Default Value Description
legend ChartLegendAttributes {} Chart legend formatting attributes.
fill DrawingFillAttributes {} Additional fill formatting attributes for the legend shape.
line DrawingLineAttributes {} Additional line formatting attributes for the legend shape.
character CharacterAttributes {} Additional character formatting attributes for the legend.

TableDrawingAttributeSet

Contains attributes for drawing objects of type 'table', in the following format:

Property Data Type Default Value Description
styleId String none Identifier of a table style sheet inserted with an addStyle operation.
table TableAttributes {} Table formatting attributes.
cell TableCellAttributes {} Table Cell formatting attributes.
paragraph ParagraphAttributes {} Paragraph formatting attributes.
character CharacterAttributes {} Character formatting attributes.

Impressum (Legal Info) | Privacy Policy (Datenschutzerklärung) | Statutes (non-binding English translation) - Satzung (binding German version) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Apache License, v2.0. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License v2.0. “LibreOffice” and “The Document Foundation” are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy. LibreOffice was based on OpenOffice.org.