Issue 65469 - XWindow::setPosSize x/y coordinate different
Summary: XWindow::setPosSize x/y coordinate different
Status: CLOSED IRREPRODUCIBLE
Alias: None
Product: *Testproduct
Classification: Test
Component: code (show other issues)
Version: OOo 2.0
Hardware: All All
: P3 Trivial (vote)
Target Milestone: not determined
Assignee: issues@test
QA Contact: issues@test
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2006-05-17 07:50 UTC by winwind
Modified: 2007-01-19 06:58 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description winwind 2006-05-17 07:50:29 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!
Comment 1 Rainer Bielefeld 2006-12-30 09:07:22 UTC
@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.
Comment 2 Rainer Bielefeld 2007-01-19 06:58:32 UTC
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'
Comment 3 Rainer Bielefeld 2007-01-19 06:58:48 UTC
.