To find current position and dimensions of the current active Libre Office window in pixels is not a problem:
Code: Select all
from com.sun.star.awt import PosSize
active_window = self.desktop.getCurrentFrame().getContainerWindow()
pos_size = active_window.getPosSize()
x_current_lo_window = pos_size.X
y_current_lo_window = pos_size.Y
width_current_lo_window = pos_size.Width
height_current_lo_window = pos_size.HeightThis: https://wiki.openoffice.org/wiki/Docume ... Properties says: "PositionX, PositionY...they use the Map AppFont unit. Map AppFont units are device and resolution independent. One Map AppFont unit is equal to one eighth of the average character (Systemfont) height and one quarter of the average character width. The dialog editor also uses Map AppFont units, and sets their values automatically."
My code to display the windows is:
Code: Select all
dialog_model = self.smgr.createInstanceWithContext('com.sun.star.awt.UnoControlDialogModel', self.ctx)
dialog_model.PositionX = 200
dialog_model.PositionY = 200