LibreOffice: XChartDocument Interface Reference

LibreOffice LibreOffice 26.8 SDK API Reference

Loading...
Searching...
No Matches
XChartDocument Interface Reference

`import "XChartDocument.idl";`

Inheritance diagram for XChartDocument:

## Public Member Functions
XDiagram | getFirstDiagram ()
void | setFirstDiagram ([in] XDiagram xDiagram)
void | createInternalDataProvider ([in] boolean bCloneExistingData) raises ( com::sun::star::util::CloseVetoException )
| creates an internal com::sun::star::chart2::XDataProvider that is handled by the chart document itself.
boolean | hasInternalDataProvider ()
com::sun::star::chart2::data::XDataProvider | getDataProvider ()
| Returns the currently set data provider.
void | setChartTypeManager ([in] XChartTypeManager xNewManager)
| sets a new component that is able to create different chart type templates (components of type ChartTypeTemplate)
XChartTypeManager | getChartTypeManager ()
| retrieves the component that is able to create different chart type templates (components of type ChartTypeTemplate)
com::sun::star::beans::XPropertySet | getPageBackground ()
| Gives access to the page background appearance.
void | createDefaultChart ()
| Creates a default chart type for a brand-new chart object.
XChartStyle | getStyles ()
| Get style information.
XChartColorStyle | getColorStyles ()
| Get colorstyle information.
Public Member Functions inherited from XModel
boolean | attachResource ([in] string URL, [in] sequence< com::sun::star::beans::PropertyValue > Arguments)
| informs a model about its resource description.
string | getURL ()
| provides information about the location of this model
sequence< com::sun::star::beans::PropertyValue > | getArgs ()
| provides read access on currently representation of the com::sun::star::document::MediaDescriptor of this model which describes the model and its state
void | connectController ([in] XController Controller)
| is called whenever a new controller is created for this model.
void | disconnectController ([in] XController Controller)
| is called whenever an existing controller should be deregistered at this model.
void | lockControllers ()
| suspends some notifications to the controllers which are used for display updates.
void | unlockControllers ()
| resumes the notifications which were suspended by XModel::lockControllers().
boolean | hasControllersLocked ()
| determines if there is at least one lock remaining.
XController | getCurrentController ()
| provides access to the controller which currently controls this model
void | setCurrentController ([in] XController Controller) raises ( com::sun::star::container::NoSuchElementException )
| sets a registered controller as the current controller.
com::sun::star::uno::XInterface | getCurrentSelection ()
| provides read access on current selection on controller
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.

## Member Function Documentation

## ◆ createDefaultChart()

void createDefaultChart | ( |  | ) |

Creates a default chart type for a brand-new chart object.

## ◆ createInternalDataProvider()

void createInternalDataProvider | ( | [in] boolean | bCloneExistingData | ) |
raises | ( | com::sun::star::util::CloseVetoException ) |  |  |

creates an internal com::sun::star::chart2::XDataProvider that is handled by the chart document itself.

When the model is stored, the data provider will also be stored in a sub-storage.

Parameters

  bCloneExistingData | if TRUE and a data provider was previously attached, its referred data will be copied to the new internal data provider. Note, that the range representation set before will usually change after cloning.

Exceptions

  com::sun::star::util:CloseVetoException | If the new data provider could not be created due to a failed removal of the former data provider.

## ◆ getChartTypeManager()

XChartTypeManager getChartTypeManager | ( |  | ) |

retrieves the component that is able to create different chart type templates (components of type ChartTypeTemplate)

## ◆ getColorStyles()

XChartColorStyle getColorStyles | ( |  | ) |

Get colorstyle information.

Since
  LibreOffice 26.02

## ◆ getDataProvider()

com::sun::star::chart2::data::XDataProvider getDataProvider | ( |  | ) |

Returns the currently set data provider.

This may be an internal one, if createInternalDataProvider() has been called before, or an external one if XDataReceiver::attachDataProvider() has been called.

## ◆ getFirstDiagram()

XDiagram getFirstDiagram | ( |  | ) |

Todo
  allow more than one diagram

Notes: this is preliminary, we need an API that supports more than one diagram. The method name getDiagram exists in the css.chart API, so there is would be no way to choose either this or the other method from Basic (it would chose one or the other by random).

## ◆ getPageBackground()

com::sun::star::beans::XPropertySet getPageBackground | ( |  | ) |

Gives access to the page background appearance.

Returns
  the properties of the background area of the chart document.

The area's extent is equal to the document size. If you want to access properties of the background area of a single diagram (the part where data points are actually plotted in), you have to get its wall. You can get the wall by calling XDiagram::getWall().

## ◆ getStyles()

XChartStyle getStyles | ( |  | ) |

Get style information.

Since
  LibreOffice 26.02

## ◆ hasInternalDataProvider()

boolean hasInternalDataProvider | ( |  | ) |

Returns
  TRUE if the data provider set at the chart document is an internal one.

This is the case directly after createInternalDataProvider() has been called, but this is not necessary. The chart can also create an internal data provider by other means, e.g. a call to com::sun::star::frame::XModel::initNew().

## ◆ setChartTypeManager()

void setChartTypeManager | ( | [in] XChartTypeManager | xNewManager | ) |

sets a new component that is able to create different chart type templates (components of type ChartTypeTemplate)

## ◆ setFirstDiagram()

void setFirstDiagram | ( | [in] XDiagram | xDiagram | ) |

Todo
  allow more than one diagram

Notes: this is preliminary, we need an API that supports more than one diagram. The method name setDiagram exists in the css.chart API, so there is would be no way to choose either this or the other method from Basic (it would chose one or the other by random).

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

- com/sun/star/chart2/XChartDocument.idl