To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=85661





------- Additional comments from [EMAIL PROTECTED] Thu Mar  6 15:10:32 +0000 
2008 -------
Shame people don't check the creation time of issues, but as the issue is still 
unresolved and it appears people are having trouble recreating it (not 
having .net), here is a simple test app to demonstrate it. The code for it is 
as below:

Imports System.Drawing

Public Class Form1
    Dim clipBMP As Bitmap

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As 
System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub createBMP(ByVal sender As System.Object, ByVal e As 
System.EventArgs) Handles createBMPB.Click
        Try
            'a very simple test routine to illustrate issue 
            'note you may need to import system.drawing
            'the below makes use of GDI+ calls wrapped up in .net objects

            If Not (clipBMP Is Nothing) Then clipBMP.Dispose() 'otherwise 
you'll get a memory leak
            clipBMP = Nothing

            'create a bitmap and get a handle on the graphics
            clipBMP = New Bitmap(250, 250) 'instantiate object and specifiy size

            Dim gr As Graphics = Graphics.FromImage(clipBMP) 'create a graphics 
object from the bitmap

            'draw stuff on the bitmap
            Dim r As New Rectangle(10, 100, 230, 50)
            gr.Clear(Color.WhiteSmoke)
            Dim p As New Pen(Color.Black, 2)
            gr.DrawRectangle(p, r)
            gr.FillRectangle(Brushes.LightSteelBlue, r)

            Dim strFormat As New StringFormat
            strFormat.Alignment = StringAlignment.Center
            strFormat.LineAlignment = StringAlignment.Center
            gr.TextRenderingHint = Drawing.Text.TextRenderingHint.AntiAlias
            gr.DrawString("Hello Open Office", New Font("Arial Black", 14), 
Brushes.Black, r, strFormat)

            'lets clear all the object as not all of them are managed and 
handled by GC
            p.Dispose()
            strFormat.Dispose()
            gr.Dispose()

            'now we cause the picture box to be redrawn and as we handle
            'the paint event we'll use the above bmp ;)
            bmpP.Invalidate()
         

        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub

    Private Sub copyBMPB_Click(ByVal sender As System.Object, ByVal e As 
System.EventArgs) Handles copyBMPB.Click
        Try
            If (clipBMP Is Nothing) Then
                MsgBox("Please create a bitmpa first using the create button")
            Else
                'create a dataobject 
                Dim dataObj As DataObject = New DataObject

                'add the bitmap
                dataObj.SetData(DataFormats.Bitmap, True, clipBMP)

                'copy it to the clipboard
                Clipboard.SetDataObject(dataObj, True)

                'now try and paste it into a document. you can under wordpad, 
microsoft office etc.
                'but the paste icon does not appear in openoffice
            End If
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub

    Private Sub bmpP_Paint(ByVal sender As Object, ByVal e As 
System.Windows.Forms.PaintEventArgs) Handles bmpP.Paint
        Try
            'if we have a bmp we'll use it to draw the panel
            If Not (clipBMP Is Nothing) Then e.Graphics.DrawImageUnscaled
(clipBMP, 0, 0)
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub
End Class

It's all simple stuff really, and the library calls are used by all .net 
languages so it isn't a vb issue. My guess would be that open office doesn't 
like something in the header information of the clipboard bitmap, perhaps 
someone could test that? 

I'd point out that as Linux does'nt use GDI+ it uses it's own 2D system that 
running this under Linux would not be a proper test, ohh and it stands to 
reason that you'll nedd .net installed

P.S. Win Vista used WPF for display and uses GDI+ under emulation so it may 
behave differently under win Vista

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to