Hi Martin,

Martin Klar schrieb:
Hi there,

How can I use 2 different fonts in a TextTable?

I tried:

table = doc.createInstance( "com.sun.star.text.TextTable" )
tableText = table.getCellByName( cellName )
cursor.setPropertyValue( "CharFontName", "Webdings" )
tableText.setString(" r ")
cursor.setPropertyValue( "CharFontName", "Thorndale AMT" )
tableText.setString(" some text ")

Every setString resets the settings of the cell. Is there some kind of appendString()? I found nothing similar.

The cursor is an XTextRange object, means, it spans the range of your inserted string. Either you work with two different cursors to set different properties or you try the collapseTo...() methods with your cursor.

See http://api.openoffice.org/docs/DevelopersGuide/Text/Text.xhtml#1_3_1_1_Editing_Text

Regards
Peter


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

Reply via email to