LibreOffice: TextTable Service Reference

LibreOffice LibreOffice 7.5 SDK API Reference

Loading...
Searching...
No Matches
Public Types | Included Services | Exported Interfaces | Public Attributes | List of all members
TextTable Service Referencepublished

is a table of text cells which is anchored to a surrounding text. More...

Inheritance diagram for TextTable:

## Public Types
typedef sequence< com::sun::star::text::TableColumnSeparator > | TableColumnSeparators
| contains the column description of the table.
typedef sequence< com::sun::star::beans::PropertyValue > | TableInteropGrabBag
| Grab bag of table properties, used as a string-any map for interim interop purposes.
Public Types inherited from TextContent
typedef sequence< com::sun::star::text::TextContentAnchorType > | AnchorTypes
| contains the anchor type of the text content.

## Included Services
service | com::sun::star::text::TextContent
service | com::sun::star::xml::UserDefinedAttributesSupplier

## Exported Interfaces
interface | com::sun::star::text::XTextTable
interface | com::sun::star::container::XNamed
interface | com::sun::star::table::XCellRange
interface | com::sun::star::chart::XChartDataArray
interface | com::sun::star::table::XAutoFormattable
interface | com::sun::star::util::XSortable
interface | com::sun::star::sheet::XCellRangeData
Exported Interfaces inherited from TextContent
interface | com::sun::star::text::XTextContent
| This interface is used for the attachment of this text content to the surrounding text.

## Public Attributes
com::sun::star::style::BreakType | BreakType
| determines the type of break that is applied at the beginning of the table.
long | LeftMargin
| contains the left margin of the table.
long | RightMargin
| contains the right margin of the table.
short | HoriOrient
| contains the horizontal orientation.
boolean | KeepTogether
| Setting this property to TRUE prevents page or column breaks between this table and the following paragraph or text table.
boolean | Split
| Setting this property to FALSE prevents the table from getting spread on two pages.
short | PageNumberOffset
| If a page break property is set at the table, this property contains the new value for the page number.
string | PageDescName
| If this property is set, it creates a page break before the table and assigns the value as the name of the new page style sheet to use.
short | RelativeWidth
| determines the width of the table relative to its environment.
boolean | IsWidthRelative
| determines if the value of the relative width is valid.
boolean | RepeatHeadline
| determines if the first row of the table is repeated on every new page.
long | HeaderRowCount
| determines the number of rows of the table repeated on every new page.
com::sun::star::table::ShadowFormat | ShadowFormat
| determines the type, color and size of the shadow.
long | TopMargin
| determines the top margin.
long | BottomMargin
| determines the bottom margin.
boolean | BackTransparent
| determines if the background color is transparent.
long | Width
| contains the absolute table width.
boolean | ChartRowAsLabel
| determines if the first row of the table should be treated as axis labels when a chart is to be created.
boolean | ChartColumnAsLabel
| determines if the first column of the table should be treated as axis labels when a chart is to be created.
com::sun::star::table::TableBorder | TableBorder
| contains the description of the table borders.
short | TableColumnRelativeSum
| contains the sum of the column width values used in TableColumnSeparators.
com::sun::star::util::Color | BackColor
| contains the color of the background.
string | BackGraphicURL
| contains the URL for the background graphic.
string | BackGraphicFilter
| contains the name of the file filter for the background graphic.
com::sun::star::style::GraphicLocation | BackGraphicLocation
| determines the position of the background graphic.
boolean | CollapsingBorders
| determines whether borders of neighboring table cells are collapsed into one
string | TableTemplateName
| contains the name of table style used by the table.
com::sun::star::graphic::XGraphic | BackGraphic
| contains the graphic for the background.
Public Attributes inherited from TextContent
com::sun::star::text::TextContentAnchorType | AnchorType
| specifies how the text content is attached to its surrounding Text.
com::sun::star::text::WrapTextMode | TextWrap
| specifies if the text content is a shape and how the text is wrapped around the shape.

