I create an OpenOffice document with Delphi. I insert a table in my document.
My question is : How to change font and to center text into the all the cells of the table?
Thanks for help
[Solved] Writer: change font and center text in Cells table
[Solved] Writer: change font and center text in Cells table
Last edited by jfpetit on Wed Dec 05, 2012 8:00 pm, edited 3 times in total.
OpenOffice 3.4.1
Windows XP
Windows XP
Re: OOWriter with Delphi How to center text in Cells table
If you want to change only some cells, something like this (in OO Basic) should work.
Code: Select all
oTxtTables = ThisComponent.getTextTables()
oTable = oTxtTables.getByIndex(0)
oCurs = oTable.createCursorByCellName("A1")
oCurs.ParaAdjust = com.sun.star.style.ParagraphAdjust.CENTER
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Re: OOWriter with Delphi How to center text in Cells table
Thanks for your answer.
Is it possible to change the font and to center text of all the cells of the table?
Thanks for help
Is it possible to change the font and to center text of all the cells of the table?
Thanks for help
OpenOffice 3.4.1
Windows XP
Windows XP
Re: OOWriter How to change font and center text in Cells tab
Code: Select all
oTxtTables = ThisComponent.getTextTables()
oTable = oTxtTables.getByIndex(0)
oCurs = oTable.createCursorByCellName("A1")
oCurs.gotoStart(False)
oCurs.gotoEnd(True)
oCurs.ParaAdjust = com.sun.star.style.ParagraphAdjust.CENTER
oCurs.CharFontName = "Arial"
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Re: OOWriter How to change font and center text in Cells tab
It works.
Thanks
Thanks
OpenOffice 3.4.1
Windows XP
Windows XP