https://bugs.freedesktop.org/show_bug.cgi?id=60117

Fernand <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|Other                       |All
           Priority|medium                      |high

--- Comment #1 from Fernand <[email protected]> ---
the code below was confirmed to work still for Fedora and Linux 
but not for Windows sinds 4.0

"oWindow.setVisible(True)" is failing

Sub Main
  oDoc = ThisComponent
  oParentFrame = oDoc.CurrentController.Frame
  oPeer = oParentFrame.ContainerWindow
  oToolkit = oPeer.Toolkit

  oWindow = CreateNewWindow(oToolkit,oPeer,150,150,200,200)
  oFrame = CreateUnoService("com.sun.star.frame.Frame")
  oFrame.initialize(oWindow)
  oFrame.setCreator(oParentFrame)
  oFrame.setName("NewFrame")
  oFrame.Title = "New Frame"

  oParentFrame.getFrames().append(oFrame)

  oWindow.setVisible(True)
End Sub


Function CreateNewWindow( _
  oToolkit,oParent,nX,nY,nWidth,nHeight) As Object
  aRect = CreateUnoStruct("com.sun.star.awt.Rectangle")
  With aRect
    .X = nX
    .Y = nY
    .Width = nWidth
    .Height = nHeight
  End With
  aWinDesc = CreateUnoStruct("com.sun.star.awt.WindowDescriptor")
  With aWinDesc
    .Type = com.sun.star.awt.WindowClass.TOP
    .WindowServiceName = "dialog"
    .ParentIndex = -1
    .Bounds = aRect
    .Parent = oParent
    .WindowAttributes = _
      com.sun.star.awt.WindowAttribute.MOVEABLE + _
      com.sun.star.awt.WindowAttribute.CLOSEABLE
  End With
  CreateNewWindow = oToolkit.createWindow(aWinDesc)
End Function

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to