How can I add a caption to an GraphicObject ?

Java, C++, C#, Delphi... - Using the UNO bridges
Post Reply
elchstern
Posts: 2
Joined: Tue Dec 17, 2013 11:18 pm

How can I add a caption to an GraphicObject ?

Post by elchstern »

I modified a OoTextDoc with VB.Net and added an Image.

Code: Select all

        oBitmaps.insertByName(sInternalPicName, sFile)
        Dim oPic As Object = oBitmaps.getByName(sInternalPicName)
        Dim oCursor As Object = oo.CurrentController.getViewCursor
        oCursor.goToEnd(False)
        If nRow = 0 Then
            oCursor.goUp(3, False)
        Else
            oCursor.goUp(1, False)
        End If
        Dim oGraph As Object = oo.createInstance("com.sun.star.text.GraphicObject")

        With oGraph
            .GraphicURL = oPic
            .Width = 8000
            .Height = 10000
            .HoriOrient = 0
            .HoriOrientPosition = nPosition
            .VertOrient = 0
            .VertOrientPosition = nRow
        End With
        oo.Text.insertTextContent(oCursor, oGraph, False)
        fcInsertPictureIop = oo
but the picture needs a caption. How can I add a Caption via api calls ?

Thanks guys
OpenOffice 3.1 on Windows Vista
Post Reply