Apache OpenOffice (AOO) Bugzilla – Issue 65469
XWindow::setPosSize x/y coordinate different
Last modified: 2007-01-19 06:58:48 UTC
The position(x-coordinate and y-coordinate) seems like become different, when use CreateUnoDialog() or use awt's Toolkit's createWindow(), their Possize(x/y coordinate) are point to different value. The sample show as following: REM ***** Sample code ***** Sub Test() Dim oDlg1, oDlg2 As Object oDlg1 = CreateUnoDialog( DialogLibraries.Standard.Dialog1 ) oDlg1.setPosSize(0, 0, 100, 100, com.sun.star.awt.PosSize.POSSIZE) oDlg2 = CreateTopWindow() oDlg2.Visible = true oDlg2.setPosSize(0, 0, 100, 100, com.sun.star.awt.PosSize.POSSIZE) oDlg1.execute() oDlg2.Visible = false End Sub Function CreateTopWindow() Dim oAwtToolkit, oWindowDesc As Object oAwtToolkit = CreateUnoService("com.sun.star.awt.Toolkit") oWindowDesc = CreateUnoStruct( "com.sun.star.awt.WindowDescriptor" ) With oWindowDesc .Type = com.sun.star.awt.WindowClass.TOP .WindowServiceName = "" .Parent = oAwtToolkit.getDesktopWindow() .ParentIndex = -1 .WindowAttributes = 0 .WindowAttributes = .WindowAttributes + com.sun.star.awt.WindowAttribute.BORDER End With CreateTopWindow() = oAwtToolkit.createWindow( oWindowDesc ) End Function REM ***** End ***** Just Open any Openoffice.org app in normal window(not Maximun) and run the sample code When run this sample, it will show two window, one is oDlg1 ( CreateUnoDialog), the other is oDlg2 (CreateTopWindow) The Position of oDlg1 and oDlg2 are same after run .setPosSize(): oDlg1.setPosSize(0, 0, 100, 100, com.sun.star.awt.PosSize.POSSIZE) oDlg2.setPosSize(0, 0, 100, 100, com.sun.star.awt.PosSize.POSSIZE) So oDlg1 and oDlg2 will be show on the same position, but the result is not!
@winwind You filed your report with component "Testproduct". If you wanted to report a real bug, please contribute a WRITER document containing the macro and a button that starts the macro when clicked.
Closing issue due to reporter's inactivity as WFM. Pls. feel free to reopen this issue if you find out that the problem is still existing with a current stable OOo version and if you can contribute additional information requested with 'Additional comments from rainerbielefeld Sat Dec 30 01:07:22 -0800 2006'
.