ooodev.adapter.chart2.data.data_provider_partial module
- class ooodev.adapter.chart2.data.data_provider_partial.DataProviderPartial(component, interface=com.sun.star.chart2.data.XDataProvider)[source]
Bases:
object
Partial class for XDataProvider.
- Parameters:
component (XDataProvider) –
interface (UnoInterface | None) –
- __init__(component, interface=com.sun.star.chart2.data.XDataProvider)[source]
Constructor
- Parameters:
component (XDataProvider) – UNO Component that implements
com.sun.star.chart2.data.XDataProvider
interface.interface (UnoInterface, optional) – The interface to be validated. Defaults to
XDataProvider
.
- Return type:
None
- create_data_sequence_by_range_representation(range_representation)[source]
Creates a single data sequence for the given data range.
- Raises:
com.sun.star.lang.IllegalArgumentException –
IllegalArgumentException
- Return type:
XDataSequence
- Parameters:
range_representation (str) –
- create_data_sequence_by_range_representation_possible(range_representation)[source]
If TRUE is returned, a call to createDataSequenceByRangeRepresentation with the same argument must return a valid XDataSequence object.
If FALSE is returned, createDataSequenceByRangeRepresentation throws an exception.
- Return type:
bool
- Parameters:
range_representation (str) –
- create_data_sequence_by_value_array(role, value_array, role_qualifier)[source]
Creates a single data sequence from the string value array representation.
- Raises:
com.sun.star.lang.IllegalArgumentException –
IllegalArgumentException
- Return type:
XDataSequence
- Parameters:
role (str) –
value_array (str) –
role_qualifier (str) –
- create_data_source(*args)[source]
Creates a data source object that matches the given range representation string.
This can be used for creating the necessary data for a new chart out of a previously selected range of cells in a spreadsheet.
For spreadsheets and text document tables there exists a service TabularDataProviderArguments describing valid values for this list.
- Raises:
com.sun.star.lang.IllegalArgumentException –
IllegalArgumentException
- Return type:
XDataSource
- Parameters:
args (PropertyValue) –
- create_data_source_possible(*args)[source]
If
True
is returned, a call tocreate_data_source()
with the same arguments must return a validXDataSequence
object.If
False
is returned,create_data_source()
throws an exception.- Return type:
bool
- Parameters:
args (PropertyValue) –
- detect_arguments(data_source)[source]
Tries to find out with what parameters the passed DataSource most probably was created.
if xDataSource is a data source that was created with createDataSource(), the arguments returned here should be the same than the ones passed to the function. Of course, this cannot be guaranteed. However, if detection is ambiguous, the returned arguments should be empty.
This method may merge representation strings together if adjacent ranges appear successively in the range identifiers. E.g., if the first range refers to “$Sheet1.$A$1:$A$8” and the second range refers to “$Sheet1.$B$1:$B$8”, those should be merged together to “$Sheet1.$A$1:$B$8”.
- Return type:
Tuple
[PropertyValue
,...
]- Parameters:
data_source (com.sun.star.chart2.data.XDataSource) –
- get_range_selection()[source]
Returns a component that is able to change a given range representation to another one.
This usually is a controller-component that uses the GUI to allow a user to select a new range.
This method may return nothing, if it does not support range selection or if there is no current controller available that offers the functionality.
- Return type:
XRangeSelection