ooodev.format.writer.direct.frame.options package

Module contents

class ooodev.format.writer.direct.frame.options.Align(adjust=<Enum instance com.sun.star.drawing.TextVerticalAdjust ('TOP')>)[source]

Bases: StyleBase

Frame Vertical Alignment

New in version 0.9.0.

__init__(adjust=<Enum instance com.sun.star.drawing.TextVerticalAdjust ('TOP')>)[source]

Constructor

Parameters:

adjust (VertAdjustKindl, optional) – Specifies Vertical Adjustment. Default VertAdjustKind.TOP

Return type:

None

classmethod from_obj(obj)[source]
classmethod from_obj(obj, **kwargs)
classmethod from_obj(obj, **kwargs)

Gets instance from object

Parameters:

obj (object) – UNO Object.

Raises:

NotSupportedError – If obj is not supported.

Returns:

Instance that represents Frame Alignment.

Return type:

Align

property prop_adjust: VertAdjustKind

Gets/Sets Adjust value

Return type:

VertAdjustKind

property prop_format_kind: FormatKind

Gets the kind of style

Return type:

FormatKind

class ooodev.format.writer.direct.frame.options.Names(*, name=None, desc=None, prev=None, next=None)[source]

Bases: AbstractDocument

Frame Name options

New in version 0.9.0.

__init__(*, name=None, desc=None, prev=None, next=None)[source]

Constructor

Parameters:
  • name (str, optional) – Specifies frame name.

  • desc (str, optional) – Specifies frame description.

  • prev (str, optional) – Specifies previous link.

  • next (str, optional) – Specifies next link.

Return type:

None

See also

LibreOffice Help <Inserting, Editing and Linking Frames https://help.libreoffice.org/latest/en-GB/text/swriter/guide/text_frame.html?DbPAR=WRITER#bm_id3149487>__

Note

Flowing text from one text frame to another, via prev and next required the text frame being flow to not contain text. If the frame to flow to contains text then prev and next do not have any effect.

apply(obj, **kwargs)[source]

Applies styles to object

Parameters:
  • obj (Any) – UNO Object that styles are to be applied.

  • kwargs (Any, optional) – Expandable list of key value pairs that may be used in child classes.

Keyword Arguments:
  • override_dv (Dic[str, Any], optional) – if passed in this dictionary is used to set properties instead of internal dictionary of property values.

  • validate (bool, optional) – if False then obj is not validated. Defaults to True.

Events:
Return type:

None

Note

If Event data obj, data_values or allow_update are changed then the new values are used.

Add update object to instance if not already set and allow_update is True (default).

Changed in version 0.27.0: Event data is now a dictionary with keys source, obj, data_values and allow_update.

Changed in version 0.9.4: Added validate keyword arguments.

classmethod from_obj(obj)[source]
classmethod from_obj(obj, **kwargs)
classmethod from_obj(obj, **kwargs)

Gets instance from object

Parameters:

obj (Any) – UNO Object.

Raises:

NotSupportedError – If obj is not supported.

Returns:

Instance that represents Frame Name options.

Return type:

Names

on_property_setting(source, event_args)[source]

Triggers for each property that is set

Parameters:
  • source (Any) – Event Source.

  • event_args (KeyValueCancelArgs) – Event Args

Return type:

None

property prop_desc: str | None

Gets/Sets description

Return type:

str | None

property prop_format_kind: FormatKind

Gets the kind of style

Return type:

FormatKind

property prop_name: str | None

Gets/Sets name

Return type:

str | None

property prop_next: str | None

Gets/Sets frame next link

Return type:

str | None

property prop_prev: str | None

Gets/Sets frame previous link

Return type:

str | None

class ooodev.format.writer.direct.frame.options.Properties(editable=None, printable=None, txt_direction=None)[source]

Bases: StyleMulti

Frame Frame Options Properties.

New in version 0.9.0.

__init__(editable=None, printable=None, txt_direction=None)[source]

Constructor

Parameters:
  • editable (bool, optional) – Specifies if Frame is editable in read-only document.

  • printable (bool, optional) – Specifies if Frame can be printed.

  • txt_direction (TextDirectionKind, optional) – Specifies text direction.

Return type:

None

classmethod from_obj(obj)[source]
classmethod from_obj(obj, **kwargs)
classmethod from_obj(obj, **kwargs)

Gets instance from object

Parameters:

obj (object) – UNO Object.

Raises:

NotSupportedError – If obj is not supported.

Returns:

Instance that represents Frame Option Properties.

Return type:

Properties

property prop_editable: bool | None

Gets/Sets editable value

Return type:

bool | None

property prop_format_kind: FormatKind

Gets the kind of style

Return type:

FormatKind

property prop_inner_writing_mode: WritingMode | None
Return type:

WritingMode | None

property prop_printable: bool | None

Gets/Sets print value

Return type:

bool | None

property prop_txt_direction: TextDirectionKind | None

Gets/Sets text direction value

Return type:

TextDirectionKind | None

class ooodev.format.writer.direct.frame.options.Protect(size=None, position=None, content=None)[source]

Bases: StyleBase

Frame Protections

New in version 0.9.0.

__init__(size=None, position=None, content=None)[source]

Constructor

Parameters:
  • size (bool, optional) – Specifies size protection.

  • position (bool, optional) – Specifies position protection.

  • content (bool, optional) – Specifies content protection.

Return type:

None

classmethod from_obj(obj)[source]
classmethod from_obj(obj, **kwargs)
classmethod from_obj(obj, **kwargs)

Gets instance from object

Parameters:

obj (object) – UNO Object.

Raises:

NotSupportedError – If obj is not supported.

Returns:

Instance that represents Frame Protection.

Return type:

Protect

property prop_content: bool | None

Gets/Sets content

Return type:

bool | None

property prop_format_kind: FormatKind

Gets the kind of style

Return type:

FormatKind

property prop_position: bool | None

Gets/Sets position

Return type:

bool | None

property prop_size: bool | None

Gets/Sets size

Return type:

bool | None