Re: need help to insert an image with a caption with the Libo java API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[Taking this back to the dev mailing list]

On 12/02/2019 19.10, sos wrote:
> I supose the image and the IllustrationReference are placed in a textframe ?
> 
> 
> sub InsertIllustrationReference
>   oDoc = ThisComponent
>   oText = oDoc.getText()
>   oViewCursor = oDoc.getCurrentController().getViewCursor()
> 
>   oReference = oDoc.createInstance("com.sun.star.text.textfield.GetReference")
>   With oReference
>     .SourceName = "Illustration"
>     .ReferenceFieldPart = com.sun.star.text.ReferenceFieldPart.ONLY_SEQUENCE_NUMBER
>     .ReferenceFieldSource = com.sun.star.text.ReferenceFieldSource.SEQUENCE_FIELD
>     .SequenceNumber = 0
>   End With
> 
>   oText.insertTextContent(oViewCursor, oReference, False)
> end sub

Seems so, Miklos's reply also mentions it's just a text frame.


PS: I just realized I hadn't properly read (or taken into account) the
email subject for my reply...
_______________________________________________
LibreOffice mailing list
LibreOffice@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/libreoffice




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux