narf03 Newbie

Joined: 14 May 2009 Posts: 2
|
Posted: Thu May 14, 2009 12:51 am Post subject: Add image into swriter, wrap to background and move location |
|
|
This is what I have, I able to add the image into the Swriter, but unable to wrap it to background and move to a certain location, can anyone help plz ? oh forgot to mention its in vb.net.
| Code: |
Function fct_AddImageToSWriter(ByVal objWriter As Object, ByVal strImageFile As String, ByVal pLocation As Point, ByVal pSize As Size)
Dim oG As Object
oG = objWriter.createInstance("com.sun.star.text.GraphicObject")
oG.GraphicURL = convertToURL(strImageFile)
oG.Width = pSize.Width
oG.Height = pSize.Height
Dim oText = objWriter.getText()
Dim oViewCursor = objWriter.getCurrentController().getViewCursor()
Dim oCursor = oText.createTextCursor()
objWriter.getText.insertTextContent(oCursor, oG, False)
Return True
End Function
|
|
|