## Additional Inherited Members
Public Member Functions inherited from XTextContent
void | attach ([in] com::sun::star::text::XTextRange xTextRange) raises ( com::sun::star::lang::IllegalArgumentException )
| is called when this object gets embedded in a text.
com::sun::star::text::XTextRange | getAnchor ()
Public Member Functions inherited from XComponent
void | dispose ()
| The owner of an object calls this method to explicitly free all resources kept by this object and thus break cyclic references.
void | addEventListener ([in] XEventListener xListener)
| adds an event listener to the object.
void | removeEventListener ([in] XEventListener aListener)
| removes an event listener from the listener list.
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object.
void | acquire ()
| increases the reference counter by one.
void | release ()
| decreases the reference counter by one.
Public Member Functions inherited from XTextTable
void | initialize ([in] long nRows, [in] long nColumns)
| determines the numbers of rows and columns of the text table.
com::sun::star::table::XTableRows | getRows ()
com::sun::star::table::XTableColumns | getColumns ()
com::sun::star::table::XCell | getCellByName ([in] string aCellName)
sequence< string > | getCellNames ()
com::sun::star::text::XTextTableCursor | createCursorByCellName ([in] string aCellName)
| creates a text table cursor and returns the XTextTableCursor interface.
Public Member Functions inherited from XNamed
string | getName ()
void | setName ([in] string aName)
| sets the programmatic name of the object.
Public Member Functions inherited from XCellRange
com::sun::star::table::XCell | getCellByPosition ([in] long nColumn, [in] long nRow) raises ( com::sun::star::lang::IndexOutOfBoundsException )
| Returns a single cell within the range.
com::sun::star::table::XCellRange | getCellRangeByPosition ([in] long nLeft, [in] long nTop, [in] long nRight, [in] long nBottom) raises ( com::sun::star::lang::IndexOutOfBoundsException )
| Returns a sub-range of cells within the range.
com::sun::star::table::XCellRange | getCellRangeByName ([in] string aRange)
| Returns a sub-range of cells within the range.
Public Member Functions inherited from XChartDataArray
sequence< sequence< double > > | getData ()
| retrieves the numerical data as a nested sequence of values.
void | setData ([in] sequence< sequence< double > > aData)
| sets the chart data as an array of numbers.
sequence< string > | getRowDescriptions ()
| retrieves the description texts for all rows.
void | setRowDescriptions ([in] sequence< string > aRowDescriptions)
| sets the description texts for all rows.
sequence< string > | getColumnDescriptions ()
| retrieves the description texts for all columns.
void | setColumnDescriptions ([in] sequence< string > aColumnDescriptions)
| sets the description texts for all columns.
Public Member Functions inherited from XChartData
void | addChartDataChangeEventListener ([in] com::sun::star::chart::XChartDataChangeEventListener aListener)
| allows a component supporting the XChartDataChangeEventListener interface to register as listener.
void | removeChartDataChangeEventListener ([in] com::sun::star::chart::XChartDataChangeEventListener aListener)
| removes a previously registered listener.
double | getNotANumber ()
boolean | isNotANumber ([in] double nNumber)
| checks whether the value given is equal to the indicator value for a missing value.
Public Member Functions inherited from XAutoFormattable
void | autoFormat ([in] string aName) raises ( com::sun::star::lang::IllegalArgumentException )
| applies an AutoFormat to the cell range of the current context.
Public Member Functions inherited from XSortable
sequence< com::sun::star::beans::PropertyValue > | createSortDescriptor ()
void | sort ([in] sequence< com::sun::star::beans::PropertyValue > xDescriptor)
| sorts the contents of the object according to the specified properties.
Protected Member Functions inherited from XTextTable
void | initialize ([in] long nRows, [in] long nColumns)
| determines the numbers of rows and columns of the text table.
com::sun::star::table::XTableRows | getRows ()
com::sun::star::table::XTableColumns | getColumns ()
com::sun::star::table::XCell | getCellByName ([in] string aCellName)
sequence< string > | getCellNames ()
com::sun::star::text::XTextTableCursor | createCursorByCellName ([in] string aCellName)
| creates a text table cursor and returns the XTextTableCursor interface.
Protected Member Functions inherited from XNamed
string | getName ()
void | setName ([in] string aName)
| sets the programmatic name of the object.
Protected Member Functions inherited from XCellRange
com::sun::star::table::XCell | getCellByPosition ([in] long nColumn, [in] long nRow) raises ( com::sun::star::lang::IndexOutOfBoundsException )
| Returns a single cell within the range.
com::sun::star::table::XCellRange | getCellRangeByPosition ([in] long nLeft, [in] long nTop, [in] long nRight, [in] long nBottom) raises ( com::sun::star::lang::IndexOutOfBoundsException )
| Returns a sub-range of cells within the range.
com::sun::star::table::XCellRange | getCellRangeByName ([in] string aRange)
| Returns a sub-range of cells within the range.
Protected Member Functions inherited from XChartDataArray
sequence< sequence< double > > | getData ()
| retrieves the numerical data as a nested sequence of values.
void | setData ([in] sequence< sequence< double > > aData)
| sets the chart data as an array of numbers.
sequence< string > | getRowDescriptions ()
| retrieves the description texts for all rows.
void | setRowDescriptions ([in] sequence< string > aRowDescriptions)
| sets the description texts for all rows.
sequence< string > | getColumnDescriptions ()
| retrieves the description texts for all columns.
void | setColumnDescriptions ([in] sequence< string > aColumnDescriptions)
| sets the description texts for all columns.
Protected Member Functions inherited from XChartData
void | addChartDataChangeEventListener ([in] com::sun::star::chart::XChartDataChangeEventListener aListener)
| allows a component supporting the XChartDataChangeEventListener interface to register as listener.
void | removeChartDataChangeEventListener ([in] com::sun::star::chart::XChartDataChangeEventListener aListener)
| removes a previously registered listener.
double | getNotANumber ()
boolean | isNotANumber ([in] double nNumber)
| checks whether the value given is equal to the indicator value for a missing value.
Protected Member Functions inherited from XAutoFormattable
void | autoFormat ([in] string aName) raises ( com::sun::star::lang::IllegalArgumentException )
| applies an AutoFormat to the cell range of the current context.
Protected Member Functions inherited from XSortable
sequence< com::sun::star::beans::PropertyValue > | createSortDescriptor ()
void | sort ([in] sequence< com::sun::star::beans::PropertyValue > xDescriptor)
| sorts the contents of the object according to the specified properties.
Protected Member Functions inherited from XCellRangeData
sequence< sequence< any > > | getDataArray ()
| gets an array from the contents of the cell range.
void | setDataArray ([in] sequence< sequence< any > > aArray)
| fills the cell range with values from an array.
Protected Attributes inherited from UserDefinedAttributesSupplier
::com::sun::star::container::XNameContainer | UserDefinedAttributes
| This container holds the AttributeData elements that represent uninterpreted XML attributes.

