Oliver and Ariel
Thanks for this quick responses, now it works like a charm
I missed from the very begin the difference between textCusor and
ViewCursor :-)
Fernand
Ariel Constenla-Haile wrote:
Hi Frenand
Fernand Vanrie escribió:
Hallo,
Using the GUI an Inserting a document into a TextTable Cell works.
Doing the same thing with the API and Basic looks a bit more
complicated.
the code : oViewCursor.cell.start.InsertDocumentFromURL("" , oProps())
gives this error "Sequence Ellement is not assignable by given value"
oViewCurrsor.cell.start is a TextCursor but without support for
XDocumentInsertable
this is no text cursor, but a text range.
How can i have a textcursor in a Texttable cell who supports
XDocumentInsertable
Sub Main
Dim oDoc as Object, oViewCursor as Object
Dim oCell as Object, oCellTextCursor as Object
oDoc = ThisComponent
oViewCursor = oDoc.getCurrentController().getViewCursor()
oCell = oViewCursor.Cell
If NOT IsNull( oCell ) Then
oCellTextCursor = oCell.createTextCursorByRange(
oCell.getStart() )
Dim aProps(1) as New com.sun.star.beans.PropertyValue
aProps(0).Name = "FilterName"
aProps(0).Value = "Text (encoded)"
aProps(1).Name = "FilterOptions"
aProps(1).Value = "UTF8,LF,GalatiaSil,de-DE"
oCellTextCursor.insertDocumentFromURL(_
convertToURL("/home/ariel/demo.txt"), _
aProps )
End If
End Sub
this is a text cursor and supports css.document.XDocumentInsertable :-)
Regards
Ariel.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]