Class WriteNumberingStyle
- class ooodev.write.style.WriteNumberingStyle(owner, component, lo_inst=None)[source]
Bases:
NumberingStyleComp
,QiPartial
,PropPartial
,Generic
[T
]Represents writer Page Style.
- __init__(owner, component, lo_inst=None)[source]
Constructor
- Parameters:
owner (T) – Owner of this component.
component (XStyle) – UNO object that supports
com.sun.star.style.Style
service.lo_inst (LoInst, optional) – Lo instance. Defaults to
None
.
- Return type:
None
- add_event_properties_change(names, cb)
Add properties to listen for changes.
- Parameters:
names (Iterable[str]) – One or more property names to listen for changes.
cb (EventArgsCallbackT) – Callback that is invoked when an event is triggered.
- Raises:
ValueError – If names is empty.
- Return type:
None
Note
The callback
EventArgs.event_data
will contain a tuple ofcom.sun.star.beans.PropertyChangeEvent
objects.Each time this method is called, the previous names are removed and the new names are added.
- 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
- fire_event_properties_change(names)
Fires a sequence of PropertyChangeEvents
- Parameters:
names (Iterable[str]) – Sequence of property names to fire event for.
- Return type:
None
- get_by_index(idx)
Gets the element at the specified index.
- Parameters:
idx (int) – The Zero-based index of the element.
- Returns:
The element at the specified index.
- Return type:
Any
- get_count()
Gets the number of elements contained in the container.
- Returns:
The number of elements.
- Return type:
int
- get_element_type()
Gets the type of the elements contained in the container.
- Returns:
The type of the elements.
None
means that it is a multi-type container and you cannot determine the exact types with this interface.- Return type:
Any
- get_name()
Returns the name of the object.
- Return type:
str
- get_parent_style()
Returns the name of the parent style.
- Return type:
str
- get_property(name, default=<object object>)
Get property value
- Parameters:
name (str) – Property Name.
default (Any, optional) – Return value if property value is
None
.
- Returns:
Property value or default.
- Return type:
Any
- has_elements()
Determines whether the container has elements.
- Return type:
bool
- is_in_use()
Returns
True
if this style is in use.- Return type:
bool
- is_user_defined()
Returns
True
if this style is user defined.- Return type:
bool
- 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_properties_listener()
Remove Properties Listener
- Return type:
None
- 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
- replace_by_index(index, element)
Replaces the element at the specified index with the given element.
- Parameters:
index (int) – The index of the element that is to be replaced.
element (Any) – The replacement element.
- Return type:
None
- set_name(name)
Sets the name of the object.
- Return type:
None
- Parameters:
name (str) –
- set_parent_style(parent_style)
Sets the name of the parent style.
- Parameters:
parent_style (str) – The name of the parent style.
- Return type:
None
- set_property(**kwargs)
Set property value
- Parameters:
**kwargs (
Any
) – Variable length Key value pairs used to set properties.- Return type:
None
- property component: com.sun.star.text.NumberingStyle
NumberingStyle Component
- Return type:
NumberingStyle
- property events_listener_properties_change_implement: PropertiesChangeListener
Returns listener
- Return type:
- property owner: T
Component Owner
- Return type:
TypeVar
(T
, bound= ComponentT)