Class ChartImage
- class ooodev.calc.chart2.chart_image.ChartImage(owner, component, lo_inst=None)[source]
Bases:
LoInstPropsPartial
,GraphicComp
,QiPartial
,ServicePartial
,TheDictionaryPartial
,CalcDocPropPartial
,CalcSheetPropPartial
Class for managing Chart2 Chart Image Component.
- Parameters:
owner (ChartShape) –
component (XGraphic) –
lo_inst (LoInst | None) –
- __init__(owner, component, lo_inst=None)[source]
Constructor
- Parameters:
owner (ChartShape) – Chart Shape.
component (Any) – UNO Chart2 Chart Image Component.
lo_inst (LoInst | None) –
- Return type:
None
- add_event_property_change(name, cb)
Adds a listener for an event.
Event is invoked when property is changed.
The callback
EventArgs.event_data
will contain acom.sun.star.beans.PropertyChangeEvent
struct.- Parameters:
name (str) – Property Name
cb (EventArgsCallbackT) – Callback
- Return type:
None
- add_event_property_change_events_disposing(name, cb)
Adds a listener for an event.
Event is invoked when the property listener is about to be disposed.
The callback
EventArgs.event_data
will contain a UNOcom.sun.star.lang.EventObject
struct.- Parameters:
name (str) – Property Name
cb (EventArgsCallbackT) – Callback
- Return type:
None
- add_event_vetoable_change(name, cb)
Adds a listener for an event.
Event is invoked when property is changed.
The callback
EventArgs.event_data
will contain acom.sun.star.beans.PropertyChangeEvent
struct.- Parameters:
name (str) – Property Name
cb (EventArgsCallbackT) – Callback
- Return type:
None
- add_event_vetoable_change_events_disposing(name, cb)
Adds a listener for an event.
Event is invoked when the property listener is about to be disposed.
The callback
EventArgs.event_data
will contain a UNOcom.sun.star.lang.EventObject
struct.- Parameters:
name (str) – Property Name
cb (EventArgsCallbackT) – Callback
- Return type:
None
- add_property_change_listener(name, listener)
Adds a listener for property changes.
- Parameters:
name (str) – The name of the property.
listener (Any) – The listener to be added.
- Return type:
None
- add_vetoable_change_listener(name, listener)
Adds a listener for vetoable changes.
- Parameters:
name (str) – The name of the property.
listener (Any) – The listener to be added.
- Return type:
None
- get_property_set_info()
Returns the property set info.
- Returns:
The property set info.
- Return type:
XPropertySetInfo
- get_property_value(name)
Returns the value of a property.
- Parameters:
name (str) – The name of the property.
- Returns:
The value of the property.
- Return type:
Any
- get_services()
Gets service names for the instance.
- Returns:
service names
- Return type:
List[str]
- get_type()
Get the type of the contained graphic.
- Return type:
int
- qi(atype, raise_err=False)
Generic method that get an interface instance from an object.
- Parameters:
atype (T) – Interface type to query obj for. Any Uno class that starts with ‘X’ such as XInterface
raise_err (bool, optional) – If True then raises MissingInterfaceError if result is None. Default False
- Raises:
MissingInterfaceError – If ‘raise_err’ is ‘True’ and result is None
- Returns:
instance of interface if supported; Otherwise, None
- Return type:
T | None
Note
When
raise_err=True
return value will never beNone
.
- remove_event_property_change(name)
Removes a listener for an event
- Parameters:
name (str) – Property Name
- Return type:
None
- remove_event_property_change_events_disposing(name)
Removes a listener for an event
- Parameters:
name (str) – Property Name
- Return type:
None
- remove_event_vetoable_change(name)
Removes a listener for an event
- Parameters:
name (str) – Property Name
- Return type:
None
- remove_event_vetoable_change_events_disposing(name)
Removes a listener for an event
- Parameters:
name (str) – Property Name
- Return type:
None
- remove_property_change_listener(name, listener)
Removes a listener for property changes.
- Parameters:
name (str) – The name of the property.
listener (Any) – The listener to be removed.
- Return type:
None
- remove_vetoable_change_listener(name, listener)
Removes a listener for vetoable changes.
- Parameters:
name (str) – The name of the property.
listener (Any) – The listener to be removed.
- Return type:
None
- set_property_value(name, value)
Sets the value of a property.
- Parameters:
name (str) – The name of the property.
value (Any) – The value of the property.
- Return type:
None
- support_service(*service)
Gets if instance supports a service.
- Parameters:
*service (str) – Variable length argument list of UNO namespace strings such as
com.sun.star.configuration.GroupAccess
- Returns:
True
if instance supports any passed in service; Otherwise,False
- Return type:
bool
- property alpha: bool | None
Gets/Sets - Indicates that it is a pixel graphic with an alpha channel.
The status of this flag is not always clear if the graphic was not loaded at all, e.g. in case of just querying for the GraphicDescriptor
optional
- Return type:
bool | None
- property animated: bool | None
Gets/Sets - Indicates that it is a graphic that consists of several frames that can be played as an animation.
The status of this flag is not always clear if the graphic was not loaded at all, e.g. in case of just querying for the
GraphicDescriptor
optional
- Return type:
bool | None
- property bits_per_pixel: int | None
The number of bits per pixel used for the pixel graphic.
This property is not available for vector graphics and may not be available for some kinds of pixel graphics
optional
- Return type:
int | None
- property component: com.sun.star.graphic.Graphic
Graphic Component
- Return type:
Graphic
- property extra_data: TheDict
Extra Data Key Value Pair Dictionary.
Properties can be assigned properties and access like a dictionary and with dot notation.
Note
This is a dictionary object that can be used to store key value pairs. Generally speaking this data is not part of the object’s main data structure and is not saved with the object (document).
This property is used to store data that is not part of the object’s main data structure and can be used however the developer sees fit.
- Return type:
- property graphic_type: int
Gets/Sets the type of the graphic.
- Return type:
int
- property linked: bool | None
Gets/Sets - Indicates that the graphic is an external linked graphic.
optional
- Return type:
bool | None
- property mime_type: str
The MimeType of the loaded graphic.
The mime can be the original mime type of the graphic source the graphic container was constructed from or it can be the internal mime type image/x-vclgraphic, in which case the original mime type is not available anymore
Currently, the following mime types are supported for loaded graphics:
- Return type:
str
- property office_doc: OfficeDocumentT
Office Document.
- Return type:
- property origin_url: str | None
Gets/Sets the URL of the location from where the graphic was loaded from.
optional
- Return type:
str | None
- property owner: ChartShape
Chart Shape
- Return type:
- property size100th_mm: SizeMM100 | None
The Size of the graphic in 100th mm.
This property may not be available in case of pixel graphics or if the logical size can not be determined correctly for some formats without loading the whole graphic
optional
- Return type:
SizeMM100 | None
- property size_pixel: SizePX | None
The Size of the graphic in pixel.
This property may not be available in case of vector graphics or if the pixel size can not be determined correctly for some formats without loading the whole graphic
optional
- Return type:
SizePX | None
- property transparent: bool | None
Indicates that it is a transparent graphic.
This property is always
True
for vector graphics. The status of this flag is not always clear if the graphic was not loaded at all, e.g. in case of just querying for theGraphicDescriptor
.optional
- Return type:
bool | None