## Detailed Description

is a table of text cells which is anchored to a surrounding text.

Note: The anchor of the actual implementation for text tables does not have a position in the text. Thus that anchor can not be used for some operation like XTextContent::attach() or XText::insertTextContent() or other function that require the object to have a position in the text.

The reason why a text table still needs an anchor is that for example tables should be insertable via XText::insertTextContent() and that interface uses a parameter of that type.

Example: Create and insert a TextTable:

xTable = xTextDoc.createInstance( "com.sun.star.text.TextTable" )
xTable.initialize(5, 8)
xTable.HoriOrient = 0 'com::sun::star::text::HoriOrientation::NONE
xTable.LeftMargin = 2000
xTable.RightMargin = 1500
xTextDoc.getText.insertTextContent( xTextRange, xTable, false )

See also
  com::sun::star::text::Cell
  com::sun::star::text::CellRange
  com::sun::star::text::TableColumns
  com::sun::star::text::TableRows
  com::sun::star::text::TextTableCursor

Developers Guide
  Text Documents - Tables - Table Architecture

## Member Typedef Documentation

## ◆ TableColumnSeparators

sequence<com::sun::star::text::TableColumnSeparator> TableColumnSeparators
| property

contains the column description of the table.

See also
  com::sun::star::text::TableColumnSeparator

## ◆ TableInteropGrabBag

sequence<com::sun::star::beans::PropertyValue> TableInteropGrabBag
| optionalproperty

Grab bag of table properties, used as a string-any map for interim interop purposes.

Since
  LibreOffice 4.3

This property is intentionally not handled by the ODF filter. Any member that should be handled there should be first moved out from this grab bag to a separate property.

## Exported Interfaces

## ◆ com::sun::star::text::TextContent

service com::sun::star::text::TextContent

## ◆ com::sun::star::xml::UserDefinedAttributesSupplier

service com::sun::star::xml::UserDefinedAttributesSupplier
| optional

## Exported Interfaces

## ◆ com::sun::star::chart::XChartDataArray

interface com::sun::star::chart::XChartDataArray

## ◆ com::sun::star::container::XNamed

interface com::sun::star::container::XNamed

## ◆ com::sun::star::sheet::XCellRangeData

interface com::sun::star::sheet::XCellRangeData
| optional

