[Solved] Applying font attributes within a texttable
Posted: Tue Aug 15, 2017 2:25 pm
I'm planning to have two paragraphs within a cell of a TextTable within a text document. I want to have one of the paragraphs with a font size of 20 and the other 10.
Currently I've set the contents of the cell using this
A step forward would be to be able to manipulate that text for font weight and font size and font name.
I've managed to do this successfully outside the table with this
But am at a loss on how to do similar within a texttable. Any suggestions most welcome
Alex
Currently I've set the contents of the cell using this
Code: Select all
oTable.getCellByPosition( iDayOfWeek, sNum ).setString(sDayOfMonth & CHR$(10) & sEvent)
I've managed to do this successfully outside the table with this
Code: Select all
oDoc = ThisComponent
Cursor = oDoc.currentcontroller.getViewCursor()
mySelection = oText.createTextCursorByRange(Cursor.getStart())
mySelection.gotoStartOfParagraph(false)
mySelection.gotoEndOfParagraph(true)
mySelection.CharFontName="Arial"
mySelection.CharHeight="30"
mySelection.CharWeight = com.sun.star.awt.FontWeight.BOLD
Alex