LibreOffice
LibreOffice 24.2 SDK API Reference
|
import"XChartTypeTemplate.idl";
Public Member Functions | |
XDiagram | createDiagramByDataSource ([in] com::sun::star::chart2::data::XDataSource xDataSource, [in] sequence< com::sun::star::beans::PropertyValue > aArguments) |
Creates a new diagram based upon the given data . More... | |
boolean | supportsCategories () |
void | changeDiagram ([in] XDiagram xDiagram) |
Analyses the given diagram and reinterprets its DataSeries and Categories and creates a new diagram based on these series. More... | |
void | changeDiagramData ([in] XDiagram xDiagram, [in] com::sun::star::chart2::data::XDataSource xDataSource, [in] sequence< com::sun::star::beans::PropertyValue > aArguments) |
Changes the given diagram xDiagram by using the new data given in xDataSource . More... | |
boolean | matchesTemplate ([in] XDiagram xDiagram, [in] boolean bAdaptProperties) |
States whether the given diagram could have been created by the template. More... | |
XChartType | getChartTypeForNewSeries ([in] sequence< XChartType > aFormerlyUsedChartTypes) |
Provides a chart type object that can be used to create new series. More... | |
com::sun::star::uno::XInterface | getDataInterpreter () |
This used to have a return type of XDataInterpreter. More... | |
void | applyStyle ([in] XDataSeries xSeries, [in] long nChartTypeGroupIndex, [in] long nSeriesIndex, [in] long nSeriesCount) |
Applies a chart-type specific style (e.g. More... | |
void | resetStyles ([in] XDiagram xDiagram) |
Resets all styles that were changed from the default at any object in the chart and have not been later modified. More... | |
Public Member Functions inherited from XInterface | |
any | queryInterface ([in] type aType) |
queries for a new interface to an existing UNO object. More... | |
void | acquire () |
increases the reference counter by one. More... | |
void | release () |
decreases the reference counter by one. More... | |
void applyStyle | ( | [in] XDataSeries | xSeries, |
[in] long | nChartTypeGroupIndex, | ||
[in] long | nSeriesIndex, | ||
[in] long | nSeriesCount | ||
) |
Applies a chart-type specific style (e.g.
symbols) to all series in the sequence aSeries.
xSeries | a single data series to which a style will be applied |
nChartTypeGroupIndex | Denotes in which chart-type group the series lies, such this method can apply different styles for different chart-type groups |
nSeriesIndex | The index of the series inside the current chart-type group. nSeriesIndex does not uniquely identify a data series alone, but only together with nChartTypeGroupIndex |
nSeriesCount | The number of series in the current chart-type group. |
void changeDiagram | ( | [in] XDiagram | xDiagram | ) |
Analyses the given diagram and reinterprets its DataSeries and Categories and creates a new diagram based on these series.
Note, that if matchesTemplate() returns TRUE
for the given XDiagram, the latter should not be changed.
xDiagram | The diagram given will be modified such that it represents this ChartTypeTemplate. |
void changeDiagramData | ( | [in] XDiagram | xDiagram, |
[in] com::sun::star::chart2::data::XDataSource | xDataSource, | ||
[in] sequence< com::sun::star::beans::PropertyValue > | aArguments | ||
) |
Changes the given diagram xDiagram
by using the new data given in xDataSource
.
Note that the data is interpreted in a way that fits this template, but not necessarily the chart-types of the diagram. This method should only be called if the data-format of the diagram is compatible with the data-format of this template.
Ideally a matchesTemplate() call for the given diagram should return TRUE
before this method is called.
xDiagram | The diagram to be changed. |
xDataSource | This data source will be interpreted in a chart-type specific way and the DataSeries found in xDiagram will be adapted to the new data. Missing data series will be created and unused ones will be deleted in xDiagram . |
aArguments | Arguments that tell the template how to slice the given range. The properties should be defined in a separate service. |
For standard parameters that may be used, see the service StandardDiagramCreationParameters.
XDiagram createDiagramByDataSource | ( | [in] com::sun::star::chart2::data::XDataSource | xDataSource, |
[in] sequence< com::sun::star::beans::PropertyValue > | aArguments | ||
) |
Creates a new diagram based upon the given data .
xDataSource | This data source will be interpreted in a chart-type specific way and appropriate DataSeries will be created which serve as input for the new diagram. |
aArguments | Arguments that tell the template how to slice the given range. The properties should be defined in a separate service. |
For standard parameters that may be used, see the service StandardDiagramCreationParameters.
XChartType getChartTypeForNewSeries | ( | [in] sequence< XChartType > | aFormerlyUsedChartTypes | ) |
Provides a chart type object that can be used to create new series.
aFormerlyUsedChartTypes | The list can be used to copy some aspects from old chart types during the creation of a new chart type. The list might be empty. |
com::sun::star::uno::XInterface getDataInterpreter | ( | ) |
This used to have a return type of XDataInterpreter.
Then I removed the whole XChartTypeTemplate interface in commit 58766f997d59e4684f2887fd8cdeb12d2f8a9366. Which turned out to be a bad idea, so I restored it. I restored it in this form because I want to restore binary compatibility with vtable layout, but I don't want to restore the XDataInterpreter stuff, which was not useful for external use.
boolean matchesTemplate | ( | [in] XDiagram | xDiagram, |
[in] boolean | bAdaptProperties | ||
) |
States whether the given diagram could have been created by the template.
The template will parse the DataSeriesTree of the diagram to determine if the structure matches the one which would have been created by createDiagramByDataSource().
For analysis all parts of the diagram may be used, e.g. also properties set at the data series (like symbols)./p>
xDiagram | The diagram to be analyzed. |
bAdaptProperties | If TRUE the properties of the template are set, such that the template matches more accurately. E.g. for a line-chart with symbols the property "Symbol" would be set to TRUE . If this parameter is FALSE the template itself stays unmodified. |
TRUE
if the diagram given is structurally identical to a diagram that was created using createDiagramByDataSource() or changeDiagram(). If FALSE
is returned the template stays unmodified even if bAdaptProperties
is TRUE
. void resetStyles | ( | [in] XDiagram | xDiagram | ) |
Resets all styles that were changed from the default at any object in the chart and have not been later modified.
In createDiagramByDataSource() or changeDiagram() a template might e.g. change the page background color or the line style of all data series. This method should reset all objects that still have the changed settings to the default.
If for example the template changed the com::sun::star::drawing::LineStyle of all series to NONE, this method should reset all series with LineStyle NONE back to SOLID. If a series has a style DASH, it must not be changed.
boolean supportsCategories | ( | ) |
TRUE
if the template does support categories