## ◆ com::sun::star::table::XAutoFormattable

interface com::sun::star::table::XAutoFormattable

## ◆ com::sun::star::table::XCellRange

interface com::sun::star::table::XCellRange

## ◆ com::sun::star::text::XTextTable

interface com::sun::star::text::XTextTable

## ◆ com::sun::star::util::XSortable

interface com::sun::star::util::XSortable

## Member Data Documentation

## ◆ BackColor

com::sun::star::util::Color BackColor
| property

contains the color of the background.

## ◆ BackGraphic

com::sun::star::graphic::XGraphic BackGraphic
| optionalproperty

contains the graphic for the background.

Since
  LibreOffice 6.1

## ◆ BackGraphicFilter

string BackGraphicFilter
| property

contains the name of the file filter for the background graphic.

## ◆ BackGraphicLocation

com::sun::star::style::GraphicLocation BackGraphicLocation
| property

determines the position of the background graphic.

See also
  GraphicLocation

## ◆ BackGraphicURL

string BackGraphicURL
| property

contains the URL for the background graphic.

Deprecated:
  as of LibreOffice 6.1 - use BackGraphic instead

Note the new behaviour since it this was deprecated: This property can only be set and only external URLs are supported (no more vnd.sun.star.GraphicObject scheme). When an URL is set, then it will load the graphic and set the BackGraphic property.

## ◆ BackTransparent

boolean BackTransparent
| property

determines if the background color is transparent.

## ◆ BottomMargin

long BottomMargin
| property

determines the bottom margin.

## ◆ BreakType

com::sun::star::style::BreakType BreakType
| property

determines the type of break that is applied at the beginning of the table.

See also
  com::sun::star::style::BreakType

## ◆ ChartColumnAsLabel

boolean ChartColumnAsLabel
| property

determines if the first column of the table should be treated as axis labels when a chart is to be created.

## ◆ ChartRowAsLabel

boolean ChartRowAsLabel
| property

determines if the first row of the table should be treated as axis labels when a chart is to be created.

## ◆ CollapsingBorders

boolean CollapsingBorders
| optionalproperty

determines whether borders of neighboring table cells are collapsed into one

## ◆ HeaderRowCount

long HeaderRowCount
| optionalproperty

determines the number of rows of the table repeated on every new page.

## ◆ HoriOrient

short HoriOrient
| property

contains the horizontal orientation.

See also
  com::sun::star::text::HoriOrientation

## ◆ IsWidthRelative

boolean IsWidthRelative
| property

determines if the value of the relative width is valid.

## ◆ KeepTogether

boolean KeepTogether
| property

Setting this property to TRUE prevents page or column breaks between this table and the following paragraph or text table.

## ◆ LeftMargin

long LeftMargin
| property

contains the left margin of the table.

## ◆ PageDescName

string PageDescName
| property

If this property is set, it creates a page break before the table and assigns the value as the name of the new page style sheet to use.

## ◆ PageNumberOffset

short PageNumberOffset
| property

If a page break property is set at the table, this property contains the new value for the page number.

## ◆ RelativeWidth

short RelativeWidth
| property

determines the width of the table relative to its environment.

## ◆ RepeatHeadline

boolean RepeatHeadline
| property

determines if the first row of the table is repeated on every new page.

## ◆ RightMargin

long RightMargin
| property

contains the right margin of the table.

## ◆ ShadowFormat

com::sun::star::table::ShadowFormat ShadowFormat
| property

determines the type, color and size of the shadow.

See also
  com::sun::star::table::ShadowFormat

## ◆ Split

boolean Split
| property

Setting this property to FALSE prevents the table from getting spread on two pages.

## ◆ TableBorder

com::sun::star::table::TableBorder TableBorder
| property

contains the description of the table borders.

See also
  com::sun::star::table::TableBorder

## ◆ TableColumnRelativeSum

short TableColumnRelativeSum
| property

contains the sum of the column width values used in TableColumnSeparators.

## ◆ TableTemplateName

string TableTemplateName
| optionalproperty

contains the name of table style used by the table.

Since
  LibreOffice 5.3

## ◆ TopMargin

long TopMargin
| property

determines the top margin.

## ◆ Width

long Width
| property

contains the absolute table width.

As this is only a describing property the value of the actual table may vary depending on the environment the table is located in and the settings of LeftMargin, RightMargin and HoriOrient.

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

- com/sun/star/text/TextTable.idl