ooodev.adapter.text.text_view_cursor_partial module
- class ooodev.adapter.text.text_view_cursor_partial.TextViewCursorPartial(component, interface=com.sun.star.text.XTextViewCursor)[source]
Bases:
TextCursorPartialPartial class for XTextViewCursor.
- Parameters:
component (XTextViewCursor) –
interface (UnoInterface | None) –
- __init__(component, interface=com.sun.star.text.XTextViewCursor)[source]
Constructor
- Parameters:
component (XTextViewCursor) – UNO Component that implements
com.sun.star.text.XTextViewCursorinterface.interface (UnoInterface, optional) – The interface to be validated. Defaults to
XTextViewCursor.
- Return type:
None
- get_position()[source]
Gets the cursor’s coordinates relative to the top left position of the first page of the document in
1/100 mm.- Returns:
The cursor’s coordinates as
com.sun.star.awt.Point. in1/100 mm.- Return type:
Note
The
Xcoordinate is the horizontal position, theYcoordinate is the vertical position.Warning
The
Xis relative to the document window and not the document page. This means when the document window size changes theXcoordinate will change even if the cursor has not moved. This is also the case if the document zoom changes.When the document page is zoomed all the way to fill the document window the
Xcoordinate is0when at the left hand page margin (beginning of a line).The
Ycoordinate is relative to the top of the document window and not the top of the document page. TheYcoordinate seems not to be affected by Document Zoom or scroll position.