ooodev.format.inner.direct.structs.point_struct module

class ooodev.format.inner.direct.structs.point_struct.PointStruct(x=0, y=0)[source]

Bases: StructBase

Point struct.

Any properties starting with prop_ set or get current instance values.

All methods starting with fmt_ can be used to chain together Border Table properties.

__init__(x=0, y=0)[source]

Constructor

Parameters:
  • x (int, optional) – Specifies X coordinate. Default 0.

  • y (int, optional) – Specifies Y coordinate. Default 0.

Return type:

None

apply(obj: Any)[source]
apply(obj, **kwargs)

Applies tab properties to obj

Parameters:

obj (object) – UNO object.

Return type:

None

fmt_all(value)[source]

Gets copy of instance with width and height set.

Parameters:
  • value (float, UnitT) – Specifies x and y values.

  • self (_TPointStruct) –

Returns:

Border Table

Return type:

PointStruct

fmt_x(value)[source]

Gets a copy of instance with height set.

Parameters:
  • value (float, UnitT) – Specifies x value.

  • self (_TPointStruct) –

Return type:

PointStruct

fmt_y(value)[source]

Gets a copy of instance with width set.

Parameters:
  • value (float, UnitT) – Specifies y value.

  • self (_TPointStruct) –

Return type:

PointStruct

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:

PropertyNotFoundError – If obj does not have required property

Returns:

PointStruct instance that represents obj Point properties.

Return type:

PointStruct

classmethod from_uno_struct(value)[source]
classmethod from_uno_struct(value, **kwargs)
classmethod from_uno_struct(value, **kwargs)

Converts a Point instance to a PointStruct.

Parameters:

value (Point) – UNO Point.

Returns:

PointStruct set with Point properties.

Return type:

PointStruct

get_uno_struct()[source]

Gets UNO Point from instance.

Returns:

Point instance

Return type:

Point

property prop_format_kind: FormatKind

Gets the kind of style

Return type:

FormatKind

property prop_x: int

Gets/Sets x value

Return type:

int

property prop_y: int

Gets/Sets y value.

Return type:

int